Development
This commit is contained in:
parent
a6031616df
commit
47b0e98e31
9 changed files with 304 additions and 0 deletions
|
|
@ -1,6 +1,9 @@
|
|||
import json
|
||||
from config_utils import collect_layout_tokens, load_datasource
|
||||
from factory import load_json, build_table, table_token_key, iter_table_items, PAGES_DIR
|
||||
import license
|
||||
|
||||
PRO_LICENSE = license.is_pro()
|
||||
|
||||
|
||||
def collect_tokens(cfg):
|
||||
|
|
@ -10,6 +13,7 @@ def collect_tokens(cfg):
|
|||
tokens['EXISTING_VLAN_IDS_JSON'] = json.dumps([v.get('vlan_id') for v in vlans])
|
||||
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['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', [])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue