From 9106e5a071056050152558fd243faa1cae3ccaf2 Mon Sep 17 00:00:00 2001 From: Jon Vanvik Date: Tue, 23 Jun 2026 13:45:24 +0200 Subject: [PATCH] Add top tabs + telemetry Dashboard + animated edge glow Restructure the UI behind top-level tabs (Dashboard / ONU / OLT) so more features have room to land. showView() now drives the active tab via a VIEW_TO_TAB map, so sub-views (campaign/verify) keep the ONU tab lit. Tabs appear on login (landing on Dashboard) and hide on logout. Dashboard: a read-only network telemetry view modeled on the PONGo iOS app's DashboardViewModel. New api:dashboardStats aggregates, all in main.js (renderer just formats): - counts: ONUs, OLTs, controllers (controllers best-effort via /v3/controllers/configs/) - aggregate traffic (OLT TX BW = downstream, RX BW = upstream) - health: OLTs with laser off; abnormal-Rx count (rx < -28 || > -10) - ONU registration-state breakdown (clicking a state deep-links to the ONU tab pre-filtered) - opt-in detailed scan: per-ONU optical + FEC-health distribution fmtBps is a port of the iOS Format.bps. Edge glow: #edge-glow draws a neon conic-gradient beam masked to a 3px border ring and spins an @property --beam-angle 0->360deg, so a glow travels around the screen edge. Honors prefers-reduced-motion. mcms-api: add listAllControllerConfigs. Docs: CLAUDE.md section 15 + README + IPC table. Verified: npm run check passes; rendered the Dashboard + tabs + edge beam offscreen (beam frozen on the right edge to confirm it follows the border). Co-Authored-By: Claude Opus 4.8 --- CLAUDE.md | 63 ++++++++++++++-- README.md | 15 ++-- main.js | 113 +++++++++++++++++++++++++++++ preload.js | 2 + renderer/app.css | 141 ++++++++++++++++++++++++++++++++++++ renderer/app.js | 170 +++++++++++++++++++++++++++++++++++++++++++- renderer/index.html | 30 ++++++++ src/mcms-api.js | 11 +++ 8 files changed, 533 insertions(+), 12 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index fdf8301..050aa24 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -12,12 +12,13 @@ is the engineering counterpart. ## 1. What this app does -Electron desktop client for two bulk operations against **Ciena -MCMS 6.2** PON Manager: +Electron desktop client for operating a **Ciena MCMS 6.2** PON Manager +fleet. Top-level **tabs** (Dashboard / ONU / OLT) switch between: -1. **Bulk ONU firmware upgrades** (the original purpose). -2. **Bulk OLT PON flooding-mode changes** (private↔auto on NNI services — - see §14). +- **Dashboard** — read-only network telemetry (see §15). +- **ONU** — the fleet table + firmware-upgrade campaign + verify flows + (the original purpose: bulk ONU firmware upgrades). +- **OLT** — bulk OLT PON flooding-mode changes (private↔auto, see §14). Reference deployment: GNXS / Tibit MicroPlug ONUs running Interos Everest (EV051xxR / EV052xxR firmware family) behind Tibit OLTs. @@ -122,6 +123,7 @@ stream progress events back to the renderer. | `api:executeBulkTask` | Procedure 8 — single AUTO-TASK-CFG | — | | `api:getTaskConfig` / `api:getUpgradeStatus` | poll helpers | — | | `api:deleteOnus` | bulk delete (CFG + best-effort STATE) | `delete:progress` | +| `api:dashboardStats` | network telemetry aggregates (Dashboard tab) | — | | `api:listOlts` | OLT-CFG list + per-OLT NNI flood-mode summary | — | | `api:executeFloodChange` | bulk PON flooding-mode flip (GET→plan→PUT) | `olt-flood:progress` | | `api:fetchFecHealth` | pre-flight FEC pre/post + optical | `fec:progress` | @@ -721,4 +723,55 @@ entries pass through untouched. --- +## 15. Tabbed navigation & Dashboard + +### Tabs + +The topbar holds a `