v0.13.0: UI polish fixes (8 improvements)
- Fix 1: Dashboard backup card border (verified already correct) - Fix 2: Show auto-generated env values on deploy page with copy/reveal - Fix 3: Temperature value pill for better visibility on dashboard - Fix 4: Rework dashboard backup section (remove manual trigger, add Tier 2 summary) - Fix 5: Scope HDD warning banner to dashboard and monitoring pages only - Fix 6: Move Tárhely section up in monitoring page - Fix 7: Snapshot table clarity (HOZZÁADOTT header, n/a instead of -) - Fix 8: Restructure Tároló section into tiered storage view Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3,6 +3,7 @@ package web
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"gitea.dooplex.hu/admin/felhom-controller/internal/backup"
|
||||
@@ -12,11 +13,12 @@ import (
|
||||
|
||||
// Alert represents a persistent dashboard alert banner.
|
||||
type Alert struct {
|
||||
ID string // unique identifier for filtering
|
||||
Level string // "error", "warning", "info"
|
||||
Message string // Hungarian display text
|
||||
Link string // optional link to relevant page
|
||||
LinkText string // link display text
|
||||
ID string // unique identifier for filtering
|
||||
Level string // "error", "warning", "info"
|
||||
Message string // Hungarian display text
|
||||
Link string // optional link to relevant page
|
||||
LinkText string // link display text
|
||||
PageOnly []string // if non-empty, only show on these pages (e.g., ["dashboard", "monitoring"])
|
||||
}
|
||||
|
||||
// AlertManager generates and stores dashboard alerts from health check results.
|
||||
@@ -53,13 +55,19 @@ func (am *AlertManager) Refresh(report *monitor.HealthReport, cfg *config.Config
|
||||
|
||||
// From health check warnings
|
||||
for _, w := range report.Warnings {
|
||||
alerts = append(alerts, Alert{
|
||||
alert := Alert{
|
||||
ID: "health-" + simpleHash(w),
|
||||
Level: "warning",
|
||||
Message: w,
|
||||
Link: "/monitoring",
|
||||
LinkText: "Rendszermonitor",
|
||||
})
|
||||
}
|
||||
// Disk-related warnings only relevant on dashboard and monitoring pages
|
||||
if strings.Contains(w, "meghajtón") || strings.Contains(w, "adattároló") || strings.Contains(w, "meghajtó") {
|
||||
alert.ID = "disk-not-separate"
|
||||
alert.PageOnly = []string{"dashboard", "monitoring"}
|
||||
}
|
||||
alerts = append(alerts, alert)
|
||||
}
|
||||
|
||||
// Missing ping UUIDs
|
||||
|
||||
Reference in New Issue
Block a user