Add VLAN overview table to VLAN configuration page

Below the configuration form, a new table lists all configured VLANs
with their port memberships: Member, Tagged, Untagged, and PVID
columns. Port ranges are formatted compactly (e.g. "1-2,5").

Port-to-bit mapping uses the existing physToLogPort[] array populated
by /status.json, so the table is consistent with the icon view in
fetchVLAN() and works on any supported machine.

Each row has a delete button that sends "vlan N d" via /cmd, with
a confirmation dialog. VLAN 1 cannot be deleted (no button shown).

Table and dropdown both refresh automatically after Update/Create
and after delete via a new refreshVlanViews() helper.

The N+1 request pattern (1x /vlanlist + Nx /vlan.json) keeps the
backend simple and avoids buffer overflow risks for systems with
many VLANs. For typical configurations (<50 VLANs), page load
remains under one second.
This commit is contained in:
Erdnusschokolade
2026-05-24 11:20:57 +02:00
parent defb37c06a
commit a369e46fe6
4 changed files with 108 additions and 2 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ async function vlanSub() {
});
console.log('Completed!', response);
}
loadVlanList();
refreshVlanViews();
} catch(err) {
console.error(`Error: ${err}`);
}