Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/frontend/packages/dashboard/src/core.html
iris 93fa264bbf dashboard: stream the running rebuild's build log inline in the queue
The C0R3 rebuild queue only linked out to the logs page (logs →). Add an
inline live-log panel under the queue that streams the currently-running
rebuild's build output, so the operator watches progress without leaving the
page.

One panel keyed to the running entry's build_log_id (the queue runs one build
at a time), reusing the build-log SSE the logs page already uses
(GET /api/build-logs/id/{id}/stream; frames stdout_append/stderr_append/done).
It lives in its own container (#rebuild-live-log) outside rebuild-queue-section
so the queue's per-row re-render — rows rebuild as the build step advances —
never tears down the open stream; it reconnects only when the running
build_log_id changes and won't reopen a stream that already sent done. Sticky-
bottom scroll, collapsible, live/ok/fail badge, raw download. Hidden when
nothing is building; each row keeps its logs → link for full history.

Frontend-only — no backend change (endpoint + build_log_id already existed).
Closes #1860.
2026-06-22 01:48:32 +02:00

97 lines
4.8 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>hyperhive // C0R3</title>
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
<link rel="stylesheet" href="/static/colors.css">
<link rel="stylesheet" href="/static/theme.css">
<link rel="stylesheet" href="/static/common.css">
<link rel="stylesheet" href="/static/core.css">
</head>
<body class="core-shell">
<!-- C0R3: the host/coordinator surface. Standalone page (served at
/core.html) carved out of the dashboard's old SYST3M tab so the
dashboard tab strip stays lean. Same minimal chrome as
/logs.html — a `← home` back-link to the H0M3 hub + a
createTabStrip sub-tab nav. Default sub-tab is the rebuild queue
(the thing the operator actually watches). The section <div> ids
(rebuild-queue-section, meta-inputs-section, tombstones-section,
container-load-section) match what core.js's renderers target,
which are the same renderers the dashboard SYST3M tab used. -->
<header class="page-header">
<a class="page-back" href="/">← home</a>
<nav class="hive-tabbar core-tabbar" id="core-tabbar" role="tablist">
<a class="hive-tab" id="core-tab-rebuild" href="#rebuild" role="tab"
aria-controls="core-pane-rebuild" data-tab="rebuild">
<span class="core-tab-label">R3BU1LD QU3U3</span>
<span class="tab-count" id="core-tab-count-rebuild" hidden></span>
</a>
<a class="hive-tab" id="core-tab-meta" href="#meta" role="tab"
aria-controls="core-pane-meta" data-tab="meta">
<span class="core-tab-label">M3T4 1NPUTS</span>
</a>
<a class="hive-tab" id="core-tab-kept" href="#kept" role="tab"
aria-controls="core-pane-kept" data-tab="kept">
<span class="core-tab-label">K3PT ST4T3</span>
</a>
<a class="hive-tab" id="core-tab-load" href="#load" role="tab"
aria-controls="core-pane-load" data-tab="load">
<span class="core-tab-label">C0NT41N3R L04D</span>
</a>
</nav>
</header>
<main class="core-main">
<!-- R3BU1LD QU3U3: pending + running rebuilds, meta-updates, and
first-spawns. Driven by /api/state.rebuild_queue cold-load +
live `rebuild_queue_changed` over /api/dashboard/stream. Default tab. -->
<section class="core-pane" id="core-pane-rebuild" data-tab-pane="rebuild"
role="tabpanel" aria-labelledby="core-tab-rebuild">
<p class="meta">pending + running rebuilds, meta-updates, and first-spawns. one runs at a time; meta-update cascades nest under their parent. dedup: re-enqueueing a still-queued op collapses into the existing entry.</p>
<div id="rebuild-queue-section">
<p class="meta">loading…</p>
</div>
<!-- Live build log of the currently-running rebuild (one runs at a
time). Managed by renderRebuildLiveLog in core.js, separate from
rebuild-queue-section so the queue's row re-render never disturbs
the open SSE stream. -->
<div id="rebuild-live-log" hidden></div>
</section>
<!-- M3T4 1NPUTS: select inputs to nix flake update in /meta/. -->
<section class="core-pane" id="core-pane-meta" data-tab-pane="meta"
role="tabpanel" aria-labelledby="core-tab-meta">
<p class="meta">select inputs to <code>nix flake update</code> in <code>/meta/</code>. selected agents rebuild in sequence after the lock bump; manager learns each outcome via the usual <code>rebuilt</code> system event.</p>
<div id="meta-inputs-section">
<p class="meta">loading…</p>
</div>
</section>
<!-- K3PT ST4T3: tombstoned-agent kept state. -->
<section class="core-pane" id="core-pane-kept" data-tab-pane="kept"
role="tabpanel" aria-labelledby="core-tab-kept">
<p class="meta">kept state from previously tombstoned agents — recreating an agent with the same name reuses it.</p>
<div id="tombstones-section">
<p class="meta">loading…</p>
</div>
</section>
<!-- C0NT41N3R L04D: live cpu + memory per agent container, from
cgroup v2 on the host. Polled only while this sub-tab is active. -->
<section class="core-pane" id="core-pane-load" data-tab-pane="load"
role="tabpanel" aria-labelledby="core-tab-load">
<p class="meta">live cpu + memory per agent container, from cgroup v2 on the host. cpu is % of total host capacity (all cores), sampled over ~200ms each refresh; polled every 5s while this tab is open. network is omitted on purpose — agents share the host netns, so there is no per-container counter (see <code>docs/network.md</code>).</p>
<div id="container-load-section">
<p class="meta">loading…</p>
</div>
</section>
</main>
<script type="module" src="/static/core.js" defer></script>
</body>
</html>