f79fe0f0db
Reshapes the detail page into a run-view: hybrid horizontal pipeline
+ expanded active-step pane with sub-steps, a per-step log pane with
line-numbered permalinks and client-side search, and a runs-history
sidebar that navigates via ?run=N. Default step is server-picked
(running → failed → Reporting) so the operator lands on the thing
that's moving.
Adds a sub_steps table + SSE topic (substep-{run}-{stage}-{ordinal})
so per-disk and per-pass work (SMART, CPUStress CPU/RAM, Storage,
GPU) is visible in the UI instead of buried in stage summary JSON.
Agent emits sub-step reports from existing per-iteration loops.
Dashboard tiles become a mini run-view with a 9-dot step strip so
the operator reads run health across the whole grid at a glance.
Register page gets the same card shell + button styling.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
47 lines
1.3 KiB
Plaintext
47 lines
1.3 KiB
Plaintext
package templates
|
|
|
|
import (
|
|
"time"
|
|
|
|
"vetting/internal/model"
|
|
)
|
|
|
|
// TileData pairs a host with its latest run and the derived fields the
|
|
// tile needs to render: spec-diff count (server-side diff result) and
|
|
// the on-disk path to the hold-key artifact when the run is holding.
|
|
// LastSeenAt is the host-mode agent's most recent heartbeat. Stages is
|
|
// the list of canonical-order stage rows for Latest, used by HostTile
|
|
// to render the mini run-view; nil/empty for never-run hosts (a ghost
|
|
// dot strip is rendered from DefaultStageOrder).
|
|
type TileData struct {
|
|
Host model.Host
|
|
Latest *model.Run
|
|
Stages []model.Stage
|
|
SpecDiffCritical int
|
|
HoldKeyPath string
|
|
LastSeenAt *time.Time
|
|
}
|
|
|
|
templ Dashboard(tiles []TileData) {
|
|
@Layout("Dashboard") {
|
|
<section class="dashboard">
|
|
<div class="dashboard-header">
|
|
<h1>Registered hosts</h1>
|
|
<a class="button" href="/hosts/new">Register host</a>
|
|
</div>
|
|
if len(tiles) == 0 {
|
|
<div class="empty">
|
|
<p>No hosts registered yet.</p>
|
|
<a class="button" href="/hosts/new">Register your first host</a>
|
|
</div>
|
|
} else {
|
|
<div class="tile-grid" hx-ext="sse" sse-connect="/events">
|
|
for _, t := range tiles {
|
|
@HostTile(t)
|
|
}
|
|
</div>
|
|
}
|
|
</section>
|
|
}
|
|
}
|