refactor load average handling (#982)

- Transitioned from individual load average fields (LoadAvg1, LoadAvg5,
LoadAvg15) to a single array (LoadAvg)
- Ensure load is displayed when all zero values.
This commit is contained in:
henrygd
2025-07-25 18:07:11 -04:00
parent 6953edf59e
commit 91679b5cc0
10 changed files with 116 additions and 69 deletions

View File

@@ -26,6 +26,7 @@ import {
getHostDisplayValue,
getPbTimestamp,
listen,
parseSemVer,
toFixedFloat,
useLocalStorage,
} from "@/lib/utils"
@@ -191,6 +192,7 @@ export default function SystemDetail({ name }: { name: string }) {
chartTime,
orientation: direction === "rtl" ? "right" : "left",
...getTimeData(chartTime, lastCreated),
agentVersion: parseSemVer(system?.info?.v),
}
}, [systemStats, containerData, direction])
@@ -642,7 +644,7 @@ export default function SystemDetail({ name }: { name: string }) {
)}
{/* Load Average chart */}
{system.info.l1 !== undefined && (
{chartData.agentVersion?.minor >= 12 && (
<ChartCard
empty={dataEmpty}
grid={grid}