Development
This commit is contained in:
parent
d8d1d46fd2
commit
eed1d295dc
69 changed files with 3355 additions and 3230 deletions
247
docker/routlin-dash/app/pages/dnsblocking/content.json
Normal file
247
docker/routlin-dash/app/pages/dnsblocking/content.json
Normal file
|
|
@ -0,0 +1,247 @@
|
|||
{
|
||||
"id": "view_dnsblocking",
|
||||
"client_requirement": "client_is_viewer+",
|
||||
"items": [
|
||||
{
|
||||
"type": "header_page_title",
|
||||
"items": [
|
||||
{
|
||||
"type": "h1",
|
||||
"text": "DNS Blocking"
|
||||
},
|
||||
{
|
||||
"type": "p",
|
||||
"text": "Domain level blocking via dnsmasq."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "table",
|
||||
"datasource": "config:blocklists",
|
||||
"empty_message": "No blocklists configured.",
|
||||
"columns": [
|
||||
{
|
||||
"label": "Name",
|
||||
"field": "name"
|
||||
},
|
||||
{
|
||||
"label": "Description",
|
||||
"field": "description"
|
||||
},
|
||||
{
|
||||
"label": "Format",
|
||||
"field": "format",
|
||||
"class": "col-mono"
|
||||
},
|
||||
{
|
||||
"label": "Source URL",
|
||||
"field": "url",
|
||||
"class": "col-mono"
|
||||
}
|
||||
],
|
||||
"row_actions": [
|
||||
{
|
||||
"client_requirement": "client_is_administrator+",
|
||||
"action": "/action/dnsblocking_tableblocklists_rowedit",
|
||||
"method": "inline_edit",
|
||||
"text": "Edit",
|
||||
"class": "btn-ghost btn-sm",
|
||||
"fields": [
|
||||
{
|
||||
"col": "name",
|
||||
"input_type": "text",
|
||||
"validate": "dashname"
|
||||
},
|
||||
{
|
||||
"col": "description",
|
||||
"input_type": "text"
|
||||
},
|
||||
{
|
||||
"col": "format",
|
||||
"input_type": "select",
|
||||
"options": "%BLOCKLIST_FORMAT_OPTIONS%"
|
||||
},
|
||||
{
|
||||
"col": "url",
|
||||
"input_type": "text",
|
||||
"validate": "url"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"client_requirement": "client_is_administrator+",
|
||||
"action": "/action/dnsblocking_tableblocklists_rowdelete",
|
||||
"method": "post",
|
||||
"text": "Delete",
|
||||
"class": "btn-danger btn-sm"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "card",
|
||||
"id": "add-form",
|
||||
"label": "Add Blocklist",
|
||||
"client_requirement": "client_is_administrator+",
|
||||
"items": [
|
||||
{
|
||||
"type": "form",
|
||||
"action": "/action/dnsblocking_cardaddblocklist_add",
|
||||
"method": "post",
|
||||
"items": [
|
||||
{
|
||||
"type": "field",
|
||||
"label": "Name",
|
||||
"name": "name",
|
||||
"input_type": "text",
|
||||
"validate": "dashname",
|
||||
"placeholder": "e.g. steven-black"
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"label": "Description",
|
||||
"name": "description",
|
||||
"input_type": "text",
|
||||
"placeholder": "e.g. Steven Black (ads, malware, trackers)"
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"label": "Format",
|
||||
"name": "format",
|
||||
"input_type": "select",
|
||||
"options": "%BLOCKLIST_FORMAT_OPTIONS%"
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"label": "Source URL",
|
||||
"name": "url",
|
||||
"input_type": "text",
|
||||
"validate": "url",
|
||||
"placeholder": "https://..."
|
||||
},
|
||||
{
|
||||
"type": "button_row",
|
||||
"items": [
|
||||
{
|
||||
"type": "button_primary",
|
||||
"action": "/action/dnsblocking_cardaddblocklist_add",
|
||||
"method": "post",
|
||||
"text": "Add Blocklist"
|
||||
},
|
||||
{
|
||||
"type": "button_cancel",
|
||||
"text": "Cancel"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "card",
|
||||
"label": "Blocklist Refresh",
|
||||
"client_requirement": "client_is_administrator+",
|
||||
"items": [
|
||||
{
|
||||
"type": "raw_html",
|
||||
"html": "%BLOCKLIST_STATS_HTML%"
|
||||
},
|
||||
{
|
||||
"type": "hr"
|
||||
},
|
||||
{
|
||||
"type": "button_row",
|
||||
"items": [
|
||||
{
|
||||
"type": "button_secondary",
|
||||
"action": "/action/dnsblocking_cardblocklistrefresh_refreshnow",
|
||||
"method": "post",
|
||||
"text": "Refresh All Now"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "hr"
|
||||
},
|
||||
{
|
||||
"type": "form",
|
||||
"action": "/action/dnsblocking_cardblocklistrefresh_save",
|
||||
"method": "post",
|
||||
"items": [
|
||||
{
|
||||
"type": "field",
|
||||
"label": "Daily Refresh Time",
|
||||
"name": "daily_execute_time_24hr_local",
|
||||
"input_type": "text",
|
||||
"validate": "time_24h",
|
||||
"value": "%GENERAL_DAILY_EXECUTE_TIME%",
|
||||
"placeholder": "e.g. 02:30",
|
||||
"hint": "24-hour local time for the daily blocklist refresh."
|
||||
},
|
||||
{
|
||||
"type": "button_row",
|
||||
"items": [
|
||||
{
|
||||
"type": "button_primary",
|
||||
"action": "/action/dnsblocking_cardblocklistrefresh_save",
|
||||
"method": "post",
|
||||
"text": "Save"
|
||||
},
|
||||
{
|
||||
"type": "button_cancel",
|
||||
"text": "Cancel"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "card",
|
||||
"label": "Logging",
|
||||
"client_requirement": "client_is_administrator+",
|
||||
"items": [
|
||||
{
|
||||
"type": "form",
|
||||
"action": "/action/dnsblocking_cardlogging_save",
|
||||
"method": "post",
|
||||
"items": [
|
||||
{
|
||||
"type": "field",
|
||||
"label": "Max Log Size (KB)",
|
||||
"name": "log_max_kb",
|
||||
"input_type": "number",
|
||||
"value": "%GENERAL_LOG_MAX_KB%",
|
||||
"min": 64,
|
||||
"hint": "Log is cleared and restarted when it exceeds this size."
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"label": "Only record errors to log",
|
||||
"name": "log_errors_only",
|
||||
"input_type": "checkbox",
|
||||
"value": "%GENERAL_LOG_ERRORS_ONLY%",
|
||||
"hint": "Only write error-level messages to the log."
|
||||
},
|
||||
{
|
||||
"type": "button_row",
|
||||
"items": [
|
||||
{
|
||||
"type": "button_primary",
|
||||
"action": "/action/dnsblocking_cardlogging_save",
|
||||
"method": "post",
|
||||
"text": "Save"
|
||||
},
|
||||
{
|
||||
"type": "button_cancel",
|
||||
"text": "Cancel"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue