From b4e68180ef961a69bf835e866a8589e4b9b02e3b Mon Sep 17 00:00:00 2001 From: hamster1963 <1410514192@qq.com> Date: Mon, 2 Dec 2024 14:14:33 +0800 Subject: [PATCH] feat(detail): add gpu info --- app/(main)/ClientComponents/ServerDetailClient.tsx | 14 +++++++++++++- app/types/nezha-api.ts | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/app/(main)/ClientComponents/ServerDetailClient.tsx b/app/(main)/ClientComponents/ServerDetailClient.tsx index 724e30c..51d4263 100644 --- a/app/(main)/ClientComponents/ServerDetailClient.tsx +++ b/app/(main)/ClientComponents/ServerDetailClient.tsx @@ -191,7 +191,19 @@ export default function ServerDetailClient({

{t("CPU")}

{data?.host.CPU ? ( -
{data?.host.CPU}
+
{data?.host.CPU.join(", ")}
+ ) : ( +
Unknown
+ )} +
+ + + + +
+

{"GPU"}

+ {data?.host.GPU ? ( +
{data?.host.GPU.join(", ")}
) : (
Unknown
)} diff --git a/app/types/nezha-api.ts b/app/types/nezha-api.ts index 899809a..92dee5d 100644 --- a/app/types/nezha-api.ts +++ b/app/types/nezha-api.ts @@ -35,7 +35,7 @@ export interface NezhaAPIHost { BootTime: number; CountryCode: string; Version: string; - GPU: null; + GPU: string[]; } export interface NezhaAPIStatus {