Line

You are reading docs for v0.8. See latest (v0.9)

ui/client/features/workflows/hooks/useWorkflowEditor

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

Functions#

useWorkflowEditor()#

useWorkflowEditor(state, dispatch): object

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

#61 - 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>