ui/client/features/processes/hooks/useProcesses
Cockpit client (features), v0.8. Source: ui/client/features/processes/hooks/useProcesses.tsx.
Functions#
useProcesses()#
useProcesses(
projectDir):object
Defined in: ui/client/features/processes/hooks/useProcesses.tsx:18
Every process for the current project, kept live by the read-only socket. Lives above the drawer (in the shell) so the top-bar count is real while the drawer is closed, and a running process is simply there again after a reload because the server, not this hook, remembers it.
Parameters#
projectDir
string | null
Returns#
object
control
control: (
id,verb) =>Promise<void>
Parameters
id
string
verb
Returns
Promise<void>
decide
decide: (
id,path,verdict,diffSha256) =>Promise<void>
Parameters
id
string
path
string
verdict
"approve" | "reject"
diffSha256
string | null
Returns
Promise<void>
loadDiff
loadDiff: (
id,path) =>Promise<void>
Parameters
id
string
path
string
Returns
Promise<void>
loadReview
loadReview: (
id) =>Promise<void>
Parameters
id
string
Returns
Promise<void>
running
running:
number
select
select: (
id) =>void
Parameters
id
string
Returns
void
state
state:
ProcessesState