fix(ui): preserve paused systems in network monitors table (#2391)

This commit is contained in:
Sven van Ginkel
2026-09-23 00:40:46 +02:00
committed by GitHub
parent 4a4610bbc3
commit 8047f005d4
3 changed files with 40 additions and 2 deletions

View File

@@ -190,7 +190,9 @@ func (sm *SystemManager) onRecordAfterCreateSuccess(e *core.RecordEvent) error {
// It clears system info when the status is changed to paused.
func (sm *SystemManager) onRecordUpdate(e *core.RecordEvent) error {
if e.Record.GetString("status") == paused {
e.Record.Set("info", system.Info{})
var prevInfo system.Info
e.Record.UnmarshalJSONField("info", &prevInfo)
e.Record.Set("info", system.Info{AgentVersion: prevInfo.AgentVersion})
}
return e.Next()
}