mirror of
https://github.com/henrygd/beszel.git
synced 2026-09-24 02:17:47 +02:00
fix(ui): preserve paused systems in network monitors table (#2391)
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user