mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-07-26 11:49:16 +00:00
feat(fleet): add node management actions to Fleet Overview (#1064)
* refactor(nodes): extract node create/edit/delete modals into useNodeActions hook Pulls the inline Add/Edit/Delete/Pilot-enrollment modal stack out of NodeManager.tsx and into a reusable useNodeActions() hook in components/nodes/. Settings continues to consume the same modals via this hook, with an onTestResult callback used by Settings to render the existing connection-detail panel after a successful test. The hook also extends the auto-test-on-save behavior so that saving a proxy-mode remote node from the Edit dialog re-runs the connection test when the API URL or token has actually changed (skipped when only name or compose dir was edited). * feat(fleet): surface Add/Edit/Delete node actions on Fleet Overview Adds an admin-only Add node button to the right of Refresh on the Fleet header, opening the same Add Node dialog used by Settings. Each node card's three-dot menu now exposes Edit node and Delete node items (routed through the shared useNodeActions hook) alongside the existing Cordon item, so operators can manage node lifecycle without leaving the Fleet page. The card kebab is shown to admins regardless of tier; Cordon stays Admiral-only. Delete is hidden on the local default node. After any Add/Edit/Delete the Fleet overview refetches so the grid reflects the change immediately. * docs(fleet): document Add/Edit/Delete node actions on Fleet Overview Updates the Action buttons table to cover the new Add node entry point on the Fleet header, and adds a new Node actions menu section describing the per-card Edit/Delete/Cordon items, their tier and permission gating, and the auto connection test that fires after saving a proxy-mode remote.
This commit is contained in:
@@ -61,12 +61,13 @@ The Fleet page has three tabs:
|
||||
|
||||
### Action buttons
|
||||
|
||||
Two buttons sit in the top-right corner:
|
||||
Three buttons sit in the top-right corner:
|
||||
|
||||
| Button | What it does |
|
||||
|--------|--------------|
|
||||
| **Check Updates** | Opens the Node Updates modal to view and apply Sencho version updates across your fleet (Skipper+) |
|
||||
| **Refresh** | Re-fetches data from all nodes. Shows a spinner while loading |
|
||||
| **Add node** | Opens the same Add Node dialog as Settings → Nodes so you can register a new node without leaving the Fleet page. Admin-only. After saving a remote proxy node, a connection test runs automatically and the result toasts in (success or saved-but-unreachable). |
|
||||
|
||||
## Community features
|
||||
|
||||
@@ -94,6 +95,18 @@ Nodes with an available Sencho update also show an **Update to vX.Y.Z** button a
|
||||
|
||||
Offline nodes are visually dimmed and show a "Node unreachable" placeholder instead of stats.
|
||||
|
||||
### Node actions menu (admin)
|
||||
|
||||
The kebab menu in the top-right of each card surfaces the same lifecycle actions you'd find in Settings → Nodes:
|
||||
|
||||
| Action | Notes |
|
||||
|--------|-------|
|
||||
| **Edit node** | Opens the Edit dialog prefilled with the node's connection details. For proxy-mode remotes, saving with a changed API URL or token re-runs the connection test automatically. |
|
||||
| **Delete node** | Opens a destructive confirmation. The local (default) node has no Delete option. Deleting a remote only removes it from this console; the remote instance and its containers are untouched. |
|
||||
| **Cordon node** / **Uncordon node** | Marks the node unschedulable so new blueprint deployments skip it (Admiral). Existing deployments keep running. |
|
||||
|
||||
The menu is admin-only. Non-admin users see no kebab on the card.
|
||||
|
||||
### Manual refresh
|
||||
|
||||
Click the **Refresh** button in the top-right to re-fetch data from all nodes. The button shows a spinner while loading.
|
||||
|
||||
Reference in New Issue
Block a user