ui: Apply everywhere — power toggles, plan preview, no start/stop/install
Rework the dashboard around convergence:
- ServiceControls / ServiceCard / JobCard: replace start/restart/stop
with a Power toggle (set enabled → apply, i.e. activate/deactivate)
plus Restart (the one imperative bounce).
- ToolDetail: install/uninstall becomes an Enable/Disable toggle;
`installed` stays the live state, `enabled` the desired one.
- ConfigPanel Apply and CreateDeploymentForm now POST /apply (one
converge that renders + restarts only what changed) instead of
/deploy + a separate start/restart.
- New ConvergePanel on Overview: a terraform-style Preview (POST /apply
plan=true) showing would-activate/restart/deactivate, then Apply.
- useApply + useSetEnabled hooks; `enabled` added to Service/Job/
Deployment types; both handle the self-restart connection drop.
Backend: PUT /config/deployments/{name}/enabled sets desired on/off
(edit config; caller runs apply) — the declarative toggle the UI uses.
Dashboard builds clean (tsc + vite); 59 API tests pass; live /apply and
/services?enabled verified after an api restart.
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
||||
} from "@/services/api/hooks"
|
||||
import { NodeBar } from "@/components/NodeBar"
|
||||
import { PageHeader } from "@/components/PageHeader"
|
||||
import { ConvergePanel } from "@/components/ConvergePanel"
|
||||
|
||||
export function Overview() {
|
||||
const { data: services } = useServices()
|
||||
@@ -96,6 +97,8 @@ export function Overview() {
|
||||
</Link>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<ConvergePanel />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user