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>
This commit is contained in:
2026-02-16 19:29:45 +01:00
parent ded59b687e
commit 3eee330ed5
10 changed files with 837 additions and 23 deletions
@@ -36,6 +36,37 @@
</div>
</div>
<!-- Section 1.5: Remote Monitoring Status -->
<div class="monitor-card">
<h3>Távoli monitoring</h3>
{{if not .MonitoringEnabled}}
<div class="monitoring-banner monitoring-banner-red">
⚠️ A távoli monitoring ki van kapcsolva. Az üzemeltető nem kap értesítést hibák esetén.
</div>
{{else}}
{{if .AllPingsConfigured}}
<div class="monitoring-banner monitoring-banner-green">
✅ Minden távoli monitoring aktív — az üzemeltető értesítést kap hibák esetén.
</div>
{{else}}
<div class="monitoring-banner monitoring-banner-yellow">
⚠️ Egyes monitoring ellenőrzések nincsenek beállítva. Kérd az üzemeltetőt a konfiguráláshoz.
</div>
{{end}}
<div class="sysinfo-grid" style="margin-top: 0.75rem">
{{range .PingStatus}}
<div class="sysinfo-row">
<span class="sysinfo-label">{{.Icon}} {{.Label}}</span>
<span class="sysinfo-value">
{{if .Configured}}<span class="ping-status-ok">✅ Beállítva</span>{{else}}<span class="ping-status-warn">⚠️ Nincs beállítva</span>{{end}}
<span class="ping-schedule">{{.Schedule}}</span>
</span>
</div>
{{end}}
</div>
{{end}}
</div>
<!-- Section 2: System Metrics Charts -->
<div class="monitor-card">
<div class="monitor-card-header">