diff --git a/internal/site/src/components/routes/system.tsx b/internal/site/src/components/routes/system.tsx index 34a54cd6..1035cb05 100644 --- a/internal/site/src/components/routes/system.tsx +++ b/internal/site/src/components/routes/system.tsx @@ -11,7 +11,7 @@ import { RootDiskCharts, ExtraFsCharts } from "./system/charts/disk-charts" import { ZfsCharts } from "./system/charts/zfs-charts" import { BandwidthChart, ContainerNetworkChart } from "./system/charts/network-charts" import { TemperatureChart, FanChart, BatteryChart } from "./system/charts/sensor-charts" -import { GpuPowerChart, GpuDetailCharts } from "./system/charts/gpu-charts" +import { GpuPowerChart, GpuCharts } from "./system/charts/gpu-charts" import { LazyContainersTable, LazySmartTable, LazySystemdTable, LazyZfsTable } from "./system/lazy-tables" import { LoadAverageChart } from "./system/charts/load-average-chart" import { ContainerIcon, CpuIcon, HardDriveIcon, TerminalSquareIcon } from "lucide-react" @@ -133,7 +133,7 @@ export default memo(function SystemDetail({ id }: { id: string }) { {hasGpuData && lastGpus && ( - -
+ } + hasGpuEnginesData={hasGpuEnginesData} + > {hasGpuPowerData && } -
- {hasGpuData && lastGpus && ( - } - hasGpuEnginesData={hasGpuEnginesData} - /> - )} + )} diff --git a/internal/site/src/components/routes/system/charts/gpu-charts.tsx b/internal/site/src/components/routes/system/charts/gpu-charts.tsx index 31d9daf6..fe591cf9 100644 --- a/internal/site/src/components/routes/system/charts/gpu-charts.tsx +++ b/internal/site/src/components/routes/system/charts/gpu-charts.tsx @@ -1,5 +1,5 @@ import { t } from "@lingui/core/macro" -import { useRef, useMemo } from "react" +import { Fragment, type ReactNode, useRef, useMemo } from "react" import AreaChartDefault, { type DataPoint } from "@/components/charts/area-chart" import LineChartDefault from "@/components/charts/line-chart" import { Unit } from "@/lib/enums" @@ -79,6 +79,7 @@ export function GpuPowerChart({ return ( hasGpuEnginesData: boolean + children?: ReactNode }) { return (
+ {children} {hasGpuEnginesData && ( { const gpu = lastGpus[id] as GPUData return ( -
+ )} -
+ ) })}