ui/client/features/plan/hooks/usePlanValidation
Cockpit client (features), v0.8. Source: ui/client/features/plan/hooks/usePlanValidation.tsx.
Functions#
usePlanValidation()#
usePlanValidation(
state,dispatch):object
Defined in: ui/client/features/plan/hooks/usePlanValidation.tsx:14
The plan document, and the server's verdict on it after EVERY edit (debounced). The client never decides
validity itself: stale is true while the last verdict answers an older plan, and Run stays off then.
Parameters#
state
dispatch
Dispatch<ScreenAction>
Returns#
object
canRun
canRun:
boolean
plan
plan:
PlanDoc
stale
stale:
boolean