diff --git a/hub/internal/web/server.go b/hub/internal/web/server.go index d1da221..bf50c68 100644 --- a/hub/internal/web/server.go +++ b/hub/internal/web/server.go @@ -140,7 +140,9 @@ func (s *Server) handleDashboard(w http.ResponseWriter, r *http.Request) { dc := dashboardCustomer{CustomerSummary: c} // Determine overall status - if c.TimeSinceReport > time.Hour { + if c.HealthStatus == "disabled" { + dc.OverallStatus = "disabled" + } else if c.TimeSinceReport > time.Hour { dc.OverallStatus = "down" } else if c.TimeSinceReport > 30*time.Minute || c.HealthStatus == "warn" { dc.OverallStatus = "warn" @@ -199,7 +201,9 @@ func (s *Server) handleCustomerDetail(w http.ResponseWriter, r *http.Request, cu } overallStatus := "ok" - if customer.TimeSinceReport > time.Hour { + if customer.HealthStatus == "disabled" { + overallStatus = "disabled" + } else if customer.TimeSinceReport > time.Hour { overallStatus = "down" } else if customer.TimeSinceReport > 30*time.Minute || customer.HealthStatus == "warn" { overallStatus = "warn" @@ -259,6 +263,8 @@ func statusColor(status string) string { return "#facc15" // yellow case "down", "fail": return "#f87171" // red + case "disabled": + return "#94a3b8" // gray default: return "#94a3b8" // gray } diff --git a/hub/internal/web/templates/customer.html b/hub/internal/web/templates/customer.html index 57d756f..4f66a91 100644 --- a/hub/internal/web/templates/customer.html +++ b/hub/internal/web/templates/customer.html @@ -62,7 +62,7 @@
Reporting has been disabled on this node
+Enable it in the controller's controller.yaml: hub.enabled: true
Status: {{index . "status"}} @@ -153,6 +157,7 @@ {{end}} {{end}} + {{end}}