feat(phase 3.1): /health dashboard — single self-contained HTML page #26
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/phase-3.1-health-dashboard"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Phase 3.1 of the Stream-a-Thon plan. Operators get a green/red per-stream view at
http://127.0.0.1:8080/(same host/port as/health, just the root path). The page is a single self-contained HTML file with vanilla JS — no build step, no external deps — polling/healthonce per second and rendering overall status (ok / degraded / unreachable), per-stream status with restart counts, and the OBS UDP input URL.Closes the Phase 3.1 acceptance: "Ops can see green/red per stream."
How it works
dashboard.htmllives inscripts/streamlink-supervisor/next to the server code.index.tsreads it from disk on startup withfs.readFileSync(fileURLToPath+__dirnameresolution for ESM/CJS parity under tsx).startRuntime → startHealthServerasdashboardHtml.healthServerserves it atGET /andGET /dashboard; the/healthJSON path is unchanged./—/healthJSON is still served.Files
scripts/streamlink-supervisor/dashboard.html— the pagescripts/streamlink-supervisor/healthServer.ts— acceptdashboardHtmlin context; serve atGET /andGET /dashboardscripts/streamlink-supervisor/runtime.ts— threaddashboardHtmlthroughscripts/streamlink-supervisor/index.ts— load the HTML on startup; warn-and-continue on missingscripts/streamlink-supervisor/__tests__/healthServer.test.ts— +5 tests covering the new route, content type, missing-config path, method-not-allowed, and leak-isolation from /healthscripts/streamlink-supervisor/README.md— document the route + behaviorTest plan
tsc --noEmitcleannpm run audit:sqlite-openscleanhttp://127.0.0.1:8080/after supervisor starts; rows should match/healthJSON