From 67ae4598d95b1ec3a7973676459d3ed644d944b4 Mon Sep 17 00:00:00 2001 From: eraiza0816 <10572974+eraiza0816@users.noreply.github.com> Date: Tue, 11 Aug 2026 06:37:20 +0900 Subject: [PATCH] feat(webui): turn the Web UI into a single-page application index.html now contains all pages as sections (overview, ports, stat, vlan, l2, mirror, lag, eee, bandwidth, system, update); the sidebar switches between them via the URL hash (#/ports, #/vlan, ...). login.html stays separate as the authentication gate. A section's initialisation runs when the section is shown, its polling intervals run only while it is visible, and re-entering a section refetches the data; the checkbox builders (lag/vlan/mirror) and the L2 scanner were made idempotent so re-initialising cannot duplicate rows. tools/minify.py: recognise regex literals - an escaped slash before the closing delimiter was previously stripped as a // comment. Measured (make MACHINE=KP_9000_6XHML_X2): 8 embedded files, 109,814 -> 97,730 -> 25,302 bytes gzip (23.0 %); the data block ends at 0x462d6 (~86 KB freed). On a real PCB-K0402WS-V3: cold load ~450 ms, section switches ~60-160 ms with no asset re-downloads, all sections render without JavaScript errors. --- html/bandwidth.html | 18 --- html/eee.html | 22 ---- html/index.html | 289 ++++++++++++++++++++++++++++++++++++++++---- html/l2.html | 27 ----- html/lag.html | 25 ---- html/main.js | 150 +++++++++++++++-------- html/mirror.html | 23 ---- html/ports.html | 22 ---- html/stat.html | 45 ------- html/system.html | 104 ---------------- html/update.html | 19 --- html/vlan.html | 55 --------- tools/minify.py | 36 +++++- 13 files changed, 397 insertions(+), 438 deletions(-) delete mode 100644 html/bandwidth.html delete mode 100644 html/eee.html delete mode 100644 html/l2.html delete mode 100644 html/lag.html delete mode 100644 html/mirror.html delete mode 100644 html/ports.html delete mode 100644 html/stat.html delete mode 100644 html/system.html delete mode 100644 html/update.html delete mode 100644 html/vlan.html diff --git a/html/bandwidth.html b/html/bandwidth.html deleted file mode 100644 index 57ce9459..00000000 --- a/html/bandwidth.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - -
| Ingress | Egress | |||||
|---|---|---|---|---|---|---|
| Port | Limit | Bandwidth [kBit/s] | Flow Control | Limit | Bandwidth [kBit/s] | Apply |