generated from mathias/template-go-web
feat(atlas): Phase C — recent-runs timeline
A strip of the last 12 runs (aggregate pass/fail/running per run) below the substrate ribbon, coloured, newest-first, run # on hover. Parsed from the same Gitea /actions/tasks fetch (RecentRuns, test-first; State refactored to share the aggregate). No new RBAC. Hidden when no live data. Verified: build/vet/lint(0)/test green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -47,6 +47,7 @@ func NewHandler() http.Handler {
|
||||
if ld.ns != "" {
|
||||
a.NS = "Tailscale mesh · " + ld.ns
|
||||
}
|
||||
a.Timeline = ld.timeline
|
||||
if ld.run != nil {
|
||||
nodes := atlas.RunNodes(*ld.run)
|
||||
for i := range a.Stages {
|
||||
@@ -71,10 +72,11 @@ func NewHandler() http.Handler {
|
||||
|
||||
// liveOverlay holds cluster-sourced substrate facts (node specs + namespace line).
|
||||
type liveOverlayData struct {
|
||||
hosts []atlas.Host
|
||||
ns string
|
||||
run *atlas.RunSummary
|
||||
deploy *atlas.Deploy
|
||||
hosts []atlas.Host
|
||||
ns string
|
||||
run *atlas.RunSummary
|
||||
deploy *atlas.Deploy
|
||||
timeline []atlas.RunDot
|
||||
}
|
||||
|
||||
// live cache: query the cluster at most once per TTL; fall back to the authored
|
||||
@@ -110,6 +112,9 @@ func liveOverlay() liveOverlayData {
|
||||
if r, err := atlas.LatestRunJobs(raw); err == nil {
|
||||
d.run = &r
|
||||
}
|
||||
if dots, err := atlas.RecentRuns(raw, 12); err == nil {
|
||||
d.timeline = dots
|
||||
}
|
||||
}
|
||||
if raw, err := cluster.Deployment(); err == nil {
|
||||
if dep, err := atlas.DeployState(raw); err == nil {
|
||||
|
||||
Reference in New Issue
Block a user