mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-22 03:04:03 +00:00
7617795bdc
Frontend wedge for the per-resource operator-state feature: an operator working on a resource can now toggle Intentionally offline and Never auto-remediate without curling the API. The section lives on the overview tab next to the action audit history so the "what overrides has the operator set" and "what actions has Pulse taken" stories read together. NeverAutoRemediate is a safety override — flipping it on requires an explicit confirmation prompt naming what the lock means, while flipping it back off is permissive (releasing a lock is the recoverable action). Maintenance windows are surfaced read-only this slice; scheduling lives in a follow-up that owns the date-picker UX. Uses createNonSuspendingQuery rather than createResource so the drawer's parent Suspense boundary does not flicker the page-level "Loading view..." fallback while operator state is in flight. The save path preserves any currently-persisted maintenance-window data so this toggle slice does not clobber the future window-scheduler slice. Adds a TS API client (getResourceOperatorState / setResourceOperatorState / clearResourceOperatorState) that mirrors the canonical Go shape from slice 30, with 404 -> null normalization on the GET path so callers see "no state" as a clean default.