From 98c4102f721ccfb07dd79d757cf43e2076036d42 Mon Sep 17 00:00:00 2001 From: Henry Dollman Date: Mon, 4 Nov 2024 21:24:44 -0500 Subject: [PATCH] revert to previous behavior for displaying stopped containers * Previously, a stopped container was completely removed from the chart/tooltip during the time period when it was not running. In the last few releases, the container remained in the chart with zero values if it was running at any time during the chart's duration. This restores the previous functionality. --- beszel/site/src/components/charts/container-chart.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/beszel/site/src/components/charts/container-chart.tsx b/beszel/site/src/components/charts/container-chart.tsx index f42baf3..f91f27f 100644 --- a/beszel/site/src/components/charts/container-chart.tsx +++ b/beszel/site/src/components/charts/container-chart.tsx @@ -116,9 +116,9 @@ export default memo(function ContainerChart({ } // data function if (isNetChart) { - obj.dataFunction = (key: string, data: any) => (data[key]?.nr ?? 0) + (data[key]?.ns ?? 0) + obj.dataFunction = (key: string, data: any) => (data[key]?.nr ?? null) + (data[key]?.ns ?? null) } else { - obj.dataFunction = (key: string, data: any) => data[key]?.[dataKey] ?? 0 + obj.dataFunction = (key: string, data: any) => data[key]?.[dataKey] ?? null } return obj }, [])