Development
This commit is contained in:
parent
e77ebdb100
commit
226a2e2e06
10 changed files with 444 additions and 368 deletions
|
|
@ -499,7 +499,7 @@
|
|||
"items": [
|
||||
{
|
||||
"type": "form",
|
||||
"action": "/action/apply_interface",
|
||||
"action": "/action/general_cardnetworkinterface_save",
|
||||
"method": "post",
|
||||
"items": [
|
||||
{
|
||||
|
|
@ -524,7 +524,7 @@
|
|||
{
|
||||
"type": "button_primary",
|
||||
"text": "Save",
|
||||
"action": "/action/apply_interface",
|
||||
"action": "/action/general_cardnetworkinterface_save",
|
||||
"method": "post"
|
||||
},
|
||||
{
|
||||
|
|
@ -537,6 +537,62 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "card",
|
||||
"label": "Upstream DNS",
|
||||
"items": [
|
||||
{
|
||||
"type": "form",
|
||||
"action": "/action/general_cardupstreamdns_save",
|
||||
"method": "post",
|
||||
"items": [
|
||||
{
|
||||
"type": "field",
|
||||
"label": "Strict Order",
|
||||
"name": "strict_order",
|
||||
"input_type": "checkbox",
|
||||
"value": "%DNS_STRICT_ORDER%",
|
||||
"hint": "Query DNS providers in list order rather than in parallel."
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"label": "Cache Size",
|
||||
"name": "cache_size",
|
||||
"input_type": "number",
|
||||
"value": "%DNS_CACHE_SIZE%",
|
||||
"min": 0,
|
||||
"hint": "Max DNS responses to cache per instance. Set to 0 to disable caching."
|
||||
},
|
||||
{
|
||||
"type": "editable_list",
|
||||
"label": "DNS Providers",
|
||||
"name": "upstream_servers",
|
||||
"items": "%DNS_UPSTREAM_SERVERS_JSON%",
|
||||
"item_placeholder": "e.g. 1.1.1.1",
|
||||
"add_label": "Add Provider",
|
||||
"validate": "ip",
|
||||
"hint": "DNS resolvers queried for external hostnames. Supports IPv4 and IPv6."
|
||||
},
|
||||
{
|
||||
"type": "button_row",
|
||||
"items": [
|
||||
{
|
||||
"type": "button_primary",
|
||||
"text": "Save",
|
||||
"action": "/action/general_cardupstreamdns_save",
|
||||
"method": "post"
|
||||
},
|
||||
{
|
||||
"type": "button_cancel",
|
||||
"text": "Cancel"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"client_requirement": "client_is_administrator+"
|
||||
},
|
||||
{
|
||||
"type": "card",
|
||||
"id": "iface-config-card",
|
||||
|
|
@ -578,12 +634,30 @@
|
|||
"input_type": "select",
|
||||
"value": "",
|
||||
"options": [
|
||||
{"value": "576", "label": "576"},
|
||||
{"value": "1280", "label": "1280"},
|
||||
{"value": "1492", "label": "1492"},
|
||||
{"value": "1500", "label": "1500"},
|
||||
{"value": "4096", "label": "4096"},
|
||||
{"value": "9000", "label": "9000"}
|
||||
{
|
||||
"value": "576",
|
||||
"label": "576"
|
||||
},
|
||||
{
|
||||
"value": "1280",
|
||||
"label": "1280"
|
||||
},
|
||||
{
|
||||
"value": "1492",
|
||||
"label": "1492"
|
||||
},
|
||||
{
|
||||
"value": "1500",
|
||||
"label": "1500"
|
||||
},
|
||||
{
|
||||
"value": "4096",
|
||||
"label": "4096"
|
||||
},
|
||||
{
|
||||
"value": "9000",
|
||||
"label": "9000"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -623,7 +697,7 @@
|
|||
"items": [
|
||||
{
|
||||
"type": "form",
|
||||
"action": "/action/apply_general",
|
||||
"action": "/action/general_cardlogging_save",
|
||||
"method": "post",
|
||||
"items": [
|
||||
{
|
||||
|
|
@ -651,22 +725,13 @@
|
|||
"value": "%GENERAL_DNSMASQ_LOG_QUERIES%",
|
||||
"hint": "Log every DNS query. High volume \u2014 enable for debugging only."
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"label": "Daily Task Time",
|
||||
"name": "daily_execute_time_24hr_local",
|
||||
"input_type": "text",
|
||||
"value": "%GENERAL_DAILY_EXECUTE_TIME%",
|
||||
"placeholder": "e.g. 02:30",
|
||||
"hint": "24-hour local time for the daily blocklist refresh timer."
|
||||
},
|
||||
{
|
||||
"type": "button_row",
|
||||
"items": [
|
||||
{
|
||||
"type": "button_primary",
|
||||
"text": "Save",
|
||||
"action": "/action/apply_general",
|
||||
"action": "/action/general_cardlogging_save",
|
||||
"method": "post"
|
||||
},
|
||||
{
|
||||
|
|
@ -682,12 +747,12 @@
|
|||
},
|
||||
{
|
||||
"type": "card",
|
||||
"label": "Configuration Changes",
|
||||
"label": "Pending Changes",
|
||||
"client_requirement": "client_is_administrator+",
|
||||
"items": [
|
||||
{
|
||||
"type": "form",
|
||||
"action": "/action/apply_general",
|
||||
"action": "/action/general_cardpendingchanges_save",
|
||||
"method": "post",
|
||||
"items": [
|
||||
{
|
||||
|
|
@ -704,7 +769,7 @@
|
|||
{
|
||||
"type": "button_primary",
|
||||
"text": "Save",
|
||||
"action": "/action/apply_general",
|
||||
"action": "/action/general_cardpendingchanges_save",
|
||||
"method": "post"
|
||||
},
|
||||
{
|
||||
|
|
@ -723,81 +788,6 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "view_upstream_dns",
|
||||
"client_requirement": "client_is_viewer+",
|
||||
"items": [
|
||||
{
|
||||
"type": "page_header",
|
||||
"items": [
|
||||
{
|
||||
"type": "h1",
|
||||
"text": "Upstream DNS"
|
||||
},
|
||||
{
|
||||
"type": "p",
|
||||
"text": "Upstream resolvers and caching behaviour for dnsmasq."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "card",
|
||||
"label": "Upstream DNS Settings",
|
||||
"items": [
|
||||
{
|
||||
"type": "form",
|
||||
"action": "/action/apply_upstream_dns",
|
||||
"method": "post",
|
||||
"items": [
|
||||
{
|
||||
"type": "field",
|
||||
"label": "Strict Order",
|
||||
"name": "strict_order",
|
||||
"input_type": "checkbox",
|
||||
"value": "%DNS_STRICT_ORDER%",
|
||||
"hint": "Query DNS providers in list order rather than in parallel."
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"label": "Cache Size",
|
||||
"name": "cache_size",
|
||||
"input_type": "number",
|
||||
"value": "%DNS_CACHE_SIZE%",
|
||||
"min": 0,
|
||||
"hint": "Max DNS responses to cache per instance. Set to 0 to disable caching."
|
||||
},
|
||||
{
|
||||
"type": "editable_list",
|
||||
"label": "DNS Providers",
|
||||
"name": "upstream_servers",
|
||||
"items": "%DNS_UPSTREAM_SERVERS_JSON%",
|
||||
"item_placeholder": "e.g. 1.1.1.1",
|
||||
"add_label": "Add Provider",
|
||||
"validate": "ip",
|
||||
"hint": "DNS resolvers queried for external hostnames. Supports IPv4 and IPv6."
|
||||
},
|
||||
{
|
||||
"type": "button_row",
|
||||
"items": [
|
||||
{
|
||||
"type": "button_primary",
|
||||
"text": "Save",
|
||||
"action": "/action/apply_upstream_dns",
|
||||
"method": "post"
|
||||
},
|
||||
{
|
||||
"type": "button_cancel",
|
||||
"text": "Cancel"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"client_requirement": "client_is_administrator+"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "view_banned_ips",
|
||||
"client_requirement": "client_is_viewer+",
|
||||
|
|
@ -1053,7 +1043,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"id": "view_blocklists",
|
||||
"id": "view_dns_server",
|
||||
"client_requirement": "client_is_viewer+",
|
||||
"items": [
|
||||
{
|
||||
|
|
@ -1061,11 +1051,11 @@
|
|||
"items": [
|
||||
{
|
||||
"type": "h1",
|
||||
"text": "DNS Blocklists"
|
||||
"text": "DNS Server"
|
||||
},
|
||||
{
|
||||
"type": "p",
|
||||
"text": "Upstream blocklist sources downloaded and merged by the daily systemd timer."
|
||||
"text": "Blocklist sources and DNS server settings."
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -1093,22 +1083,11 @@
|
|||
"class": "col-mono"
|
||||
}
|
||||
],
|
||||
"toolbar": {
|
||||
"items": [
|
||||
{
|
||||
"type": "button_secondary",
|
||||
"text": "Refresh All Now",
|
||||
"action": "/action/update_blocklists",
|
||||
"method": "post",
|
||||
"client_requirement": "client_is_administrator+"
|
||||
}
|
||||
]
|
||||
},
|
||||
"row_actions": [
|
||||
{
|
||||
"text": "Edit",
|
||||
"class": "btn-ghost btn-sm",
|
||||
"action": "/action/edit_blocklist",
|
||||
"action": "/action/dnsserver_tableblocklist_rowedit",
|
||||
"method": "inline_edit",
|
||||
"client_requirement": "client_is_administrator+",
|
||||
"fields": [
|
||||
|
|
@ -1136,7 +1115,7 @@
|
|||
{
|
||||
"text": "Delete",
|
||||
"class": "btn-danger btn-sm",
|
||||
"action": "/action/delete_blocklist",
|
||||
"action": "/action/dnsserver_tableblocklists_rowdelete",
|
||||
"method": "post",
|
||||
"client_requirement": "client_is_administrator+"
|
||||
}
|
||||
|
|
@ -1150,7 +1129,7 @@
|
|||
"items": [
|
||||
{
|
||||
"type": "form",
|
||||
"action": "/action/add_blocklist",
|
||||
"action": "/action/dnsserver_cardaddblocklist_add",
|
||||
"method": "post",
|
||||
"items": [
|
||||
{
|
||||
|
|
@ -1189,7 +1168,60 @@
|
|||
{
|
||||
"type": "button_primary",
|
||||
"text": "Add Blocklist",
|
||||
"action": "/action/add_blocklist",
|
||||
"action": "/action/dnsserver_cardaddblocklist_add",
|
||||
"method": "post"
|
||||
},
|
||||
{
|
||||
"type": "button_cancel",
|
||||
"text": "Cancel"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "card",
|
||||
"label": "Blocklist Refresh",
|
||||
"client_requirement": "client_is_administrator+",
|
||||
"items": [
|
||||
{
|
||||
"type": "raw_html",
|
||||
"html": "%BLOCKLIST_STATS_HTML%"
|
||||
},
|
||||
{
|
||||
"type": "button_row",
|
||||
"items": [
|
||||
{
|
||||
"type": "button_secondary",
|
||||
"text": "Refresh All Now",
|
||||
"action": "/action/dnsserver_cardblocklistrefresh_refresh",
|
||||
"method": "post"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "form",
|
||||
"action": "/action/dnsserver_cardblocklistrefresh_save",
|
||||
"method": "post",
|
||||
"items": [
|
||||
{
|
||||
"type": "field",
|
||||
"label": "Daily Task Time",
|
||||
"name": "daily_execute_time_24hr_local",
|
||||
"input_type": "text",
|
||||
"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",
|
||||
"text": "Save",
|
||||
"action": "/action/dnsserver_cardblocklistrefresh_save",
|
||||
"method": "post"
|
||||
},
|
||||
{
|
||||
|
|
@ -2738,4 +2770,4 @@
|
|||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue