mirror of
https://github.com/Buriburizaem0n/nezha-dash-v1.git
synced 2026-02-04 20:50:08 +00:00
fix: gpu display index
This commit is contained in:
@@ -93,7 +93,7 @@ export default function ServerDetailChart({
|
|||||||
return (
|
return (
|
||||||
<section className="grid md:grid-cols-2 lg:grid-cols-3 grid-cols-1 gap-3">
|
<section className="grid md:grid-cols-2 lg:grid-cols-3 grid-cols-1 gap-3">
|
||||||
<CpuChart now={nezhaWsData.now} data={server} />
|
<CpuChart now={nezhaWsData.now} data={server} />
|
||||||
{gpuStats.length > 1 && gpuList.length === gpuStats.length ? (
|
{gpuStats.length >= 1 && gpuList.length === gpuStats.length ? (
|
||||||
gpuList.map((gpu, index) => (
|
gpuList.map((gpu, index) => (
|
||||||
<GpuChart
|
<GpuChart
|
||||||
now={nezhaWsData.now}
|
now={nezhaWsData.now}
|
||||||
@@ -103,8 +103,15 @@ export default function ServerDetailChart({
|
|||||||
/>
|
/>
|
||||||
))
|
))
|
||||||
) : gpuStats.length > 0 ? (
|
) : gpuStats.length > 0 ? (
|
||||||
<GpuChart now={nezhaWsData.now} gpuStat={gpuStats[0]} />
|
gpuStats.map((gpu, index) => (
|
||||||
) : (
|
<GpuChart
|
||||||
|
now={nezhaWsData.now}
|
||||||
|
gpuStat={gpu}
|
||||||
|
gpuName={`#${index + 1}`}
|
||||||
|
key={index}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
)) : (
|
||||||
<></>
|
<></>
|
||||||
)}
|
)}
|
||||||
<ProcessChart now={nezhaWsData.now} data={server} />
|
<ProcessChart now={nezhaWsData.now} data={server} />
|
||||||
|
|||||||
Reference in New Issue
Block a user