From 1d9e59a9dfdde74c19f4bbfd8c862e03ddefc8e1 Mon Sep 17 00:00:00 2001 From: hamster1963 <1410514192@qq.com> Date: Fri, 6 Dec 2024 22:16:28 +0800 Subject: [PATCH] fix: gpu display index --- src/components/ServerDetailChart.tsx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/components/ServerDetailChart.tsx b/src/components/ServerDetailChart.tsx index f05b2ed..973fb5b 100644 --- a/src/components/ServerDetailChart.tsx +++ b/src/components/ServerDetailChart.tsx @@ -93,7 +93,7 @@ export default function ServerDetailChart({ return (
- {gpuStats.length > 1 && gpuList.length === gpuStats.length ? ( + {gpuStats.length >= 1 && gpuList.length === gpuStats.length ? ( gpuList.map((gpu, index) => ( )) ) : gpuStats.length > 0 ? ( - - ) : ( + gpuStats.map((gpu, index) => ( + + ) + )) : ( <> )}