diff --git a/web/src/components/graph/SystemGraph.tsx b/web/src/components/graph/SystemGraph.tsx index 1c745da25..cfcd4a4ff 100644 --- a/web/src/components/graph/SystemGraph.tsx +++ b/web/src/components/graph/SystemGraph.tsx @@ -92,6 +92,9 @@ export function ThresholdBarGraph({ }, tooltip: { theme: systemTheme || theme, + y: { + formatter: (val) => `${val}${unit}`, + }, }, markers: { size: 0, @@ -118,7 +121,7 @@ export function ThresholdBarGraph({ min: 0, }, } as ApexCharts.ApexOptions; - }, [graphId, threshold, systemTheme, theme, formatTime]); + }, [graphId, threshold, unit, systemTheme, theme, formatTime]); useEffect(() => { ApexCharts.exec(graphId, "updateOptions", options, true, true); diff --git a/web/src/views/system/GeneralMetrics.tsx b/web/src/views/system/GeneralMetrics.tsx index 563d13fc2..fe5e4dffe 100644 --- a/web/src/views/system/GeneralMetrics.tsx +++ b/web/src/views/system/GeneralMetrics.tsx @@ -182,7 +182,7 @@ export default function GeneralMetrics({ series[key] = { name: key, data: [] }; } - series[key].data.push({ x: statsIdx + 1, y: stats.gpu }); + series[key].data.push({ x: statsIdx + 1, y: stats.gpu.slice(0, -1) }); }); }); return Object.keys(series).length > 0 ? Object.values(series) : []; @@ -215,7 +215,7 @@ export default function GeneralMetrics({ series[key] = { name: key, data: [] }; } - series[key].data.push({ x: statsIdx + 1, y: stats.mem }); + series[key].data.push({ x: statsIdx + 1, y: stats.mem.slice(0, -1) }); }); }); return Object.values(series); @@ -373,7 +373,7 @@ export default function GeneralMetrics({ key={series.name} graphId={`${series.name}-gpu`} name={series.name} - unit="" + unit="%" threshold={GPUUsageThreshold} updateTimes={updateTimes} data={[series]} @@ -392,7 +392,7 @@ export default function GeneralMetrics({