feat(panel): fleet
This commit is contained in:
14 files changed
+978
-38
No files matched your search
@@ -1,6 +1,7 @@
|
||||
import type {
|
||||
ApiError,
|
||||
CreateServerRequest,
|
||||
FleetServer,
|
||||
Identity,
|
||||
LinkResult,
|
||||
LinkStatus,
|
||||
@@ -80,6 +81,13 @@ export const api = {
|
||||
myServers: () =>
|
||||
request<{ servers: ServerInfo[] }>("GET", "/me/servers").then((r) => r.servers ?? []),
|
||||
|
||||
// fleet is the SysAdmin cockpit's fleet-wide read (admin-tier GET /fleet): every
|
||||
// server's CRD lifecycle view plus its owner. It 403s for a non-admin principal —
|
||||
// the panel only renders the cockpit link behind is_admin, and the route guards
|
||||
// again server-side regardless of what the UI shows.
|
||||
fleet: () =>
|
||||
request<{ servers: FleetServer[] }>("GET", "/fleet").then((r) => r.servers ?? []),
|
||||
|
||||
status: (name: string) => request<ServerInfo>("GET", `/servers/${name}/status`),
|
||||
|
||||
wake: (name: string) =>
|
||||
|
||||
Reference in new issue
Block a user