Development

This commit is contained in:
Matthew Grotke 2026-05-27 00:58:05 -04:00
parent 182e605e4e
commit 9c395ab1e8
3 changed files with 12 additions and 1 deletions

View file

@ -126,6 +126,7 @@ def networklayout_tablevlans_edit():
flash(f"'{raw_ip}' is not a valid IP address.", 'error')
return redirect(VIEW)
identity_ips.append(clean)
identity_descs = request.form.get('server_identity_descriptions', '').splitlines()
subnet_mask_raw = request.form.get('subnet_mask')
if subnet_mask_raw is not None:
@ -181,6 +182,11 @@ def networklayout_tablevlans_edit():
for i, ip in enumerate(identity_ips):
entry = dict(old_identities[i]) if i < len(old_identities) else {}
entry['ip'] = ip
desc = identity_descs[i].strip() if i < len(identity_descs) else ''
if desc:
entry['description'] = desc
else:
entry.pop('description', None)
new_identities.append(entry)
before = {k: existing.get(k) for k in _VLAN_FIELDS}

View file

@ -309,6 +309,9 @@ def _config_datasource(name):
{'n': s['ip'], 'd': s['ip'], 'short': '.' + s['ip'].rsplit('.', 1)[-1], 'mini': '.' + s['ip'].rsplit('.', 1)[-1]}
for s in v.get('server_identities', []) if s.get('ip')
])
row['server_identity_descriptions'] = json.dumps([
s.get('description', '') for s in v.get('server_identities', []) if s.get('ip')
])
rows.append(row)
return rows

View file

@ -1579,7 +1579,9 @@
},
{
"col": "server_identity_ips",
"input_type": "textarea"
"input_type": "textarea_pair",
"pair_col": "server_identity_descriptions",
"pair_placeholder": "Description"
},
{
"col": "radius_default",