ui: GitHub-Actions-style detail page, sub-steps, mini-tile run-view
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>
This commit is contained in:
+32
-7
@@ -91,12 +91,35 @@ func Storage(ctx context.Context, d Deps) Outcome {
|
||||
|
||||
// Per target: short badblocks write sample + fio random-read/write.
|
||||
var samples []Sample
|
||||
var subs []SubStepReport
|
||||
perDisk := map[string]any{}
|
||||
for _, t := range targets {
|
||||
d.Info("Storage: running badblocks write sample on " + t.Device)
|
||||
bbStart := time.Now()
|
||||
bb := runBadblocks(ctx, t.Device)
|
||||
bbEnd := time.Now()
|
||||
bbSummary, _ := json.Marshal(bb)
|
||||
subs = append(subs, SubStepReport{
|
||||
Name: fmt.Sprintf("badblocks %s", t.Device),
|
||||
Passed: bb.OK,
|
||||
StartedAt: bbStart,
|
||||
CompletedAt: bbEnd,
|
||||
SummaryJSON: bbSummary,
|
||||
})
|
||||
|
||||
d.Info(fmt.Sprintf("Storage: running fio random rw on %s", t.Device))
|
||||
fioStart := time.Now()
|
||||
fr := runFio(ctx, t.Device)
|
||||
fioEnd := time.Now()
|
||||
fioSummary, _ := json.Marshal(fr)
|
||||
subs = append(subs, SubStepReport{
|
||||
Name: fmt.Sprintf("fio %s", t.Device),
|
||||
Passed: fr.Error == "",
|
||||
StartedAt: fioStart,
|
||||
CompletedAt: fioEnd,
|
||||
SummaryJSON: fioSummary,
|
||||
})
|
||||
|
||||
perDisk[t.Device] = map[string]any{
|
||||
"badblocks": bb,
|
||||
"fio": fr,
|
||||
@@ -107,10 +130,11 @@ func Storage(ctx context.Context, d Deps) Outcome {
|
||||
)
|
||||
if !bb.OK {
|
||||
return Outcome{
|
||||
Passed: false,
|
||||
Message: "badblocks found errors on " + t.Device,
|
||||
Summary: "badblocks failed on " + t.Device,
|
||||
Extras: map[string]any{"per_disk": perDisk, "wipe_probe": probes},
|
||||
Passed: false,
|
||||
Message: "badblocks found errors on " + t.Device,
|
||||
Summary: "badblocks failed on " + t.Device,
|
||||
Extras: map[string]any{"per_disk": perDisk, "wipe_probe": probes},
|
||||
SubSteps: subs,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -120,9 +144,10 @@ func Storage(ctx context.Context, d Deps) Outcome {
|
||||
|
||||
d.Info(fmt.Sprintf("Storage: %d disk(s) passed badblocks + fio", len(targets)))
|
||||
return Outcome{
|
||||
Passed: true,
|
||||
Summary: fmt.Sprintf("%d disks passed", len(targets)),
|
||||
Extras: map[string]any{"per_disk": perDisk, "wipe_probe": probes},
|
||||
Passed: true,
|
||||
Summary: fmt.Sprintf("%d disks passed", len(targets)),
|
||||
Extras: map[string]any{"per_disk": perDisk, "wipe_probe": probes},
|
||||
SubSteps: subs,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user