Development
This commit is contained in:
parent
5cd469f898
commit
2d28b4b752
8 changed files with 414 additions and 351 deletions
|
|
@ -492,205 +492,6 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "card",
|
||||
"label": "Network Interfaces",
|
||||
"client_requirement": "client_is_administrator+",
|
||||
"items": [
|
||||
{
|
||||
"type": "form",
|
||||
"action": "/action/general_cardnetworkinterface_save",
|
||||
"method": "post",
|
||||
"items": [
|
||||
{
|
||||
"type": "field",
|
||||
"label": "WAN Interface",
|
||||
"name": "wan_interface",
|
||||
"input_type": "interface_picker",
|
||||
"value": "%GENERAL_WAN_INTERFACE%",
|
||||
"data": "%NETWORK_INTERFACE_DATA_JSON%"
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"label": "LAN Interface",
|
||||
"name": "lan_interface",
|
||||
"input_type": "interface_picker",
|
||||
"value": "%GENERAL_LAN_INTERFACE%",
|
||||
"data": "%NETWORK_INTERFACE_DATA_JSON%"
|
||||
},
|
||||
{
|
||||
"type": "button_row",
|
||||
"items": [
|
||||
{
|
||||
"type": "button_primary",
|
||||
"action": "/action/general_cardnetworkinterface_save",
|
||||
"method": "post",
|
||||
"text": "Save"
|
||||
},
|
||||
{
|
||||
"type": "button_cancel",
|
||||
"text": "Cancel"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "card",
|
||||
"id": "iface-config-card",
|
||||
"label": "Interface Configuration",
|
||||
"hidden": true,
|
||||
"client_requirement": "client_is_administrator+",
|
||||
"items": [
|
||||
{
|
||||
"type": "form",
|
||||
"action": "/action/apply_iface_config",
|
||||
"method": "post",
|
||||
"items": [
|
||||
{
|
||||
"type": "hidden",
|
||||
"name": "original_mtu",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"type": "hidden",
|
||||
"name": "original_mac",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"type": "field_row",
|
||||
"cols": 3,
|
||||
"items": [
|
||||
{
|
||||
"type": "field",
|
||||
"label": "Interface",
|
||||
"name": "iface",
|
||||
"input_type": "text",
|
||||
"readonly": true,
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"label": "MTU",
|
||||
"name": "mtu",
|
||||
"input_type": "select",
|
||||
"value": "",
|
||||
"options": [
|
||||
{
|
||||
"label": "576",
|
||||
"value": "576"
|
||||
},
|
||||
{
|
||||
"label": "1280",
|
||||
"value": "1280"
|
||||
},
|
||||
{
|
||||
"label": "1492",
|
||||
"value": "1492"
|
||||
},
|
||||
{
|
||||
"label": "1500",
|
||||
"value": "1500"
|
||||
},
|
||||
{
|
||||
"label": "4096",
|
||||
"value": "4096"
|
||||
},
|
||||
{
|
||||
"label": "9000",
|
||||
"value": "9000"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"label": "MAC Address",
|
||||
"name": "mac",
|
||||
"input_type": "text",
|
||||
"validate": "mac",
|
||||
"value": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "button_row",
|
||||
"items": [
|
||||
{
|
||||
"type": "button_primary",
|
||||
"action": "/action/apply_iface_config",
|
||||
"method": "post",
|
||||
"text": "Apply"
|
||||
},
|
||||
{
|
||||
"type": "button_secondary",
|
||||
"action": "#",
|
||||
"text": "Cancel",
|
||||
"class": "iface-config-cancel"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "card",
|
||||
"label": "Upstream DNS",
|
||||
"client_requirement": "client_is_administrator+",
|
||||
"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",
|
||||
"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.",
|
||||
"items": "%DNS_UPSTREAM_SERVERS_JSON%"
|
||||
},
|
||||
{
|
||||
"type": "button_row",
|
||||
"items": [
|
||||
{
|
||||
"type": "button_primary",
|
||||
"action": "/action/general_cardupstreamdns_save",
|
||||
"method": "post",
|
||||
"text": "Save"
|
||||
},
|
||||
{
|
||||
"type": "button_cancel",
|
||||
"text": "Cancel"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "card",
|
||||
"label": "Logging",
|
||||
|
|
@ -788,6 +589,243 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "view_network_interfaces",
|
||||
"client_requirement": "client_is_administrator+",
|
||||
"items": [
|
||||
{
|
||||
"type": "page_header",
|
||||
"items": [
|
||||
{
|
||||
"type": "h1",
|
||||
"text": "Network Interfaces"
|
||||
},
|
||||
{
|
||||
"type": "p",
|
||||
"text": "WAN/LAN interface assignments and per-interface settings."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "card",
|
||||
"label": "Network Interfaces",
|
||||
"client_requirement": "client_is_administrator+",
|
||||
"items": [
|
||||
{
|
||||
"type": "form",
|
||||
"action": "/action/networkinterfaces_cardnetworkinterface_save",
|
||||
"method": "post",
|
||||
"items": [
|
||||
{
|
||||
"type": "field",
|
||||
"label": "WAN Interface",
|
||||
"name": "wan_interface",
|
||||
"input_type": "interface_picker",
|
||||
"value": "%GENERAL_WAN_INTERFACE%",
|
||||
"data": "%NETWORK_INTERFACE_DATA_JSON%"
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"label": "LAN Interface",
|
||||
"name": "lan_interface",
|
||||
"input_type": "interface_picker",
|
||||
"value": "%GENERAL_LAN_INTERFACE%",
|
||||
"data": "%NETWORK_INTERFACE_DATA_JSON%"
|
||||
},
|
||||
{
|
||||
"type": "button_row",
|
||||
"items": [
|
||||
{
|
||||
"type": "button_primary",
|
||||
"action": "/action/networkinterfaces_cardnetworkinterface_save",
|
||||
"method": "post",
|
||||
"text": "Save"
|
||||
},
|
||||
{
|
||||
"type": "button_cancel",
|
||||
"text": "Cancel"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "card",
|
||||
"id": "iface-config-card",
|
||||
"label": "Interface Configuration",
|
||||
"hidden": true,
|
||||
"client_requirement": "client_is_administrator+",
|
||||
"items": [
|
||||
{
|
||||
"type": "form",
|
||||
"action": "/action/networkinterfaces_cardinterfaceconfiguration_apply",
|
||||
"method": "post",
|
||||
"items": [
|
||||
{
|
||||
"type": "hidden",
|
||||
"name": "original_mtu",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"type": "hidden",
|
||||
"name": "original_mac",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"type": "field_row",
|
||||
"cols": 3,
|
||||
"items": [
|
||||
{
|
||||
"type": "field",
|
||||
"label": "Interface",
|
||||
"name": "iface",
|
||||
"input_type": "text",
|
||||
"readonly": true,
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"label": "MTU",
|
||||
"name": "mtu",
|
||||
"input_type": "select",
|
||||
"value": "",
|
||||
"options": [
|
||||
{
|
||||
"label": "576",
|
||||
"value": "576"
|
||||
},
|
||||
{
|
||||
"label": "1280",
|
||||
"value": "1280"
|
||||
},
|
||||
{
|
||||
"label": "1492",
|
||||
"value": "1492"
|
||||
},
|
||||
{
|
||||
"label": "1500",
|
||||
"value": "1500"
|
||||
},
|
||||
{
|
||||
"label": "4096",
|
||||
"value": "4096"
|
||||
},
|
||||
{
|
||||
"label": "9000",
|
||||
"value": "9000"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"label": "MAC Address",
|
||||
"name": "mac",
|
||||
"input_type": "text",
|
||||
"validate": "mac",
|
||||
"value": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "button_row",
|
||||
"items": [
|
||||
{
|
||||
"type": "button_primary",
|
||||
"action": "/action/networkinterfaces_cardinterfaceconfiguration_apply",
|
||||
"method": "post",
|
||||
"text": "Apply"
|
||||
},
|
||||
{
|
||||
"type": "button_secondary",
|
||||
"action": "#",
|
||||
"text": "Cancel",
|
||||
"class": "iface-config-cancel"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "view_upstream_dns",
|
||||
"client_requirement": "client_is_administrator+",
|
||||
"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",
|
||||
"client_requirement": "client_is_administrator+",
|
||||
"items": [
|
||||
{
|
||||
"type": "form",
|
||||
"action": "/action/upstreamdns_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",
|
||||
"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.",
|
||||
"items": "%DNS_UPSTREAM_SERVERS_JSON%"
|
||||
},
|
||||
{
|
||||
"type": "button_row",
|
||||
"items": [
|
||||
{
|
||||
"type": "button_primary",
|
||||
"action": "/action/upstreamdns_cardupstreamdns_save",
|
||||
"method": "post",
|
||||
"text": "Save"
|
||||
},
|
||||
{
|
||||
"type": "button_cancel",
|
||||
"text": "Cancel"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "view_banned_ips",
|
||||
"client_requirement": "client_is_viewer+",
|
||||
|
|
@ -1051,11 +1089,11 @@
|
|||
"items": [
|
||||
{
|
||||
"type": "h1",
|
||||
"text": "DNS Server"
|
||||
"text": "DNS Blocklists"
|
||||
},
|
||||
{
|
||||
"type": "p",
|
||||
"text": "Blocklist sources and DNS server settings."
|
||||
"text": "DNS level blocking via dnsmasq."
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -1086,7 +1124,7 @@
|
|||
"row_actions": [
|
||||
{
|
||||
"client_requirement": "client_is_administrator+",
|
||||
"action": "/action/dnsserver_tableblocklist_rowedit",
|
||||
"action": "/action/dnsblocklists_tableblocklist_rowedit",
|
||||
"method": "inline_edit",
|
||||
"text": "Edit",
|
||||
"class": "btn-ghost btn-sm",
|
||||
|
|
@ -1114,7 +1152,7 @@
|
|||
},
|
||||
{
|
||||
"client_requirement": "client_is_administrator+",
|
||||
"action": "/action/dnsserver_tableblocklists_rowdelete",
|
||||
"action": "/action/dnsblocklists_tableblocklists_rowdelete",
|
||||
"method": "post",
|
||||
"text": "Delete",
|
||||
"class": "btn-danger btn-sm"
|
||||
|
|
@ -1129,7 +1167,7 @@
|
|||
"items": [
|
||||
{
|
||||
"type": "form",
|
||||
"action": "/action/dnsserver_cardaddblocklist_add",
|
||||
"action": "/action/dnsblocklists_cardaddblocklist_add",
|
||||
"method": "post",
|
||||
"items": [
|
||||
{
|
||||
|
|
@ -1167,7 +1205,7 @@
|
|||
"items": [
|
||||
{
|
||||
"type": "button_primary",
|
||||
"action": "/action/dnsserver_cardaddblocklist_add",
|
||||
"action": "/action/dnsblocklists_cardaddblocklist_add",
|
||||
"method": "post",
|
||||
"text": "Add Blocklist"
|
||||
},
|
||||
|
|
@ -1191,19 +1229,12 @@
|
|||
"html": "%BLOCKLIST_STATS_HTML%"
|
||||
},
|
||||
{
|
||||
"type": "button_row",
|
||||
"items": [
|
||||
{
|
||||
"type": "button_secondary",
|
||||
"action": "/action/dnsserver_cardblocklistrefresh_refresh",
|
||||
"method": "post",
|
||||
"text": "Refresh All Now"
|
||||
}
|
||||
]
|
||||
"type": "raw_html",
|
||||
"html": "<hr class=\"divider\">"
|
||||
},
|
||||
{
|
||||
"type": "form",
|
||||
"action": "/action/dnsserver_cardblocklistrefresh_save",
|
||||
"action": "/action/dnsblocklists_cardblocklistrefresh_save",
|
||||
"method": "post",
|
||||
"items": [
|
||||
{
|
||||
|
|
@ -1220,7 +1251,7 @@
|
|||
"items": [
|
||||
{
|
||||
"type": "button_primary",
|
||||
"action": "/action/dnsserver_cardblocklistrefresh_save",
|
||||
"action": "/action/dnsblocklists_cardblocklistrefresh_save",
|
||||
"method": "post",
|
||||
"text": "Save"
|
||||
},
|
||||
|
|
@ -1231,6 +1262,17 @@
|
|||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "button_row",
|
||||
"items": [
|
||||
{
|
||||
"type": "button_secondary",
|
||||
"action": "/action/dnsblocklists_cardblocklistrefresh_refresh",
|
||||
"method": "post",
|
||||
"text": "Refresh All Now"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue