dashboard: friendlier interval input for scheduled prompts (closes #466)

Replaces the single raw-seconds field in the SCH3DUL3D PR0MPTS
creation form with a structured composer:

- Preset chip row (1m / 5m / 15m / 30m / 1h / 6h / 12h / 1d / 7d
  / one-shot) that fills the parts inputs in one click
- Four small d/h/m/s number inputs combined into total seconds
  on submit (all-zero = one-shot, preserving the backend null
  semantic)
- Live "↻ every …" preview using the existing fmtDuration helper
  so the operator sees what they're about to queue

Carry semantics extended to round-trip the split fields across
state-poll re-renders; legacy `interval` carry still honoured if
an older bundle is in the page.

Docs (web-ui.md) updated to describe the new composer.
This commit is contained in:
iris 2026-05-26 13:34:28 +02:00 committed by Mara
commit caa0c6ce4c
3 changed files with 168 additions and 16 deletions

View file

@ -234,7 +234,9 @@ creation form lets the operator queue a new schedule directly:
targets (multi-select checkboxes drawn from live container
names + `operator` + `manager`), prompt body (textarea),
first-fire datetime-local (pre-filled to 5 minutes from now),
optional recurrence interval in seconds (blank = one-shot),
an interval composer (#466 — preset chips for common
durations + separate d/h/m/s number fields with a live
"↻ every …" preview; all-zero = one-shot),
and an optional human-readable description. On submit the
form POSTs to `/api/schedules` as JSON; the tab pill shows
the count of active schedules (at least one live target not