Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

fix(metrics): normalize docker resource type in metrics history API (#1229)

rcourtman7336ec2d8782
diff --git a/internal/api/router.go b/internal/api/router.go
index 5dfc8873f6..07d7dc2b76 100644
--- a/internal/api/router.go
+++ b/internal/api/router.go
@@ -5568,6 +5568,12 @@ func (r *Router) handleMetricsHistory(w http.ResponseWriter, req *http.Request)
return
}
+ // Normalize resource types so frontend aliases match the SQLite store keys.
+ switch resourceType {
+ case "docker":
+ resourceType = "dockerContainer"
+ }
+
// Parse time range
var duration time.Duration
var stepSecs int64 = 0 // Default to no downsampling (use tier resolution)