feat: switch panel and PDF also use the VLANs assigned to cables

Ports without a label show the VLANs of their cable. A label with exactly
one number counts as that VLAN ID, so "Server 30", "VLAN 30", "30" and a
cable with VLAN 30 share one colour and legend entry. A numeric label that
differs from the cable VLANs is flagged with an orange corner and a
warning; tooltips and the PDF port list show label and cable VLANs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
MrBlakeandClaude Opus 5.5 committed 2026-10-30 10:17:54 +01:00
1 parent e9c00f2b11
commit 6906bf6ed6
9 files changed
+200 -39

No files matched your search

+15
View File
@@ -526,6 +526,21 @@ view in the web interface of Aruba switches:
- The chosen view is remembered in the browser; texts follow the user's NetBox
language (German or English).
**VLANs from labels and cables.** Besides the interface label, the VLANs
assigned to the port's cable (see *VLANs on connections*) are taken into
account, in the front panel and in the PDF:
- A port with a label shows the label; a port without a label shows the VLANs
of its cable (e.g. `10` or `10, 20`).
- A label with exactly one number is that VLAN ID, so `Server 30`, `VLAN 30`,
`30` and a cable with VLAN 30 share one colour and one legend entry (named
after the label). Labels like `Trunk` or `10,20` stay as they are.
- If the numbers in the label differ from the cable VLANs (label `20`, cable
VLAN 30), the port gets an orange corner and the tooltip and the PDF port
list show a warning. Labels without a number never count as a mismatch.
- Tooltips and the PDF port list show both the label and the cable VLANs with
their names.
NetBox offers plugins no slot above these cards, so the panel is rendered into
the left column and moved to the top by a small script; without JavaScript it
stays in the left column.