Commit Graph

140 Commits

Author SHA1 Message Date
admin 465dec443f Phase A — Storage Paths Foundation & Backup Toggle Fix 2026-02-17 08:40:11 +01:00
admin 7d801d1094 Phase 3 complete: per-app backup toggles, restore, storage overview
- Storage overview on backup page (SSD/HDD bars, repo stats)
- Restic password visibility + hub sync for disaster recovery
- App data discovery (HDD bind mounts, Docker volumes)
- Per-app backup toggle checkboxes with settings persistence
- Dynamic backup paths: enabled app HDD data included in restic snapshots
- Limited app restore from snapshots (self-service recovery)
- Snapshots API endpoint for restore dropdown
- Version bump to 0.8.0

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 21:29:56 +01:00
admin a3af7c6a2d Phase 3 — Storage Overview & Per-App Backup Toggles 2026-02-16 21:05:51 +01:00
admin 2649297096 Controller v0.7.2: notification preferences sync to hub
- SyncPreferences() method on Notifier: POST to hub /api/v1/preferences
- IsEnabled() getter for hub connectivity check
- settingsNotificationsHandler: sync to hub after local save (3 flash message variants)
- Startup sync: non-blocking goroutine pushes prefs to hub on boot (DB rebuild recovery)
- Updated CONTEXT.md, README.md with v0.7.2 changes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 20:18:22 +01:00
admin 8f5962c47d Fix Notification Preferences Sync (Controller → Hub) 2026-02-16 20:11:39 +01:00
admin d1032a3a4f Update CONTEXT.md for session 23 — v0.7.1 Phase 2 summary
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 19:34:24 +01:00
admin 3eee330ed5 Phase 2: monitoring warnings, dashboard alerts & notification system
- Monitoring page: "Távoli monitoring" section showing healthcheck ping UUID
  configuration status (configured/not configured) for each of the 5 pings
- Alert manager: persistent dashboard banners on all pages generated from
  health check results, missing pings, and backup status
- Notification system: controller-side notifier sends events to hub relay,
  with cooldown tracking and event-type filtering
- Notification preferences UI: email, event checkboxes, cooldown settings
  on the settings page with test email functionality
- Settings refactored: shared settingsData() helper, NotificationPrefs
  struct with getter/setter and defaults

New files:
- controller/internal/web/alerts.go (AlertManager)
- controller/internal/notify/notifier.go (hub notification client)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 19:29:45 +01:00
admin ded59b687e 0.7.1 - Phase 2 — Monitoring Warnings, Dashboard Alerts & Notification System 2026-02-16 19:09:43 +01:00
admin d7483a522f Update CONTEXT.md and CLAUDE.md for v0.7.0
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 17:29:11 +01:00
admin 4053245be8 v0.7.0: Phase 1 — Authentication, Persistence & Settings Page
- New settings.json persistence layer (internal/settings/settings.go)
  - Atomic write (tmp + rename), thread-safe with sync.RWMutex
  - Stores password hash overrides and DB validation cache
  - Auto-creates on first save, graceful handling if missing

- Auth improvements
  - Password resolution priority: settings.json > controller.yaml > none
  - Session duration extended to 7 days (was 24h)
  - ?next= redirect after session expiry (returns to original page)
  - Flash messages on login page (used after password change)
  - Conditional logout link (hidden when auth disabled)
  - Session invalidation on password change

- New Settings page (/settings)
  - Read-only system config display (customer, domain, git, backup, monitoring)
  - Password change form with validation (min 8 chars, match check)
  - Sidebar "Beállítások" item pinned to bottom above version

- DB validation persistence
  - Validation results saved to settings.json after each dump
  - Cached data survives container restarts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 17:26:59 +01:00
admin 0be1f2e547 Phase 1 — Authentication, Persistence & Settings Page 2026-02-16 17:17:42 +01:00
admin af98d4f48f docs: update CONTEXT.md for session 21 — v0.6.3 bug fixes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 16:33:08 +01:00
admin 29be81f1be fix: require_arg for --hdd-path, explicit event in stackAction, title separator, nextPruneLabel Sunday edge case
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 16:28:41 +01:00
admin 7ca52f88a2 Bug fixes from v0.6.2 code scan 2026-02-16 16:26:12 +01:00
admin 4bee8c3526 Create CLAUDE.md + cleanup + statusIcon fix (felhom.eu repo) 2026-02-16 15:49:53 +01:00
admin ec99aad217 Update CONTEXT.md for session 20 — hub bugs + backup validation fix
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 15:08:15 +01:00
admin 9e8b48a32b fix: backup validation display and debug logging
- Add 4-branch template guard to handle zero-value DumpValidation
  (shows "–" instead of misleading "Hiba" when validation never ran)
- Add debug logging to ValidateDump for all code paths
- Add cross-check re-validation in RefreshCache to heal stale
  lastDBDump validation state from disk

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 14:56:34 +01:00
admin f511433754 Hub Dashboard Bugs + Backup Validation Fix 2026-02-16 14:53:35 +01:00
admin 62a185afb8 Update CONTEXT.md and README.md for v0.6.1
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 14:42:00 +01:00
admin ded0cbb842 v0.6.1: Code review bugfixes — 7 correctness/safety/quality fixes
- Fix http.NotFound(w, nil) → pass actual request in handlers
- Fix dashboard running/stopped counts to match displayed stacks
- Fix Secure cookie blocking HTTP login (dynamic based on request)
- Remove misleading subtle.ConstantTimeCompare in session check
- Fix cleanupSessions goroutine leak (proper ticker + done channel)
- Add http.MaxBytesReader (1MB) to API POST endpoints
- Cache time.LoadLocation("Europe/Budapest") in template funcmap

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 14:40:13 +01:00
admin 104c97040c Code Review Bugfixes (v0.6.1) 2026-02-16 14:35:16 +01:00
admin 59b239739e added csss ignore 2026-02-16 13:28:03 +01:00
admin 8a1b9e57ae docs: update CONTEXT.md and README for v0.6.0
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 13:25:05 +01:00
admin 97074e7a0c v0.6.0: healthcheck + hub reporting implementation
- Add heartbeat ping (every 5 min, controller alive signal)
- Add backup integrity check (weekly restic check, Sunday 04:00)
- Add Heartbeat + BackupIntegrity fields to PingUUIDsConfig
- Add HubConfig for central hub reporting
- Add report package (types, builder, pusher) for hub push
- Wire hub reporting into scheduler (configurable interval)
- Update controller.yaml.example with new monitoring + hub sections
- Add monitoring/DEPRECATED.md for legacy bash scripts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 13:19:08 +01:00
admin 94efc39c34 v0.6.0: Healthcheck Implementation + Central Push + Multi-Customer Dashboard 2026-02-16 13:05:01 +01:00
admin 34ddea2af3 update CONTEXT.md for v0.5.4 session
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 12:06:29 +01:00
admin c1dda1aec6 v0.5.4: monitoring page frontend fixes
- Fix tooltip "Invalid Date" by using raw.x with parsed.x fallback
- Fix chart x-axis bounds by including initial min/max in chartOpts
- Fix sysinfo alignment with fixed 2-column grid and consistent styling
- Fix chart overflow on mobile with min-width:0 and overflow:hidden
- Remove redundant <style> block from monitoring.html (moved to style.css)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 12:04:02 +01:00
admin 71da2938a5 v0.5.4: Monitoring Page Frontend Fixes 2026-02-16 12:02:20 +01:00
admin 4af2b1b560 updated monitoring.html 2026-02-16 11:44:29 +01:00
admin 717d173408 updated DB query and build instructions 2026-02-16 11:19:18 +01:00
admin aea86f8fe2 docs: update CONTEXT.md for v0.5.1 session
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 11:03:09 +01:00
admin b19682a767 fix(monitoring): hostname, tooltip timestamps, default range (v0.5.1)
- Bug 1: Read hostname from /host/etc/hostname instead of os.Hostname()
  which returns the container ID inside Docker. Added volume mount.
- Bug 2: Tooltip callback used parsed.x (category index) instead of
  label (actual timestamp), showing 1970 dates.
- Bug 3+4: Default range changed from 24h to 1h so charts show data
  immediately on new deployments with limited history.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 11:01:08 +01:00
admin b43ccf698a v0.5.1: Monitoring Page Bugfixes 2026-02-16 10:59:16 +01:00
admin 1934d40f85 docs: update CONTEXT.md for v0.5.0 session
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 10:23:17 +01:00
admin 3f30803432 fix(dashboard): use GetFullStatus for backup display after restart
The dashboard was using GetStatus() which returns nil after restart,
showing "Még nem futott" even when backups exist. Now uses
GetFullStatus() with synthesis logic, matching the backups page.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 10:20:14 +01:00
admin 3e8baebfa5 v0.5.0: Backup bugfixes + monitoring page with metrics store
- Fix "Helyi mentés" showing "–" after controller restart by synthesizing
  LastBackup from snapshot history and LastDBDump from dump files on disk
- New monitoring page (/monitoring) with system info, metrics charts, and
  container resource overview
- SQLite metrics store (modernc.org/sqlite, pure Go, no CGO) with 60s
  collection interval and 30-day auto-prune
- REST API endpoints: /api/metrics/system, /api/metrics/containers/summary,
  /api/metrics/containers/{name}, /api/metrics/sysinfo
- Chart.js 4.4.7 embedded locally for offline environments
- System info provider reads hostname, OS, kernel, CPU, uptime from /proc
- Docker compose updated with /etc/os-release host mount

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 10:14:46 +01:00
admin 87e79548b0 v0.5.0: Backup Bugfixes + Monitoring Page with Metrics Store 2026-02-16 10:01:43 +01:00
admin 0e1fbe1972 Update CONTEXT.md for v0.4.7 session
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 09:04:40 +01:00
admin 3be989f665 v0.4.7: Protected stack detail pages + backup page caching
Task 1: Protected stacks with .felhom.yml (slug) are now clickable
on both dashboard and stacks pages. "Részletek" button added to
protected stack actions section. Filebrowser .felhom.yml updated
with resources metadata.

Task 2: Backup page now reads from a cached FullBackupStatus that
refreshes every 5 minutes in background + after each backup run.
Page loads instantly instead of blocking on restic/docker subprocesses.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 09:02:54 +01:00
admin 79da0b88aa v0.4.7: Protected Stack Detail Pages + Backup Page Caching 2026-02-16 08:58:34 +01:00
admin eb7ae1323f Update CONTEXT.md for v0.4.6 session
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 08:48:08 +01:00
admin fd627f3d55 v0.4.6: MariaDB validation fix + dashboard deployed-only + protected stack restart
- Fix ValidateDump() to scan first 10 lines for header (MariaDB 11.4+ sandbox comment)
- Dashboard shows only deployed/protected stacks, heading "Telepített alkalmazások"
- Protected stacks show restart button when operational (both dashboard + stacks page)
- API blocks all actions except restart on protected stacks
- docker-setup.sh creates .felhom.yml for FileBrowser (subdomain: files)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 08:44:34 +01:00
admin 24a2150520 v0.4.6: MariaDB Validation Fix + Dashboard & Protected Stack UX 2026-02-16 08:40:29 +01:00
admin 15e9dffb85 Update CONTEXT.md for v0.4.5 session
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 07:45:19 +01:00
admin 37ff296a0d v0.4.5: Add dedicated Backup page (Biztonsági mentés)
New /backups page with full backup system visibility:
- Status overview cards (local/remote backup, DB count, repo size)
- Schedule section with next-run times and retention policy
- Database table with type, size, validation (table count), status
- Snapshot history table with per-snapshot stats
- Repository info card with paths, integrity status, remote placeholder
- "Mentés most" button with auto-refresh polling
- Empty state when backup not configured

Backend: SnapshotRecord history (ring buffer), DumpValidation,
ListDumpFiles, ListSnapshots, GetFullStatus, restic check tracking.
Server accepts scheduler for next-run time calculation.

Sidebar nav updated with 3rd item, dashboard backup card title clickable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 07:43:24 +01:00
admin 0985339e6c TASK.md — v0.4.5: Dedicated Backup Page ("Biztonsági mentés") 2026-02-16 07:35:23 +01:00
admin 599560454b docs: update CONTEXT.md for v0.4.1 session
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 12:21:40 +01:00
admin d51e67f199 v0.4.1: app filtering + clickable dashboard stat cards
Add filter bar (Mind/Futó/Leállítva/Telepíthető) to Alkalmazások page with
URL-based filter persistence. Dashboard stat cards are now clickable links
that navigate to the filtered stacks view.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 12:19:26 +01:00
admin 0753adec6a TASK.md — v0.4.1: App Filtering + Bugfixes 2026-02-15 12:12:59 +01:00
admin 1596e86e69 docs: update CONTEXT.md and README.md for v0.4.0
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 11:20:30 +01:00