Line

ui/client/features/tests/hooks/useRunSnapshot

Cockpit client (features), v0.9. Source: ui/client/features/tests/hooks/useRunSnapshot.tsx.

Functions#

useRunSnapshot()#

useRunSnapshot(feature): object

Defined in: ui/client/features/tests/hooks/useRunSnapshot.tsx:10

Where the selected feature's test run stands: read from the server when the feature changes, and again every second while a run is live. A late answer for a feature that is no longer selected is dropped.

Parameters#

feature

string

Returns#

object

refresh

refresh: () => Promise<void>

Returns

Promise<void>

setSnap

setSnap: Dispatch<SetStateAction<RunSnapshot | null>>

snap

snap: RunSnapshot | null