Alerts tab, Docker tab, nine new skins including HUD, a colour for every machine

Alerts: rules over sensors, watched fleet-wide from the hub; ntfy and webhook channels;
firing count on the rail. Docker: containers by stack with live use, start/stop/restart,
following logs, inspect, images/volumes/networks. Skins: HUD, Nord, Gruvbox, Catppuccin
(+Latte), Dracula, Tokyo Night, Solarized (+Light). Accents: per-machine colour.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Mitchell-Johnson
2026-09-19 15:07:15 -07:00
co-authored by Claude Fable 5.1
parent 63fcba6077
commit cb1617c2b8
17 changed files with 1185 additions and 15 deletions
+23
View File
@@ -189,6 +189,29 @@ something long in one, switch away and back, refresh — it's all still there.
tab read the sensor API too (`sampleAdapter.ts`); `/api/metrics` is retired.
Also per-service and per-container sensors (memory and CPU from cgroups), tokens limited
to ID patterns, and `/api/fleet/sensors/query` for the whole fleet in one request.
- **Alerts** — **shipped 2026-09-19** (`internal/api/alerts.go`, `Alerts.tsx`): rules over
sensors (`container.*.running == false for 120 s`), evaluated by the hub every 15 s for
itself and every managed machine in one shaped query each; `hamlab.reachable` is supplied
by the hub so "a machine stopped answering" is a rule like any other. Ten defaults
(machine offline, container down/unhealthy, failed service, disk full, pool unhealthy,
SMART failing, UPS on battery, CPU hot, memory). Firing and resolved are events: kept
(last 200, in `state.json`), shown on the hub-only Alerts tab with a count on the rail,
and POSTed to channels — **ntfy** (title/priority headers) or a **webhook** (JSON; Home
Assistant, Slack). The rule editor shows what a selector matches across the fleet as
you type. Not done: quiet hours, per-rule channels, Web Push straight to the PWA.
- **Docker tab** — **shipped 2026-09-19** (`internal/api/docker.go`, `Docker.tsx`):
containers grouped by compose stack with live memory and CPU from the container
sensors, start / stop / restart (asked first), logs that follow (polled with `--since`,
no held connection), inspect (env *names* only), and images / volumes / networks
tables. Works on every machine through the hub; `#/grid/docker/immich_server` links to
one. Creating, removing and pruning are deliberately absent — Dockhand stays the one
place that changes what exists.
- **Skins** — 13 since 2026-09-19 (`themes.ts`: a palette is one `mk(…)` line): Dark,
Light, Cyberpunk, Retro, **HUD** (hairlines of cyan on near-black, corner ticks, thin
type), Nord, Gruvbox, Catppuccin + Latte, Dracula, Tokyo Night, Solarized Dark + Light;
each repaints the terminal too. **Each machine wears a colour** (`accents.ts`): a stripe
across the header and its name in the switcher — picked from ten swatches or any colour
on the Machines page, else derived from its name — saved with the theme on the hub.
- **Multi-host** — **Phase 1 shipped 2026-09-18** (`internal/nodes`, `internal/tlsauto`,
`MachineSwitcher.tsx`, `Machines.tsx`). One binary, hub and spoke: a host whose
`config.json` lists `nodes` is a hub; any other is a standalone node with its full UI.