linuxrouter/docker/routlin-dash/app/pages/dnsblocking/content.json
2026-05-31 00:22:39 -04:00

246 lines
No EOL
6.6 KiB
JSON

{
"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/blocklists_edit",
"method": "inline_edit",
"text": "Edit",
"class": "btn-ghost btn-sm",
"fields": [
{
"col": "name",
"input_type": "text",
"validate": "VALIDATION_DASH_NAME"
},
{
"col": "description",
"input_type": "text"
},
{
"col": "format",
"input_type": "select",
"options": "%BLOCKLIST_FORMAT_OPTIONS%"
},
{
"col": "url",
"input_type": "text",
"validate": "VALIDATION_URL"
}
]
},
{
"client_requirement": "client_is_administrator+",
"action": "/action/dnsblocking/blocklists_delete",
"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/addblocklist_add",
"method": "post",
"items": [
{
"type": "field",
"label": "Name",
"name": "name",
"input_type": "text",
"validate": "VALIDATION_DASH_NAME",
"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": "VALIDATION_URL",
"placeholder": "https://..."
},
{
"type": "button_row",
"items": [
{
"type": "button_primary",
"action": "/action/dnsblocking/addblocklist_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/blocklistrefresh_refresh",
"method": "post",
"text": "Refresh All Now"
}
]
},
{
"type": "hr"
},
{
"type": "form",
"action": "/action/dnsblocking/blocklistrefresh_save",
"method": "post",
"items": [
{
"type": "field",
"label": "Daily Refresh Time",
"name": "daily_execute_time_24hr_local",
"input_type": "text",
"validate": "VALIDATION_TIME24H",
"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/blocklistrefresh_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/logging_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/logging_save",
"method": "post",
"text": "Save"
},
{
"type": "button_cancel",
"text": "Cancel"
}
]
}
]
}
]
}
]
}