Commit graph

51 commits

Author SHA1 Message Date
fe78bcfc49 MQTT clients tab: show broker host/port and Tasmota setup hint
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-15 10:22:24 +00:00
60c27df45c Admin settings: simplified MQTT client form, reveal/reset password, open access
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 12:25:49 +00:00
eaaba72ae2 Add field label for met_office's new forecast_api_key
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-25 13:35:28 +00:00
b4c2270973 Fix "Configured" badge for secret-less integrations (hotel_location)
isConfigured only checked integration.secrets for a MASKED value, so any
integration with zero secretFields (hotel_location: lat/lon only, no
secrets) could never show "Configured" even with valid values saved —
same edge case hosted_tables already needed a special-case for. Add the
matching special-case for hotel_location. Also add proper FIELD_LABELS
entries for latitude/longitude instead of showing the raw field name.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-25 11:26:50 +00:00
06690f0581 portal: multi-line topic scope input + 'Add topic' on existing MQTT clients
Matches settings' new multi-topic-per-client support: the create form's
Topic scope field is now a textarea (one pattern per line), the list shows
all of a client's scopes, and a '+ Topic' button lets an admin grant an
existing client more topic access without recreating it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-13 14:01:24 +00:00
411911c4c8 portal: 'service consumer' checkbox for MQTT broker clients
Surfaces settings' new service-client flag in the MQTT Broker Clients tab —
a checkbox that stores the password encrypted so a stack app (e.g.
hvac-backend) can fetch its own login at runtime, plus a 'service' badge in
the client list. Device logins are unchanged (leave the box off).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-13 13:42:58 +00:00
26c16e952d MQTT tab: topic tree + feed views, auto-refresh
Replaces the flat scrolling capture log with a structured message buffer
(mqttMessages) rendered two ways: a collapsible topic tree showing each
topic's latest value (MQTT-Explorer-ish), and a chronological feed. An
"Auto-refresh" toggle repeats the existing 8s /deploy/exec capture every
~9s and merges results in, rather than requiring a manual click each time.

Still not a genuine live stream (no WebSocket listener on the broker) —
just polling dressed up to feel closer to one, without touching the
broker or NPM config.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-28 17:38:04 +00:00
e53ff84761 Add MQTT tab (broker capture) and MQTT Clients admin page
AdminMonitor: new "MQTT" tab reuses the existing Shell tab's /deploy/exec
mechanism to run a bounded (8s) mosquitto_sub capture against the broker
LXC via a read-only "mqtt-inspector" identity — a one-shot capture, not a
live stream, since /deploy/exec is request/response. Retained messages
(most device telemetry) show immediately regardless.

AdminSettings: new "MQTT Clients" tab — create/list/revoke broker
identities via the new settings API, matching forecasting's API Keys
show-once-password UX. Removes the need to hand-run mosquitto_ctrl for
every new device or app that needs broker access.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-28 17:11:50 +00:00
0b8fed2e96 Add calendar summary to dashboard; default portal to 1hr inactivity timeout
Dashboard now shows today's and upcoming events (mine or all, toggle) for
users with calendar app access. Also gives the portal shell a 1-hour
inactivity default for devices that have never been configured, instead of
following child apps into an unlimited 30-day session — that's why the
dashboard could sit logged in for days without prompting. An explicit "Off"
choice in Admin Settings still overrides it (now written as mins=0 instead
of clearing the cookie, so it's distinguishable from "never configured").
2026-07-28 12:45:29 +00:00
d2603bca99 Fix session-expiry redirect losing return-to-app + wire up inactivity timer
Login.tsx only read the return path from router state, which a hard
cross-document navigation (a child app bouncing the whole shell here
on session expiry) can never carry — so re-authenticating always
landed on the Dashboard instead of back in whatever app you were
using. Login.tsx now also accepts a ?from= query param for that case.

Also wired up AuthGate's inactivity auto-logout timer, which was
defined (getInactivityMs) but never actually called — so the
per-device timeout configurable in Admin Settings had no effect.
Disabled for installed PWAs as intended.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-24 17:07:21 +00:00
f89600a135 Force desktop width on AdminMonitor — admin tool not suited to mobile layout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-21 09:37:56 +00:00
b3c02adf76 Add PageShell — collapsed sidebar strip on Dashboard and all admin pages
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-21 09:15:12 +00:00
de49df70b0 Listen for hnf:viewport postMessage — resize iframe to 1280px for desktop-forced pages
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-21 09:00:37 +00:00
e76753f92f Fix hosted_tables isConfigured — check site_url config field not secrets
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-15 17:22:58 +00:00
880cd9793d Add auth secret reveal panel to Hosted Tables integration card
Admin clicks 'Auth secret', re-enters their password, and sees CENTRAL_AUTH_SECRET
with a copy button. Secret auto-clears after 60 seconds.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-15 15:46:41 +00:00
279872364c Add site_url field label for Hosted Tables integration card
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-15 15:41:53 +00:00
51c99f1ee9 Persist iframe sub-page in URL hash so refresh returns to the same page
On every iframe load, mirror its current path to the portal URL hash
(e.g. /app/cashup#/reports). On mount, initialSrc reads that hash and
restores the correct page after a refresh. Hash is cleared when
switching apps so it doesn't bleed across slugs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-15 10:51:23 +00:00
d0fb78da51 Show commits-behind badge on Updates tab
Displays a gold badge next to the latest commit hash when the backend
returns a commitsBehind count greater than zero.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-15 09:24:31 +00:00
4cff59f8ca Collapse user permissions into expandable section on admin users page
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-14 15:55:08 +00:00
bcd91f1c50 Show custom success message from test result if present
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-14 13:55:34 +00:00
03b241ec74 Add Rebuild button to Updates tab — triggers rebuild without git pull 2026-07-14 13:22:58 +00:00
3562c178d7 Add FIELD_LABELS for SambaPOS split SQL/GraphQL credential fields
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-14 13:09:09 +00:00
8a8c4073e5 Add Nextcloud directory browser to backup_path field in Settings
The Backup Directory field in the Nextcloud integration card gains a
Browse button that opens an inline panel with: breadcrumb navigation,
scrollable directory list, and a Select button to pick the current path.
Falls back to manual text entry.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-14 11:09:47 +00:00
3cfa092f73 Add Backups tab to AdminMonitor, backup_path label to Settings
Backups tab shows last-run status, expandable run history with per-item
breakdown (db/vol, size, status), and a Run Now trigger button.
Settings Nextcloud card gains a Backup Directory field.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-14 11:03:52 +00:00
c40d7617f4 Add Shell tab to AdminMonitor — run commands on app containers via SSH
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-14 09:27:45 +00:00
43a54e8b4c Rename Uptime tab to States; add RAM/disk progress bars per service
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-14 09:04:23 +00:00
f36fd83196 Replace hotel emoji on login screen with Lucide Hotel icon; add sidebar scrollbar styles
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-14 08:17:51 +00:00
63b6240c22 Add This Device tab to portal admin settings 2026-07-13 12:48:06 +00:00
5b11a0d4aa Register: add confirm password field with mismatch highlight
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-07 15:54:13 +00:00
817e5f905d AdminSettings: labels for from and reply_to SMTP fields
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-07 15:47:11 +00:00
dd022f80bb AdminSettings: restore location name display in dropdown
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-07 13:14:11 +00:00
4e5a9f6466 AdminSettings: show team names in location dropdown
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-07 13:11:17 +00:00
28e470433a AdminSettings: show error message when location fetch fails
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-07 13:03:57 +00:00
f902e87e25 Add App Settings tab to admin settings — per-app session timeout UI
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-07 12:57:17 +00:00
1ccaaed8be AdminSettings: Workforce location picker with fetch button
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-07 12:52:37 +00:00
1dcf8bfbcb AdminDepartments: light theme, group by location, location_name support
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-07 12:42:50 +00:00
f3d46b8c80 Add bearer_token and other missing Workforce field labels
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-07 12:35:01 +00:00
9451de5a6c feat(monitor): show commit timestamps in updates tab
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-02 15:58:42 +00:00
7667551f07 feat(portal): collapsible sidebar in app frame
When an app is open, the sidebar collapses to a 44px strip with a
chevron button. Clicking it opens the full sidebar as a fixed overlay
with a backdrop that closes on click. Also closes automatically when
the user interacts with / navigates within the iframe (window blur).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-02 15:56:04 +00:00
f5969b0001 Admin UI: manage per-app granular capabilities
- AdminRoles: capability sub-toggles under each granted app
- AdminUsers: per-app direct capability grants; role-derived
  capabilities shown read-only as "(role)"
- types: Role.capabilities + Capability interface

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 14:19:16 +00:00
bababbfc1a Fix dark-theme CSS variables on Roles and Users admin pages
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-02 00:31:45 +00:00
fa32ea84ee Add self-registration, role management, and department mapping UI
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-02 00:24:05 +00:00
e9cd40c80a Add Settings admin page and settings service proxy
Wire /admin/settings route and sidebar link; proxy /settings/api/ to the
new settings service at 10.10.10.116. Admin can configure integration
credentials and manage Newbook room ordering from the portal.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 18:56:27 +00:00
affb1368ac Add category grouping to sidebar and dashboard
Sidebar now renders uncategorised apps flat and categorised apps in
collapsible accordion sections; active category stays expanded. Dashboard
groups tiles under category section headings.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 18:26:09 +00:00
092c4fda31 Restyle to light content theme with Lucide icons
- index.css: light body (#f4f5f7), white cards, sidebar stays dark navy
- AppIcon.tsx: Lucide icon lookup component for app tiles and nav
- Sidebar.tsx: Lucide nav icons (LayoutGrid, Users, Activity, LogOut)
- Dashboard.tsx: white cards with shadows, coloured Lucide app icons
- AdminMonitor.tsx: light theme throughout, Lucide tab icons,
  better status colours for light backgrounds

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 18:09:51 +00:00
5dd471c92c Pass force=true on manual refresh to bypass server cache
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 17:50:02 +00:00
87043ba6af Make hotel name configurable via VITE_HOTEL_NAME build arg
Defaults to 'Number Four at Stow'. Replaces hardcoded 'Hotel Number Four'
and 'HNF Manage' in sidebar, login page, and browser title. Other hotels
set VITE_HOTEL_NAME in their /opt/portal/.env before rebuilding.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 17:47:47 +00:00
64efa435c8 Replace Kuma iframe with live service health status tab
Uptime tab now polls /deploy/health-status (parallel HTTP checks) and
shows a status grid with response times. Removes broken Kuma sub-path
nginx locations. Auto-refreshes every 30s.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 17:34:58 +00:00
b1bf0e3af1 Monitor: Updates tab with git version check and one-click deploy
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 17:04:57 +00:00
ea9dba0c58 Monitor page: Uptime Kuma iframe + deploy log; expose /deploy/ via nginx
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 15:53:05 +00:00