onu detail polish + clickable OLT detail modal
- Fix alarm card overflow: alarm rows stack (severity+text on one line that
wraps, meta below) instead of squeezing the text to ~0 width next to the
nowrap meta — which had made long alarm text render one char per line in
narrow columns. Also min-width:0 on cards/kv so long IPv6/descr strings
don't blow out the grid track.
- Combine Parent OLT + Upstream switch into one "Parent OLT & uplink" card.
- ONU list/search de-compacted: add equipment/version + PON-mode filters;
two-line rows (serial+status, then equipment · version · last-seen).
- UNI card labels the speed as configured ("cfg Auto/Auto"); negotiated
speed isn't in the payloads — link up/down still comes from LAN-LOS.
Clickable parent OLT -> OLT detail modal (showOltModal):
- new src/oltdetail.js (pure, shared; reuses summarizeAlarms) + getOltState
/ getOltAlarms client methods + api:getOltDetail (main + web + bridges).
- shows identity, traffic + util, ASIC temperature, ONU counts, laser,
alarms, upstream switch; plus a connected-ONU list with per-ONU
FEC/optical built from the loaded fleet (filtered by _status.oltMac),
each row clickable back into that ONU's detail.
Docs: CLAUDE.md §17 + IPC table.
Verified: node --check; oltdetail.js unit-tested 9/9 (fw active-bank,
traffic down=TX/up=RX, util, ASIC temp, ONU counts, laser, LLDP, alarms);
rendered the OLT modal + richer list offscreen and confirmed the alarm-text
wrap fix (alarm head ~1-2 lines, not vertical).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
276c3e9faa
commit
2046fad0f8
11 changed files with 321 additions and 59 deletions
19
main.js
19
main.js
|
|
@ -16,6 +16,7 @@ const { summarizeDashboard } = require('./src/dashboard');
|
|||
const { summarizeCpe } = require('./src/cpe');
|
||||
const { lookupOui } = require('./src/oui');
|
||||
const { summarizeOnuDetail } = require('./src/onudetail');
|
||||
const { summarizeOltDetail } = require('./src/oltdetail');
|
||||
const { planUpgrade, activeBankPtr, inactiveBank } = require('./src/bank-strategy');
|
||||
|
||||
/** @type {McmsClient | null} */
|
||||
|
|
@ -265,6 +266,24 @@ ipcMain.handle('api:getOnuDetail', async (_ev, { onuId, windowMin = 60 }) => {
|
|||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Rich OLT detail (clicked from an ONU's Parent OLT card): identity +
|
||||
* traffic + temperature + ONU counts + laser + alarms + upstream switch.
|
||||
*/
|
||||
ipcMain.handle('api:getOltDetail', async (_ev, { oltMac }) => {
|
||||
try {
|
||||
const c = requireClient();
|
||||
const [oltCfg, oltState, alarmsDoc] = await Promise.all([
|
||||
c.getOltConfig(oltMac).catch(() => null),
|
||||
c.getOltState(oltMac).catch(() => null),
|
||||
c.getOltAlarms(oltMac).catch(() => null),
|
||||
]);
|
||||
return { ok: true, data: summarizeOltDetail({ oltCfg, oltState, alarmsDoc }) };
|
||||
} catch (err) {
|
||||
return { ok: false, error: toWireError(err) };
|
||||
}
|
||||
});
|
||||
|
||||
ipcMain.handle('api:listOnuFirmware', async () => {
|
||||
try {
|
||||
const c = requireClient();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue