hub v0.71.0: paired recovery mails (F11), prefs seeding at claim + empty-email no-clobber (F12), priority headers + operator test leg (F14-light)

This commit is contained in:
2026-07-22 20:57:29 +02:00
parent 5b35023574
commit c766c8af82
15 changed files with 832 additions and 30 deletions
+7 -1
View File
@@ -2,6 +2,7 @@ package notify
import (
"fmt"
"strings"
"time"
)
@@ -22,8 +23,12 @@ func init() {
// FormatOperatorEmail returns (subject, textBody) for the operator channel.
func FormatOperatorEmail(customerID, eventType, severity, message, detailsJSON string) (string, string) {
// Icon is eventType-aware for recovery (v0.71.0, audit F11); severity stays the fallback.
icon := "⚠️"
if severity == "error" || severity == "critical" {
switch {
case strings.HasSuffix(eventType, "_recovered"):
icon = "✅"
case severity == "error" || severity == "critical":
icon = "🔴"
}
@@ -86,6 +91,7 @@ var customerMessages = map[string]string{
"node_stale": "A szerver nem küldött jelentést az elmúlt időszakban.",
"node_down": "A szerver nem elérhető!",
"node_recovered": "A szerver újra elérhető.",
"host_recovered": "A házszerver alaprendszere (Proxmox-gazda) újra elérhető.",
// Health events
"health_degraded": "A rendszer állapota romlott.",