fix: yet another dashboard panic

Fixes #10088

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
This commit is contained in:
Andrey Smirnov 2025-01-09 15:58:01 +04:00
parent 6d605fc859
commit 84fcc976f8
No known key found for this signature in database
GPG Key ID: FE042E3D4085A811

View File

@ -179,8 +179,8 @@ func (node *Node) UpdateDiff(old *Node) {
node.SystemStatDiff = &machine.SystemStat{ node.SystemStatDiff = &machine.SystemStat{
// TODO: support other fields // TODO: support other fields
CpuTotal: cpuInfoDiff(old.SystemStat.GetCpuTotal(), node.SystemStat.GetCpuTotal()), CpuTotal: cpuInfoDiff(old.SystemStat.GetCpuTotal(), node.SystemStat.GetCpuTotal()),
ContextSwitches: node.SystemStat.ContextSwitches - old.SystemStat.ContextSwitches, ContextSwitches: node.SystemStat.GetContextSwitches() - old.SystemStat.GetContextSwitches(),
ProcessCreated: node.SystemStat.ProcessCreated - old.SystemStat.ProcessCreated, ProcessCreated: node.SystemStat.GetProcessCreated() - old.SystemStat.GetProcessCreated(),
} }
} }