wrolpi/controller
Roland 07af0c9f28 controller: de-duplicate the hardware toggles
The Hotspot, Bluetooth, Desktop, VNC and Throttle toggles had each been written
out longhand at four layers. Collapse the shared parts:

- useSubsystemToggle() replaces five near-identical hooks. This also fixes a
  latent bug: only useDesktop/useVnc restored state when a request failed, so a
  failed Bluetooth/Throttle/Hotspot toggle left  at null and — since the
  status poll sees no change — the toggle stayed disabled and read as
  unsupported until it remounted.
- SubsystemToggle renders all five, with the Desktop's stop confirmation and
  VNC's desktop gating as declared options rather than bespoke copies.
- The fallback UI's four update*/toggle* pairs become one config-driven
  implementation (-100 lines).
- _raise_for_action() centralises the 13 endpoint failure checks, including
  VNC's 409-vs-500 split.

Deliberately not shared: the six get_*_status_dict() builders (payloads
genuinely differ) and the per-subsystem mechanisms (nmcli/rfkill/sysfs/systemctl).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:48:08 -06:00
..
api controller: de-duplicate the hardware toggles 2026-07-29 19:48:08 -06:00
lib controller: report and stop every installed VNC backend 2026-07-29 18:10:05 -06:00
templates controller: de-duplicate the hardware toggles 2026-07-29 19:48:08 -06:00
test controller: report and stop every installed VNC backend 2026-07-29 18:10:05 -06:00
__init__.py 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
conftest.py Controller: move hotspot settings to controller.yaml with WiFi device dropdown. 2026-07-04 09:03:58 -06:00
defaults.py controller: selectable hotspot protocol (WPA2/WPA3) with device capability probing 2026-07-28 21:12:24 -06:00
main.py controller: report cooling fan RPM in CPU status 2026-07-23 19:52:47 -06:00
requirements.txt Bump safe dependencies (combined Dependabot updates) 2026-07-15 20:07:21 -06:00
serve.py Migrating Controller from port 8087 to 80 so that it is more discoverable. Reformatting Controller dashboard to make header at the top. Reformatting navigation bar to handle the new links which prevented Admin from being visible in some screens. 2026-04-09 15:01:05 -06:00