dashboard: label graceful-stop queue entries 'stopping…' on agent cards

#1785 routes a graceful stop through the rebuild queue as a GracefulStop
entry (wire kind 'graceful_stop'). The SW4RM container-row badge renderer
didn't recognise that kind, so an in-flight graceful stop fell through to
the generic 'rebuilding' / 'rebuild queued' label. Add the case so the card
shows 'stopping…' (running) / 'stop queued' (queued), giving the graceful
stop the same live card progress as a rebuild. Doc the badge kind too.
This commit is contained in:
iris 2026-06-19 11:58:00 +02:00 committed by mara
commit cba02fc47e
2 changed files with 12 additions and 9 deletions

View file

@ -706,9 +706,10 @@ fetch entirely.
restart / rebuild / destroy). Additionally, when a rebuild-queue
entry for this agent is `queued` or `running` but no
operator-initiated transient is set, the card surfaces a
`building…` / `meta-updating…` badge sourced from
`rebuildQueueState` — so the SW4RM tab shows the same
rebuild progress visible on the C0R3 page's R3BU1LD QU3U3.
`building…` / `meta-updating…` / `stopping…` badge (per queue
`kind` — a `graceful_stop` entry shows `stopping…` / `stop
queued`) sourced from `rebuildQueueState` — so the SW4RM tab
shows the same progress visible on the C0R3 page's R3BU1LD QU3U3.
The row visual splits queued vs running: a **queued** entry shows
only the pending-state pill (no row tint, so a long queue doesn't
paint half the tab amber); a **running** entry keeps the amber

View file

@ -874,13 +874,15 @@ window.marked = marked;
const op = !transientKind ? inFlight.get(c.name) : null;
const pending = transientKind
|| (op && (op.state === 'running'
? (op.kind === 'meta_update' ? 'meta-updating'
: op.kind === 'destroy' ? 'destroying'
: op.kind === 'restart' ? 'restarting'
? (op.kind === 'meta_update' ? 'meta-updating'
: op.kind === 'destroy' ? 'destroying'
: op.kind === 'restart' ? 'restarting'
: op.kind === 'graceful_stop' ? 'stopping'
: 'rebuilding')
: (op.kind === 'meta_update' ? 'meta-update queued'
: op.kind === 'destroy' ? 'destroy queued'
: op.kind === 'restart' ? 'restart queued'
: (op.kind === 'meta_update' ? 'meta-update queued'
: op.kind === 'destroy' ? 'destroy queued'
: op.kind === 'restart' ? 'restart queued'
: op.kind === 'graceful_stop' ? 'stop queued'
: 'rebuild queued')));
const opRunning = transientKind != null
|| (op != null && op.state === 'running');