Development
This commit is contained in:
parent
8c483e52ed
commit
44277f9064
2 changed files with 6 additions and 4 deletions
|
|
@ -177,7 +177,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "record_editor",
|
"type": "record_editor",
|
||||||
"label": "Router identities on this VLAN",
|
"label": "Router's identities on this VLAN",
|
||||||
"name": "server_identities",
|
"name": "server_identities",
|
||||||
"empty_message": "No identities added.",
|
"empty_message": "No identities added.",
|
||||||
"fields": [
|
"fields": [
|
||||||
|
|
@ -264,14 +264,14 @@
|
||||||
"label": "RADIUS Default",
|
"label": "RADIUS Default",
|
||||||
"name": "radius_default",
|
"name": "radius_default",
|
||||||
"input_type": "checkbox",
|
"input_type": "checkbox",
|
||||||
"hint": "Wireless devices without a DHCP reservation will be placed into this VLAN. (Note: wired devices are not placed via RADIUS but rather by layer 3 switch policy.)"
|
"hint": "Clients without a DHCP reservation will be placed into this VLAN (requires layer 3 switch). Note: current default is %RADIUS_DEFAULT_VLAN%."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "field",
|
"type": "field",
|
||||||
"label": "mDNS Reflection",
|
"label": "mDNS Reflection",
|
||||||
"name": "mdns_reflection",
|
"name": "mdns_reflection",
|
||||||
"input_type": "checkbox",
|
"input_type": "checkbox",
|
||||||
"hint": "Reflect mDNS traffic to/from this VLAN via avahi-daemon. Not supported on WireGuard interfaces."
|
"hint": "Reflect mDNS traffic to/from this VLAN via avahi-daemon. Not supported VPN VLANs."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "field",
|
"type": "field",
|
||||||
|
|
|
||||||
|
|
@ -772,7 +772,9 @@ def collect_tokens():
|
||||||
tokens['VLAN_FILTER_OPTIONS'] = filter_opts
|
tokens['VLAN_FILTER_OPTIONS'] = filter_opts
|
||||||
tokens['VLAN_NAMES_AS_OPTIONS'] = json.dumps([{'value': n, 'label': n} for n in vlan_names])
|
tokens['VLAN_NAMES_AS_OPTIONS'] = json.dumps([{'value': n, 'label': n} for n in vlan_names])
|
||||||
tokens['VPN_VLAN_COUNT'] = str(sum(1 for v in vlans if v.get('is_vpn')))
|
tokens['VPN_VLAN_COUNT'] = str(sum(1 for v in vlans if v.get('is_vpn')))
|
||||||
tokens['EXISTING_VLAN_IDS_JSON'] = json.dumps([v.get('vlan_id') for v in vlans])
|
tokens['EXISTING_VLAN_IDS_JSON'] = json.dumps([v.get('vlan_id') for v in vlans])
|
||||||
|
_default_vlan = next((v.get('name', '') for v in vlans if v.get('radius_default')), None)
|
||||||
|
tokens['RADIUS_DEFAULT_VLAN'] = _default_vlan if _default_vlan else 'none set'
|
||||||
tokens['STAT_BANNED_IP_COUNT'] = str(sum(1 for b in cfg.get('banned_ips', []) if b.get('enabled', True)))
|
tokens['STAT_BANNED_IP_COUNT'] = str(sum(1 for b in cfg.get('banned_ips', []) if b.get('enabled', True)))
|
||||||
tokens['STAT_BLOCKLIST_COUNT'] = str(len(cfg.get('dns_blocking', {}).get('blocklists', [])))
|
tokens['STAT_BLOCKLIST_COUNT'] = str(len(cfg.get('dns_blocking', {}).get('blocklists', [])))
|
||||||
tokens['BLOCKLIST_STATS_HTML'] = _blocklist_stats_html(cfg)
|
tokens['BLOCKLIST_STATS_HTML'] = _blocklist_stats_html(cfg)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue