Commit graph

6 commits

Author SHA1 Message Date
Roland
e51e5fb2fb controller: group services into Core vs Optional & Maintenance
The Controller listed every wrolpi-* service in one flat table, which was
confusing for new users who couldn't tell always-on infrastructure from
one-off/dev/maintenance units.

Services are now split into two groups computed once in the backend and
exposed as `service.group`:

* Core Services      - persistent services enabled at boot (api, app, caddy,
                       kiwix, ...), the normal running system.
* Optional & Maintenance - one-off/dev/maintenance tasks (bootstrap, repair,
                       upgrade, *-dev, discovered wrolpi-*), plus persistent
                       services the user has disabled at boot (e.g. Samba with
                       no shares configured).

Rule: core iff kind == "persistent" and enabled; otherwise optional. Group
membership only changes when the user toggles Boot, never on start/stop or
polling, so rows stay put. Within each group, failed/stopped services sort
first so problems stay visible.

Feature parity across all three render paths: the React ControllerPage, the
server-side Jinja template, and the client-side poll refresh. Docker
containers have no group field and fall back to a single ungrouped list.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-22 19:46:13 -06:00
Roland
51a12b199e
Controller: keep every wrolpi-* service visible in the UI.
show_only_when_running hid wrolpi-upgrade the moment it exited — exactly
when its logs matter after a failed upgrade — and hid wrolpi-api-dev
whenever it was stopped.  Reinterpret the flag: hide a service only when
its unit is not installed on the box (LoadState=not-found).  Discovery
now unions loaded units (--all, catching transient and exited units)
with installed unit files, and discovered services are listed regardless
of running state.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 20:30:30 -06:00
Roland
9b3a03012e
Controller logs when it takes actions. 2026-03-14 10:03:11 -06:00
Roland
e8bc2b32c4
Displaying any wrolpi-* service in the Controller, now that we have these scripts. 2026-03-05 18:11:25 -07:00
Roland
0d155c9311
Allowing controller to restart itself. 2025-12-25 09:29:01 -07:00
Roland
b9158b60fe Creating Controller service which will control WROLPi services, admin, SMART, disks, and status. nginx will fallback to Controller UI when React UI is unavailable (such as during upgrades). 2025-12-15 15:48:40 -07:00