Line

You are reading the unreleased docs (next). See latest (v0.9)

ui/client/features/workflows/hooks/useWorkflowEditor

Cockpit client (features), next. Source: ui/client/features/workflows/hooks/useWorkflowEditor.tsx.

Functions#

useWorkflowEditor()#

useWorkflowEditor(state, dispatch): object

Defined in: ui/client/features/workflows/hooks/useWorkflowEditor.tsx:12

  • visual edit flow: propose (server computes the patched source, nothing written, diff shown) -> confirm (server re-applies the same edit, checks the file has not changed and the architecture rules still pass, then writes).

Parameters#

state

WorkflowsState

dispatch

Dispatch<WorkflowsAction>

Returns#

object

cancelEdit

cancelEdit: () => void

Returns

void

confirmEdit

confirmEdit: () => Promise<void>

Returns

Promise<void>

proposeEdit

proposeEdit: (req) => Promise<void>

Parameters
req

WorkflowEditRequest

Returns

Promise<void>