Host detail v2: full pipeline + per-stage logs + WoL diagnostics
CI / Lint + build + test (push) Has been cancelled

Pipeline now always renders all 13 nodes (3 pre-stage + 9 stage +
Completed), synthesising ghosts from run state when stage rows
aren't seeded yet. Makes a WaitingWoL host show the full timeline
ahead of it instead of just 4 dots.

Agent tags each log line with its stage; logs.Hub fans out to both
log-{runID} and log-{runID}-{stage} SSE events so the detail page
can show per-stage tabs with a pure-CSS radio-sibling switch. Flat
run log prepends [stage] so grep still works.

Dispatcher writes picked/sent-WoL/heartbeat lines into the per-run
log — the operator opens the detail page, sees WaitingWoL stuck,
and reads exactly what the dispatcher did and why nothing's
progressing, instead of having to tail journalctl on the LXC.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-04-18 00:38:27 -04:00
parent a3d5e2d0a4
commit 1694c20b12
16 changed files with 1053 additions and 162 deletions
+106 -17
View File
@@ -366,6 +366,79 @@ body.bare main { max-width: none; }
.detail-log .log-warn { color: var(--warn); }
.detail-log .log-error { color: var(--danger); }
/* ===== Log tabs (CSS-only radio switch) ===== */
/* Radios are visually hidden but still functional: checked state is read
by sibling selectors below to flip the active label + pane. */
.log-tabs {
display: flex;
flex-wrap: wrap;
gap: 0;
border: 1px solid var(--border);
border-radius: var(--radius);
background: #0b0d12;
overflow: hidden;
}
.log-tab-input {
position: absolute;
opacity: 0;
pointer-events: none;
width: 0;
height: 0;
}
.log-tab-label {
display: inline-flex;
align-items: center;
padding: 8px 14px;
font-size: 12px;
font-family: var(--mono);
color: var(--text-dim);
cursor: pointer;
border-right: 1px solid var(--border);
border-bottom: 1px solid var(--border);
user-select: none;
background: transparent;
transition: background .12s ease, color .12s ease;
}
.log-tab-label:hover { background: rgba(255,255,255,.03); color: var(--text); }
/* Active tab: coloured bar + filled background. */
.log-tab-input:checked + .log-tab-label {
background: var(--bg-elev-2);
color: var(--text);
box-shadow: inset 0 -2px 0 0 var(--accent);
}
.log-pane {
display: none;
flex-basis: 100%;
flex-direction: column;
gap: 2px;
padding: 10px 12px;
font-family: var(--mono);
font-size: 12px;
color: var(--text-dim);
max-height: 500px;
overflow-y: auto;
order: 99; /* keep panes below the tab labels in flex order */
}
.log-pane .log-line { white-space: pre-wrap; }
.log-pane .log-warn { color: var(--warn); }
.log-pane .log-error { color: var(--danger); }
.log-pane .log-stage { color: var(--text-dim); opacity: .75; margin-right: 4px; }
.log-pane:empty::before { content: "(no log output yet)"; color: var(--text-dim); opacity: .5; }
/* Sibling-selector cascade: .log-tab-all:checked flips .log-pane-all,
.log-tab-Inventory:checked flips .log-pane-Inventory, etc. The radios
live as siblings of the panes inside .log-tabs, so ~ works. */
.log-tab-all:checked ~ .log-pane-all { display: flex; }
.log-tab-Inventory:checked ~ .log-pane-Inventory { display: flex; }
.log-tab-SpecValidate:checked ~ .log-pane-SpecValidate { display: flex; }
.log-tab-SMART:checked ~ .log-pane-SMART { display: flex; }
.log-tab-CPUStress:checked ~ .log-pane-CPUStress { display: flex; }
.log-tab-Storage:checked ~ .log-pane-Storage { display: flex; }
.log-tab-Network:checked ~ .log-pane-Network { display: flex; }
.log-tab-GPU:checked ~ .log-pane-GPU { display: flex; }
.log-tab-PSU:checked ~ .log-pane-PSU { display: flex; }
.log-tab-Reporting:checked ~ .log-pane-Reporting { display: flex; }
.diff-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.diff-row {
display: grid;
@@ -399,57 +472,73 @@ body.bare main { max-width: none; }
margin: 0;
}
/* ===== Pipeline timeline ===== */
/* ===== Pipeline timeline =====
13 nodes (3 pre-stage + 9 stage + Completed). flex:1 on every node
so they share the full width evenly; overflow-x:auto only kicks in
on very narrow viewports. */
.pipeline {
display: flex;
align-items: stretch;
gap: 0;
width: 100%;
overflow-x: auto;
padding: 12px 4px 6px;
padding: 28px 12px 16px;
background: #0b0d12;
border: 1px solid var(--border);
border-radius: var(--radius);
}
.stage-node {
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
min-width: 82px;
padding: 0 6px;
flex-shrink: 0;
gap: 6px;
flex: 1 1 0;
min-width: 72px;
padding: 0 4px;
}
.stage-dot {
width: 22px;
height: 22px;
width: 28px;
height: 28px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 12px;
font-size: 14px;
font-weight: 700;
border: 2px solid var(--border);
background: var(--bg-elev-2);
color: var(--text-dim);
line-height: 1;
transition: transform .12s ease, box-shadow .12s ease;
}
.stage-node:hover .stage-dot { transform: scale(1.12); }
.stage-dot-passed { background: var(--success); border-color: var(--success); color: #0b0d12; }
.stage-dot-running { background: var(--accent-strong); border-color: var(--accent); color: #fff; animation: pulse 1.2s ease-in-out infinite; }
.stage-dot-failed { background: var(--danger); border-color: var(--danger); color: #fff; }
.stage-dot-skipped { background: transparent; border-color: var(--border); color: var(--text-dim); opacity: .45; }
.stage-dot-pending { background: transparent; border-color: var(--border); color: transparent; }
.stage-name { font-size: 11px; color: var(--text-dim); text-align: center; }
.stage-name {
font-size: 12px;
color: var(--text-dim);
text-align: center;
font-weight: 500;
line-height: 1.2;
}
.stage-node-passed .stage-name { color: var(--text); }
.stage-node-running .stage-name { color: var(--accent); }
.stage-node-failed .stage-name { color: var(--danger); }
.stage-node-running .stage-name { color: var(--accent); font-weight: 600; }
.stage-node-failed .stage-name { color: var(--danger); font-weight: 600; }
.stage-node-skipped .stage-name { opacity: .5; }
.stage-duration { font-size: 10px; color: var(--text-dim); font-family: var(--mono); min-height: 12px; }
.stage-connector {
flex: 1;
min-width: 12px;
height: 2px;
flex: 1 1 0;
min-width: 8px;
height: 3px;
align-self: center;
margin-top: -18px;
margin-top: -30px;
background: var(--border);
border-radius: 2px;
}
.stage-connector-passed { background: var(--success); }
.stage-connector-running { background: linear-gradient(90deg, var(--success), var(--accent)); }
@@ -458,5 +547,5 @@ body.bare main { max-width: none; }
@keyframes pulse {
0%, 100% { box-shadow: 0 0 0 0 rgba(60,130,246,.55); }
50% { box-shadow: 0 0 0 6px rgba(60,130,246,0); }
50% { box-shadow: 0 0 0 8px rgba(60,130,246,0); }
}