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: Ensure AI commands toggle remains stable vs agent reports. Related to #952

rcourtmana4c3295c1a48
diff --git a/internal/monitoring/monitor.go b/internal/monitoring/monitor.go
index a847c5d755..970a2298f8 100644
--- a/internal/monitoring/monitor.go
+++ b/internal/monitoring/monitor.go
@@ -2393,6 +2393,13 @@ func (m *Monitor) ApplyHostReport(report agentshost.Report, tokenRecord *config.
IsLegacy: isLegacyHostAgent(report.Agent.Type),
}
+ // Apply any pending commands execution override from server config
+ // This ensures the UI remains stable when the user toggles this setting,
+ // even if the agent hasn't yet picked up the new config in this report cycle.
+ if cfg := m.GetHostAgentConfig(identifier); cfg.CommandsEnabled != nil {
+ host.CommandsEnabled = *cfg.CommandsEnabled
+ }
+
if len(host.LoadAverage) == 0 {
host.LoadAverage = nil
}