Development
This commit is contained in:
parent
9e290d958a
commit
e559018615
2 changed files with 4 additions and 0 deletions
|
|
@ -200,6 +200,9 @@ def networklayout_tablevlans_edit():
|
||||||
new_identities.append(entry)
|
new_identities.append(entry)
|
||||||
|
|
||||||
gateway_raw = sanitize.ip(request.form.get('gateway', ''))
|
gateway_raw = sanitize.ip(request.form.get('gateway', ''))
|
||||||
|
if gateway_raw and gateway_raw not in identity_ips:
|
||||||
|
flash(f"Gateway '{gateway_raw}' must match one of the server identity IPs.", 'error')
|
||||||
|
return redirect(VIEW)
|
||||||
inferred_gw = (min(identity_ips, key=lambda ip: int(ip.split('.')[-1]))
|
inferred_gw = (min(identity_ips, key=lambda ip: int(ip.split('.')[-1]))
|
||||||
if identity_ips else '')
|
if identity_ips else '')
|
||||||
new_stored_gw = gateway_raw if (gateway_raw and gateway_raw != inferred_gw) else ''
|
new_stored_gw = gateway_raw if (gateway_raw and gateway_raw != inferred_gw) else ''
|
||||||
|
|
|
||||||
|
|
@ -1581,6 +1581,7 @@
|
||||||
"col": "server_identity_ips",
|
"col": "server_identity_ips",
|
||||||
"input_type": "textarea_pair",
|
"input_type": "textarea_pair",
|
||||||
"col_label": "IP Address",
|
"col_label": "IP Address",
|
||||||
|
"col_validate": "ip",
|
||||||
"pair_col": "server_identity_descriptions",
|
"pair_col": "server_identity_descriptions",
|
||||||
"pair_label": "Description (Opt)",
|
"pair_label": "Description (Opt)",
|
||||||
"pair_col2": "server_identity_hostnames",
|
"pair_col2": "server_identity_hostnames",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue