ui/client/features/shell/hooks/useProjectSwitcher
Cockpit client (features), v0.8. Source: ui/client/features/shell/hooks/useProjectSwitcher.tsx.
Functions#
useProjectSwitcher()#
useProjectSwitcher():
object
Defined in: ui/client/features/shell/hooks/useProjectSwitcher.tsx:10
Current local project + the switch and close actions (reuses the settings project dir). After a successful switch or close the page reloads so every screen re-reads the project (each screen fetches its data on mount). Closing leaves the server with none open.
Returns#
object
choose
choose: (
next) =>Promise<void>
Parameters
next
string
Returns
Promise<void>
close
close: () =>
void
Returns
void
closeProject
closeProject: () =>
Promise<void>
Returns
Promise<void>
dir
dir:
string|null
error
error:
string|null
known
known:
boolean
label
label:
string
open
open:
boolean
show
show: () =>
void
Returns
void
toggle
toggle: () =>
void
Returns
void