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 <noreply@anthropic.com>
This commit is contained in:
parent
7cc9649f03
commit
9106e5a071
8 changed files with 533 additions and 12 deletions
|
|
@ -6,8 +6,16 @@
|
|||
<link rel="stylesheet" href="app.css" />
|
||||
</head>
|
||||
<body>
|
||||
<!-- Animated neon beam that travels around the screen edge. -->
|
||||
<div id="edge-glow" aria-hidden="true"></div>
|
||||
|
||||
<header class="topbar">
|
||||
<div class="brand">PON Fleet Upgrader</div>
|
||||
<nav id="tabs" class="tabs hidden">
|
||||
<button class="tab" data-tab="dashboard" data-view="#view-dashboard">Dashboard</button>
|
||||
<button class="tab" data-tab="onu" data-view="#view-fleet">ONU</button>
|
||||
<button class="tab" data-tab="olt" data-view="#view-olts">OLT</button>
|
||||
</nav>
|
||||
<div class="session" id="session-label">Not connected</div>
|
||||
<button id="btn-logout" class="ghost hidden">Disconnect</button>
|
||||
</header>
|
||||
|
|
@ -35,6 +43,28 @@
|
|||
</div>
|
||||
</section>
|
||||
|
||||
<!-- ================= Dashboard view ================= -->
|
||||
<section id="view-dashboard" class="view hidden">
|
||||
<div class="panel-main dash-wrap">
|
||||
<div class="fleet-head">
|
||||
<h2>Dashboard</h2>
|
||||
<div class="row">
|
||||
<label class="inline dash-toggle">
|
||||
<input id="dash-extra" type="checkbox" />
|
||||
Detailed stats (Rx / FEC scan)
|
||||
</label>
|
||||
<button id="dash-refresh" class="ghost">↻ Refresh</button>
|
||||
</div>
|
||||
</div>
|
||||
<p class="muted small" id="dash-status">Connect and the network overview loads here.</p>
|
||||
|
||||
<div class="dash-scroll">
|
||||
<div class="dash-grid" id="dash-tiles"></div>
|
||||
<div id="dash-sections"></div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- ================= Fleet view ================= -->
|
||||
<section id="view-fleet" class="view hidden">
|
||||
<div class="panel-left">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue