plc_control/web/js
caoqianming 42cdbbc0cc fix(web): fetch all unit runtimes on page load
Root cause: state.runtimes was empty after refresh because the engine
only pushes UnitRuntimeChanged on state transitions — if the engine
is mid-wait-phase, no push occurs and badges show OFFLINE.

Fix: add GET /api/unit/runtimes batch endpoint (returns all known
runtimes as { unit_id: UnitRuntime }) and call it in parallel with
the unit list fetch inside loadUnits(), so runtime badges are correct
immediately after page load.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 09:11:47 +08:00
..
api.js fix(toast): remove shake class before hiding to ensure animationend fires 2026-03-25 13:16:50 +08:00
app.js feat(web): dual-view UI — 运维/配置 tab, ops equipment cards with live signal values 2026-03-25 10:25:20 +08:00
chart.js fix(chart): restore realtime updates and axes 2026-03-23 12:55:12 +08:00
docs.js fix(docs): widen API drawer and fix TOC scroll hijacking window 2026-03-25 14:41:17 +08:00
dom.js feat(control): batch start/stop auto control for all enabled units 2026-03-25 13:05:23 +08:00
equipment.js fix(frontend): pre-select active unit when opening new equipment modal 2026-03-24 16:35:33 +08:00
events.js refactor(events): display each event on a single line 2026-03-25 16:40:43 +08:00
index.js refactor(web): split index html into flat fragments 2026-03-23 14:14:19 +08:00
logs.js refactor(web): remove dead code and translate plan docs to Chinese 2026-03-26 08:57:29 +08:00
ops.js refactor(web): remove dead code and translate plan docs to Chinese 2026-03-26 08:57:29 +08:00
points.js fix(web): fix node count showing 2x by counting only details elements 2026-03-25 08:27:06 +08:00
roles.js refactor(control): align point roles and equipment kind 2026-03-24 13:17:53 +08:00
sources.js feat(web): reorganize equipment layout and point flows 2026-03-23 12:49:26 +08:00
state.js refactor(web): remove dead code and translate plan docs to Chinese 2026-03-26 08:57:29 +08:00
units.js fix(web): fetch all unit runtimes on page load 2026-03-26 09:11:47 +08:00