From a4713c054b8fd0fde1da46e9a65ead8c58d790f4 Mon Sep 17 00:00:00 2001 From: kisfenyo Date: Tue, 17 Feb 2026 16:12:06 +0100 Subject: [PATCH] v0.11.9 UI Polish Fixes for backup section MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix 1: margin-bottom 1rem→1.5rem on .deploy-cross-drive - Fix 2: info tooltip on "Módszer"; rename restic to "Titkosított mentés" - Fix 3: replace disabled checkbox with green/gray dot status indicator - Fix 4: progressive disclosure — dest/method/schedule selects disabled until "Engedélyezve" checked; backend preserves config when disabling - Fix 5: remove all emoji from deploy.html and backups.html backup sections Co-Authored-By: Claude Sonnet 4.5 --- CHANGELOG.md | 10 ++ CONTEXT.md | 3 +- controller/internal/web/handlers.go | 34 ++++--- .../internal/web/templates/backups.html | 12 +-- controller/internal/web/templates/deploy.html | 71 +++++++++----- controller/internal/web/templates/style.css | 94 ++++++++++++++++++- 6 files changed, 182 insertions(+), 42 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4210057..971227c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ ## Changelog +### What was just completed (2026-02-17 session 36) +- **v0.11.9 — UI Polish Fixes for deploy/settings backup section:** + - **Fix 1: Spacing** — `.deploy-cross-drive` `margin-bottom` increased from `1rem` to `1.5rem` for consistent spacing before deploy form. + - **Fix 2: Tooltip on "Módszer"** — Renamed "Verziózott mentés (restic)" to "Titkosított mentés (restic)". Added info `(i)` tooltip explaining rsync vs restic tradeoffs. + - **Fix 3: Nightly backup indicator** — Replaced disabled checkbox (with confusing pointer cursor) with a non-interactive green/gray dot indicator. + - **Fix 4: Progressive disclosure** — Dest/method/schedule selects are disabled until "Engedélyezve" is checked. JS `toggleCrossDriveFields()` enables/disables them. Backend handler updated to preserve existing config when disabling (disabled fields not submitted). + - **Fix 5: Emoji cleanup** — Removed all emoji from `deploy.html` backup section (h4, warning, status, hint, stale data) and `backups.html` cross-drive summary (status badges, schedule badge, unconfigured warning). JS callbacks also cleaned up. + - **CSS added:** `.info-tooltip`, `.info-icon`, `.info-tooltip-text`, `.cross-drive-nightly-status`, `.nightly-status-indicator`, `.nightly-enabled`, `.nightly-disabled`, `.meta-badge-fail`. + - **Files modified (4):** `web/templates/deploy.html`, `web/templates/backups.html`, `web/templates/style.css`, `web/handlers.go` + ### What was just completed (2026-02-17 session 35) - **v0.11.8 — Per-App Cross-Drive Backup (3-2-1 rule, second copy on different media):** - **Feature: CrossDriveBackup data model** — `AppBackupPrefs` extended with `CrossDrive *CrossDriveBackup` field in `settings.go`. New methods: `GetCrossDriveConfig`, `SetCrossDriveConfig`, `UpdateCrossDriveStatus`, `GetAllCrossDriveConfigs`, `GetOrCreateCrossDrivePassword`. Existing `SetAppBackup`/`SetAppBackupBulk` now preserve cross-drive config. Auto-generated restic password stored in `settings.json`. diff --git a/CONTEXT.md b/CONTEXT.md index 0ed7aac..b68ba76 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -20,7 +20,7 @@ Last updated: 2026-02-17 (session 35) - Customer deployments use Docker Compose (not Kubernetes) for simplicity ### felhom-controller (this repo) -- **Version:** v0.11.8 +- **Version:** v0.11.9 - **Phase 1:** ✅ COMPLETE — Stack Manager + Deploy Flow - **Phase 2:** ✅ COMPLETE — Monitoring & Health (scheduler, CPU/temp, healthchecks.io pings) - **Phase 3:** ✅ COMPLETE — Backups (DB dumps, restic integration, manual trigger, **dedicated backup page**) @@ -38,6 +38,7 @@ Last updated: 2026-02-17 (session 35) - **v0.11.6:** ✅ COMPLETE — FileBrowser auto-mount sync (`syncFileBrowserMounts()`) + 3 UI fixes (badge color, progress bar, button text) - **v0.11.7:** ✅ COMPLETE — Stale data cleanup + FileBrowser sync after migration + deploy page title fix - **v0.11.8:** ✅ COMPLETE — Per-App Cross-Drive Backup (3-2-1 rule): rsync/restic to secondary drive, deploy page UI, backup page summary, scheduler jobs, API endpoints +- **v0.11.9:** ✅ COMPLETE — UI Polish Fixes: spacing, tooltip on "Módszer", status dot instead of disabled checkbox, progressive disclosure, emoji cleanup - **First app deployed:** Paperless-ngx on demo-felhom.eu (2026-02-13) - **Running on:** demo-felhom (N100 mini PC) at 192.168.0.162:8080 - **All Phase 1-5 features working:** deploy, start/stop/restart/update, logs, health-aware states, auth, monitoring, backups, backup detail page, system monitoring page, settings page diff --git a/controller/internal/web/handlers.go b/controller/internal/web/handlers.go index efba338..dbca212 100644 --- a/controller/internal/web/handlers.go +++ b/controller/internal/web/handlers.go @@ -519,23 +519,31 @@ func (s *Server) settingsCrossBackupHandler(w http.ResponseWriter, r *http.Reque _ = r.ParseForm() enabled := r.FormValue("cross_drive_enabled") == "on" - method := r.FormValue("cross_drive_method") - destPath := r.FormValue("cross_drive_dest") - schedule := r.FormValue("cross_drive_schedule") - // Validate method and schedule - if method != "rsync" && method != "restic" { - method = "rsync" - } - if schedule != "daily" && schedule != "weekly" && schedule != "manual" { - schedule = "daily" - } - - // Preserve existing runtime status fields + // Preserve existing runtime status fields and config when disabling existing := s.settings.GetCrossDriveConfig(name) + var method, destPath, schedule string + if enabled { + method = r.FormValue("cross_drive_method") + destPath = r.FormValue("cross_drive_dest") + schedule = r.FormValue("cross_drive_schedule") + // Validate method and schedule + if method != "rsync" && method != "restic" { + method = "rsync" + } + if schedule != "daily" && schedule != "weekly" && schedule != "manual" { + schedule = "daily" + } + } else if existing != nil { + // Preserve existing settings when disabling + method = existing.Method + destPath = existing.DestinationPath + schedule = existing.Schedule + } + var cfg *settings.CrossDriveBackup - if destPath != "" { + if destPath != "" || existing != nil { cfg = &settings.CrossDriveBackup{ Enabled: enabled, Method: method, diff --git a/controller/internal/web/templates/backups.html b/controller/internal/web/templates/backups.html index 52d1451..35bd14a 100644 --- a/controller/internal/web/templates/backups.html +++ b/controller/internal/web/templates/backups.html @@ -307,10 +307,10 @@ {{.MethodLabel}} {{if .DestLabel}}→ {{.DestLabel}} {{else if .DestPath}}→ {{.DestPath}}{{end}} - {{if eq .LastStatus "ok"}}✅ {{.LastRunShort}} - {{else if eq .LastStatus "error"}}❌ Hiba - {{else if eq .LastStatus "running"}}⏳ Fut... - {{else}}⏰ {{.ScheduleLabel}}{{end}} + {{if eq .LastStatus "ok"}}{{.LastRunShort}} + {{else if eq .LastStatus "error"}}Hiba + {{else if eq .LastStatus "running"}}Fut... + {{else}}{{.ScheduleLabel}}{{end}} {{if .SizeHuman}}{{.SizeHuman}}{{end}} @@ -321,7 +321,7 @@ {{if .Backup.UnconfiguredApps}}
- ⚠️ {{len .Backup.UnconfiguredApps}} alkalmazáshoz nincs beállítva: + {{len .Backup.UnconfiguredApps}} alkalmazáshoz nincs beállítva: {{range .Backup.UnconfiguredApps}} {{.DisplayName}} {{end}} @@ -495,7 +495,7 @@ function triggerAllCrossDrive(btn) { btn.textContent = 'Összes futtatása most'; return; } - btn.textContent = '⏳ Mentések futnak...'; + btn.textContent = 'Mentések futnak...'; setTimeout(function() { location.reload(); }, 5000); }) .catch(function(e) { diff --git a/controller/internal/web/templates/deploy.html b/controller/internal/web/templates/deploy.html index 9f73701..103892a 100644 --- a/controller/internal/web/templates/deploy.html +++ b/controller/internal/web/templates/deploy.html @@ -62,7 +62,7 @@ {{end}} {{if .StaleData}}
-

🗑️ Korábbi adatok

+

Korábbi adatok

Az alkalmazás adatainak másolata megtalálható egy másik tárolón is. Ez általában áthelyezés után marad hátra. @@ -84,7 +84,7 @@

{{end}} @@ -95,13 +95,17 @@ {{if .AlreadyDeployed}} {{if .StorageInfo}}
-

🔒 Biztonsági mentés

+

Biztonsági mentés

-
Cél tárhely - {{range .BackupDestPaths}}
- Módszer -
Ütemezés - @@ -175,7 +196,7 @@ {{if .CrossDriveConfig.LastRun}}
Utolsó futás: {{.CrossDriveConfig.LastRun}} - {{if eq .CrossDriveConfig.LastStatus "ok"}}✅ Sikeres{{else if eq .CrossDriveConfig.LastStatus "error"}}❌ Hiba: {{.CrossDriveConfig.LastError}}{{else if eq .CrossDriveConfig.LastStatus "running"}}⏳ Fut...{{end}} + {{if eq .CrossDriveConfig.LastStatus "ok"}}Sikeres{{else if eq .CrossDriveConfig.LastStatus "error"}}Hiba: {{.CrossDriveConfig.LastError}}{{else if eq .CrossDriveConfig.LastStatus "running"}}Fut...{{end}} {{if .CrossDriveConfig.LastDuration}} ({{.CrossDriveConfig.LastDuration}}){{end}} {{if .CrossDriveConfig.LastSizeHuman}} — {{.CrossDriveConfig.LastSizeHuman}}{{end}}
@@ -194,7 +215,7 @@
- ⚠️ A cél meghajtó legyen más fizikai eszköz, mint az alkalmazás adattárolója. + A cél meghajtó legyen más fizikai eszköz, mint az alkalmazás adattárolója.
{{end}}
@@ -353,6 +374,14 @@