mirror of
https://github.com/fankes/beszel.git
synced 2025-10-19 17:59:28 +08:00
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.
This commit is contained in:
@@ -116,9 +116,9 @@ export default memo(function ContainerChart({
|
|||||||
}
|
}
|
||||||
// data function
|
// data function
|
||||||
if (isNetChart) {
|
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 {
|
} else {
|
||||||
obj.dataFunction = (key: string, data: any) => data[key]?.[dataKey] ?? 0
|
obj.dataFunction = (key: string, data: any) => data[key]?.[dataKey] ?? null
|
||||||
}
|
}
|
||||||
return obj
|
return obj
|
||||||
}, [])
|
}, [])
|
||||||
|
Reference in New Issue
Block a user