Development
This commit is contained in:
parent
ead6926bf9
commit
096904c723
4 changed files with 13 additions and 8 deletions
|
|
@ -353,6 +353,7 @@
|
|||
"label": "%RESTRICTED_VLAN_LABEL%",
|
||||
"name": "restricted_vlan",
|
||||
"input_type": "checkbox",
|
||||
"disabled": "%RESTRICTED_VLAN_DISABLED%",
|
||||
"hint": "Block devices on this VLAN from communicating with the Internet. Block all LAN traffic as well (except where Inter-VLAN-Exception rules allow)."
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ def collect_tokens(cfg):
|
|||
tokens['EXISTING_VLAN_NAMES_JSON'] = json.dumps([v.get('name') for v in vlans])
|
||||
tokens['RADIUS_DEFAULT_VLAN'] = f'"{dv["name"]}" (VLAN {dv["vlan_id"]})' if dv else 'none set'
|
||||
tokens['RESTRICTED_VLAN_LABEL'] = 'Restricted VLAN' if PRO_LICENSE else 'Restricted VLAN (PRO FEATURE)'
|
||||
tokens['RESTRICTED_VLAN_DISABLED'] = '' if PRO_LICENSE else 'true'
|
||||
tokens['BLOCKLIST_NAME_OPTIONS'] = json.dumps([
|
||||
{'value': bl.get('name', ''), 'label': bl.get('description', bl.get('name', ''))}
|
||||
for bl in cfg.get('dns_blocking', {}).get('blocklists', [])
|
||||
|
|
|
|||
|
|
@ -69,11 +69,12 @@ def collect_tokens(cfg):
|
|||
fr_gen = fr.get('general', {})
|
||||
tokens['RADIUS_MAC_FORMAT'] = fr_opts.get('mac_format', 'aabbccddeeff')
|
||||
tokens['RADIUS_AUTH_MODE'] = fr_opts.get('auth_mode', 'mab')
|
||||
pro_suffix = '' if PRO_LICENSE else ' (PRO REQUIRED)'
|
||||
pro_suffix = '' if PRO_LICENSE else ' (PRO REQUIRED)'
|
||||
pro_disabled = not PRO_LICENSE
|
||||
tokens['RADIUS_AUTH_MODE_OPTIONS'] = json.dumps([
|
||||
{'value': 'mab', 'label': 'MAC Authentication Bypass (MAB)'},
|
||||
{'value': 'eap_password', 'label': f'802.1X - Client Username/Password{pro_suffix}'},
|
||||
{'value': 'eap_credential', 'label': f'802.1X - Client Certificate{pro_suffix}'},
|
||||
{'value': 'mab', 'label': 'MAC Authentication Bypass (MAB)'},
|
||||
{'value': 'eap_password', 'label': f'802.1X - Client Username/Password{pro_suffix}', 'disabled': pro_disabled},
|
||||
{'value': 'eap_credential', 'label': f'802.1X - Client Certificate{pro_suffix}', 'disabled': pro_disabled},
|
||||
])
|
||||
tokens['RADIUS_APPLY_TO'] = fr_opts.get('apply_to', 'all')
|
||||
tokens['RADIUS_AP_IPS'] = json.dumps(fr_opts.get('ap_ips', []))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue