ui/client/features/tests/hooks/useStepReview
Cockpit client (features), v0.9. Source: ui/client/features/tests/hooks/useStepReview.tsx.
Functions#
useStepReview()#
useStepReview(
feature,editing,dispatch):object
Defined in: ui/client/features/tests/hooks/useStepReview.tsx:11
The two server round trips of an edit: ask for the diff (nothing is written), then write exactly that diff.
Parameters#
feature
string
editing
{ announce: string; draft: DraftStep[]; hash: string; machine: MachineInfo; name: string; nextKey: number; notice: string | null; original: StepFields[]; path: string; review: StepReview; selected: number | null; status: "editing"; title: string; } | null
dispatch
Dispatch<StepEditorAction>
Returns#
confirm
confirm: () =>
Promise<void>
Write the reviewed change, then reopen the saved file so the document is the file.
Returns
Promise<void>
review
review: () =>
Promise<void>
Ask the server to validate the edit and show what would change.
Returns
Promise<void>