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:
Jon Vanvik 2026-06-23 13:45:24 +02:00
parent 7cc9649f03
commit 9106e5a071
8 changed files with 533 additions and 12 deletions

View file

@ -415,3 +415,144 @@ button.danger:hover:not(:disabled) {
}
.modal-type-label { display: block; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 2px; }
/* -------- Animated neon edge glow (beam travels around the border) -------- */
@property --beam-angle {
syntax: "<angle>";
initial-value: 0deg;
inherits: false;
}
#edge-glow {
position: fixed;
inset: 0;
z-index: 9998;
pointer-events: none;
padding: 3px; /* thickness of the glowing border band */
background: conic-gradient(
from var(--beam-angle),
transparent 0deg,
transparent 38deg,
var(--cyan) 64deg,
#ffffff 90deg,
var(--neon) 116deg,
transparent 142deg,
transparent 360deg
);
/* Keep only the padding ring (border band); punch out the interior. */
-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
-webkit-mask-composite: xor;
mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
mask-composite: exclude;
filter: drop-shadow(0 0 8px var(--neon)) drop-shadow(0 0 22px var(--cyan));
animation: beamspin 7s linear infinite;
}
@keyframes beamspin { to { --beam-angle: 360deg; } }
@media (prefers-reduced-motion: reduce) {
#edge-glow { animation: none; }
}
/* -------- Top tabs -------- */
.tabs { display: flex; gap: 4px; margin-left: 18px; align-self: stretch; align-items: flex-end; }
.tabs .tab {
background: transparent;
border: 1px solid transparent;
border-bottom: none;
border-radius: 7px 7px 0 0;
color: var(--fg-dim);
text-transform: uppercase;
letter-spacing: 1.5px;
font-size: 12px;
font-weight: 700;
padding: 8px 18px;
box-shadow: none;
}
.tabs .tab:hover:not(.active) {
color: var(--neon);
border-color: transparent;
text-shadow: var(--glow-neon);
box-shadow: none;
}
.tabs .tab.active {
color: var(--neon);
border-color: var(--neon);
background: rgba(33, 200, 255, 0.1);
text-shadow: var(--glow-neon);
box-shadow: 0 0 12px rgba(33, 200, 255, 0.45), inset 0 0 14px rgba(33, 200, 255, 0.12);
}
/* -------- Dashboard -------- */
.dash-wrap { overflow: hidden; }
.dash-scroll {
flex: 1;
overflow-y: auto;
padding-right: 8px;
display: flex;
flex-direction: column;
gap: 22px;
}
.dash-toggle { text-transform: none; letter-spacing: 0; color: var(--fg-dim); font-size: 12px; }
.dash-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tile {
background: linear-gradient(180deg, rgba(33, 200, 255, 0.07), transparent 70%), var(--bg-elev);
border: 1px solid var(--border);
border-radius: 10px;
padding: 16px 18px;
display: flex;
flex-direction: column;
gap: 6px;
box-shadow: inset 0 0 26px rgba(33, 200, 255, 0.05);
}
.tile .tile-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--fg-dim); }
.tile .tile-value { font-size: 34px; font-weight: 700; line-height: 1.05; color: var(--neon); text-shadow: var(--glow-neon-strong); font-variant-numeric: tabular-nums; }
.tile .tile-sub { font-size: 11px; color: var(--fg-dim); }
.tile.tile-teal .tile-value { color: var(--cyan); text-shadow: var(--glow-cyan); }
.tile.tile-indigo .tile-value { color: var(--blue); text-shadow: 0 0 10px rgba(42, 123, 255, 0.75), 0 0 22px rgba(42, 123, 255, 0.4); }
.dash-section { display: flex; flex-direction: column; gap: 8px; }
.dash-section > h3 {
margin: 0;
font-size: 12px;
text-transform: uppercase;
letter-spacing: 2px;
color: var(--neon);
text-shadow: var(--glow-neon);
}
.dash-card {
background: var(--bg-elev);
border: 1px solid var(--border);
border-radius: 10px;
padding: 2px 14px;
box-shadow: inset 0 0 22px rgba(33, 200, 255, 0.04);
}
.dash-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 10px 2px;
border-bottom: 1px solid var(--border);
}
.dash-row:last-child { border-bottom: none; }
.dash-row.tappable { cursor: pointer; }
.dash-row.tappable:hover { background: rgba(33, 200, 255, 0.06); }
.dash-row .dash-row-main { display: flex; flex-direction: column; gap: 2px; }
.dash-row .dash-row-sub { font-size: 11px; color: var(--fg-dim); }
.dash-num { font-variant-numeric: tabular-nums; font-weight: 700; }
.dash-traffic { display: flex; gap: 36px; padding: 6px 2px; }
.dash-traffic .t-block { display: flex; flex-direction: column; gap: 4px; }
.dash-traffic .t-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--fg-dim); }
.dash-traffic .t-val { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dash-traffic .t-down { color: var(--neon); text-shadow: var(--glow-neon); }
.dash-traffic .t-up { color: var(--cyan); text-shadow: var(--glow-cyan); }
.dash-pill {
display: inline-block;
padding: 2px 9px;
border-radius: 999px;
border: 1px solid currentColor;
font-size: 11px;
font-weight: 700;
letter-spacing: 0.5px;
}