Development
This commit is contained in:
parent
578826ee18
commit
392e884611
2 changed files with 13 additions and 13 deletions
|
|
@ -1641,8 +1641,18 @@
|
||||||
"items": [
|
"items": [
|
||||||
{
|
{
|
||||||
"type": "field_row",
|
"type": "field_row",
|
||||||
"cols": 2,
|
"cols": 3,
|
||||||
"items": [
|
"items": [
|
||||||
|
{
|
||||||
|
"type": "field",
|
||||||
|
"label": "VLAN ID",
|
||||||
|
"name": "vlan_id",
|
||||||
|
"input_type": "number",
|
||||||
|
"min": 1,
|
||||||
|
"max": 4094,
|
||||||
|
"class": "vlan-id-input form-input-mono",
|
||||||
|
"hint": "Unique integer 1-4094. Sets the 802.1Q tag and interface name."
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "field",
|
"type": "field",
|
||||||
"label": "VLAN Name",
|
"label": "VLAN Name",
|
||||||
|
|
@ -1662,7 +1672,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "field_row",
|
"type": "field_row",
|
||||||
"cols": 3,
|
"cols": 2,
|
||||||
"items": [
|
"items": [
|
||||||
{
|
{
|
||||||
"type": "field",
|
"type": "field",
|
||||||
|
|
@ -1673,16 +1683,6 @@
|
||||||
"class": "vlan-iface-preview form-input-mono",
|
"class": "vlan-iface-preview form-input-mono",
|
||||||
"value": ""
|
"value": ""
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "field",
|
|
||||||
"label": "VLAN ID",
|
|
||||||
"name": "vlan_id",
|
|
||||||
"input_type": "number",
|
|
||||||
"min": 1,
|
|
||||||
"max": 4094,
|
|
||||||
"class": "vlan-id-input form-input-mono",
|
|
||||||
"hint": "Unique integer 1–4094. Sets the 802.1Q tag and interface name."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "field",
|
"type": "field",
|
||||||
"label": "VLAN Type",
|
"label": "VLAN Type",
|
||||||
|
|
|
||||||
|
|
@ -373,7 +373,7 @@ def validate_config(data):
|
||||||
label = f"vlan '{name}' (id={vlan_id})"
|
label = f"vlan '{name}' (id={vlan_id})"
|
||||||
|
|
||||||
if vlan_id is None or not isinstance(vlan_id, int) or not (1 <= vlan_id <= 4094):
|
if vlan_id is None or not isinstance(vlan_id, int) or not (1 <= vlan_id <= 4094):
|
||||||
errors.append(f"vlan '{name}': vlan_id must be an integer 1–4094 (got {vlan_id!r}).")
|
errors.append(f"vlan '{name}': vlan_id must be an integer 1-4094 (got {vlan_id!r}).")
|
||||||
|
|
||||||
if name in seen_names:
|
if name in seen_names:
|
||||||
errors.append(f"{label}: duplicate vlan name '{name}' "
|
errors.append(f"{label}: duplicate vlan name '{name}' "
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue