Development

This commit is contained in:
Matthew Grotke 2026-06-07 01:24:37 -04:00
parent 8bd5d022e0
commit e140628c5e
2 changed files with 4 additions and 4 deletions

View file

@ -68,16 +68,16 @@ def collect_tokens(cfg):
'<span>Client Credentials is a Routlin Pro feature. '
'Credentials can be viewed but not added or edited without a Pro license.</span></div>'
)
tokens['ADD_CREDENTIAL_DISABLED'] = '' if PRO_LICENSE else 'true'
tokens['ADD_CREDENTIAL_DISABLED'] = 'true'
vlans = [v for v in cfg.get('vlans', []) if not v.get('is_vpn')]
tokens['VLAN_OPTIONS'] = json.dumps(
[{'value': '', 'label': '— Select VLAN —'}] +
[{'value': '', 'label': '- Select VLAN -'}] +
[{'value': v['name'], 'label': f"{v['name']} (VLAN {v['vlan_id']})"} for v in vlans]
)
captive_vlans = [v for v in cfg.get('vlans', []) if v.get('restricted_vlan') == 'c']
tokens['CAPTIVE_VLAN_OPTIONS'] = json.dumps(
[{'value': '', 'label': '— Select VLAN —'}] +
[{'value': '', 'label': '- Select VLAN -'}] +
[{'value': v['name'], 'label': f"{v['name']} (VLAN {v['vlan_id']})"} for v in captive_vlans]
)