From 84fcc976f8da5af310771e1835a0347df5bcc97d Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Thu, 9 Jan 2025 15:58:01 +0400 Subject: [PATCH] fix: yet another dashboard panic Fixes #10088 Signed-off-by: Andrey Smirnov --- internal/pkg/dashboard/apidata/node.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/pkg/dashboard/apidata/node.go b/internal/pkg/dashboard/apidata/node.go index b8da10fd16..940f1e1adf 100644 --- a/internal/pkg/dashboard/apidata/node.go +++ b/internal/pkg/dashboard/apidata/node.go @@ -179,8 +179,8 @@ func (node *Node) UpdateDiff(old *Node) { node.SystemStatDiff = &machine.SystemStat{ // TODO: support other fields CpuTotal: cpuInfoDiff(old.SystemStat.GetCpuTotal(), node.SystemStat.GetCpuTotal()), - ContextSwitches: node.SystemStat.ContextSwitches - old.SystemStat.ContextSwitches, - ProcessCreated: node.SystemStat.ProcessCreated - old.SystemStat.ProcessCreated, + ContextSwitches: node.SystemStat.GetContextSwitches() - old.SystemStat.GetContextSwitches(), + ProcessCreated: node.SystemStat.GetProcessCreated() - old.SystemStat.GetProcessCreated(), } }