Add VLAN selector dropdown to VLAN configuration page

A new <select> element above the VLAN ID input lets users pick an
existing VLAN by name instead of typing the ID. Options are loaded
from /vlanlist on page load and re-loaded after successful
Update/Create operations.

Selection triggers the existing fetchVLAN() flow.

Falls back gracefully if /vlanlist returns an empty list or fails:
the dropdown is hidden and the existing ID input remains functional.
This commit is contained in:
Erdnusschokolade
2026-05-24 11:20:57 +02:00
parent a5f77e4caf
commit defb37c06a
3 changed files with 39 additions and 0 deletions
+7
View File
@@ -10,6 +10,13 @@
<div id="ports"></div>
<h1>VLAN Configuration</h1>
<form id="vform" action="/vlan.html">
<div>
<label for="vlanSelect">VLAN auswählen:</label>
<select id="vlanSelect" style="margin: 0 0 0 8px">
<option value="" disabled selected>— VLAN wählen —</option>
</select>
</div>
<br/>
<div>
<label for="vid">VLAN ID:</label>
<input type="number" min="1" max="4094" id="vid" name="vid">