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: auto-default discovery interval to 24h when enabled

rcourtman6140cb5be43e
diff --git a/internal/api/ai_handlers.go b/internal/api/ai_handlers.go
index 1afa7bc976..0838930ab4 100644
--- a/internal/api/ai_handlers.go
+++ b/internal/api/ai_handlers.go
@@ -1393,6 +1393,12 @@ func (h *AISettingsHandler) HandleUpdateAISettings(w http.ResponseWriter, r *htt
settings.DiscoveryIntervalHours = *req.DiscoveryIntervalHours
}
+ // Auto-default discovery interval to 24h when enabled with no interval set.
+ // Without this, enabling discovery with interval=0 silently stays in manual-only mode.
+ if settings.DiscoveryEnabled && settings.DiscoveryIntervalHours == 0 {
+ settings.DiscoveryIntervalHours = 24
+ }
+
// Save settings
if err := h.getPersistence(r.Context()).SaveAIConfig(*settings); err != nil {
log.Error().Err(err).Msg("Failed to save AI settings")