mirror of
https://github.com/hamster1963/nezha-dash.git
synced 2025-04-24 21:10:45 +08:00
style: hide unknown field
This commit is contained in:
parent
da3e1c7086
commit
89adcd98da
@ -120,22 +120,27 @@ export default function ServerDetailClient({
|
|||||||
</section>
|
</section>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
{data?.host.Version && (
|
||||||
<Card className="rounded-[10px] bg-transparent border-none shadow-none">
|
<Card className="rounded-[10px] bg-transparent border-none shadow-none">
|
||||||
<CardContent className="px-1.5 py-1">
|
<CardContent className="px-1.5 py-1">
|
||||||
<section className="flex flex-col items-start gap-0.5">
|
<section className="flex flex-col items-start gap-0.5">
|
||||||
<p className="text-xs text-muted-foreground">{t("Version")}</p>
|
<p className="text-xs text-muted-foreground">{t("Version")}</p>
|
||||||
<div className="text-xs">{data?.host.Version || "Unknown"} </div>
|
<div className="text-xs">{data?.host.Version} </div>
|
||||||
</section>
|
</section>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
)}
|
||||||
|
{data?.host.Arch && (
|
||||||
<Card className="rounded-[10px] bg-transparent border-none shadow-none">
|
<Card className="rounded-[10px] bg-transparent border-none shadow-none">
|
||||||
<CardContent className="px-1.5 py-1">
|
<CardContent className="px-1.5 py-1">
|
||||||
<section className="flex flex-col items-start gap-0.5">
|
<section className="flex flex-col items-start gap-0.5">
|
||||||
<p className="text-xs text-muted-foreground">{t("Arch")}</p>
|
<p className="text-xs text-muted-foreground">{t("Arch")}</p>
|
||||||
<div className="text-xs">{data?.host.Arch || "Unknown"} </div>
|
<div className="text-xs">{data?.host.Arch} </div>
|
||||||
</section>
|
</section>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
)}
|
||||||
|
|
||||||
<Card className="rounded-[10px] bg-transparent border-none shadow-none">
|
<Card className="rounded-[10px] bg-transparent border-none shadow-none">
|
||||||
<CardContent className="px-1.5 py-1">
|
<CardContent className="px-1.5 py-1">
|
||||||
<section className="flex flex-col items-start gap-0.5">
|
<section className="flex flex-col items-start gap-0.5">
|
||||||
@ -170,61 +175,52 @@ export default function ServerDetailClient({
|
|||||||
</Card>
|
</Card>
|
||||||
</section>
|
</section>
|
||||||
<section className="flex flex-wrap gap-2 mt-1">
|
<section className="flex flex-wrap gap-2 mt-1">
|
||||||
|
{data?.host.Platform && (
|
||||||
<Card className="rounded-[10px] bg-transparent border-none shadow-none">
|
<Card className="rounded-[10px] bg-transparent border-none shadow-none">
|
||||||
<CardContent className="px-1.5 py-1">
|
<CardContent className="px-1.5 py-1">
|
||||||
<section className="flex flex-col items-start gap-0.5">
|
<section className="flex flex-col items-start gap-0.5">
|
||||||
<p className="text-xs text-muted-foreground">{t("System")}</p>
|
<p className="text-xs text-muted-foreground">{t("System")}</p>
|
||||||
{data?.host.Platform ? (
|
|
||||||
<div className="text-xs">
|
<div className="text-xs">
|
||||||
{" "}
|
{" "}
|
||||||
{data?.host.Platform || "Unknown"} -{" "}
|
{data?.host.Platform} - {data?.host.PlatformVersion}{" "}
|
||||||
{data?.host.PlatformVersion}{" "}
|
|
||||||
</div>
|
</div>
|
||||||
) : (
|
|
||||||
<div className="text-xs">Unknown</div>
|
|
||||||
)}
|
|
||||||
</section>
|
</section>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
)}
|
||||||
|
{data?.host.CPU && (
|
||||||
<Card className="rounded-[10px] bg-transparent border-none shadow-none">
|
<Card className="rounded-[10px] bg-transparent border-none shadow-none">
|
||||||
<CardContent className="px-1.5 py-1">
|
<CardContent className="px-1.5 py-1">
|
||||||
<section className="flex flex-col items-start gap-0.5">
|
<section className="flex flex-col items-start gap-0.5">
|
||||||
<p className="text-xs text-muted-foreground">{t("CPU")}</p>
|
<p className="text-xs text-muted-foreground">{t("CPU")}</p>
|
||||||
{data?.host.CPU ? (
|
|
||||||
<div className="text-xs"> {data?.host.CPU.join(", ")}</div>
|
<div className="text-xs"> {data?.host.CPU.join(", ")}</div>
|
||||||
) : (
|
|
||||||
<div className="text-xs">Unknown</div>
|
|
||||||
)}
|
|
||||||
</section>
|
</section>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
)}
|
||||||
|
{data?.host.GPU && (
|
||||||
<Card className="rounded-[10px] bg-transparent border-none shadow-none">
|
<Card className="rounded-[10px] bg-transparent border-none shadow-none">
|
||||||
<CardContent className="px-1.5 py-1">
|
<CardContent className="px-1.5 py-1">
|
||||||
<section className="flex flex-col items-start gap-0.5">
|
<section className="flex flex-col items-start gap-0.5">
|
||||||
<p className="text-xs text-muted-foreground">{"GPU"}</p>
|
<p className="text-xs text-muted-foreground">{"GPU"}</p>
|
||||||
{data?.host.GPU ? (
|
|
||||||
<div className="text-xs"> {data?.host.GPU.join(", ")}</div>
|
<div className="text-xs"> {data?.host.GPU.join(", ")}</div>
|
||||||
) : (
|
|
||||||
<div className="text-xs">Unknown</div>
|
|
||||||
)}
|
|
||||||
</section>
|
</section>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
)}
|
||||||
</section>
|
</section>
|
||||||
<section className="flex flex-wrap gap-2 mt-1">
|
<section className="flex flex-wrap gap-2 mt-1">
|
||||||
<Card className="rounded-[10px] bg-transparent border-none shadow-none">
|
<Card className="rounded-[10px] bg-transparent border-none shadow-none">
|
||||||
<CardContent className="px-1.5 py-1">
|
<CardContent className="px-1.5 py-1">
|
||||||
<section className="flex flex-col items-start gap-0.5">
|
<section className="flex flex-col items-start gap-0.5">
|
||||||
<p className="text-xs text-muted-foreground">{t("Load")}</p>
|
<p className="text-xs text-muted-foreground">{t("Load")}</p>
|
||||||
{data.status.NetInTransfer ? (
|
|
||||||
<div className="text-xs">
|
<div className="text-xs">
|
||||||
{data.status.Load1.toFixed(2)} /{" "}
|
{data.status.Load1.toFixed(2) || "0.00"} /{" "}
|
||||||
{data.status.Load5.toFixed(2)} /{" "}
|
{data.status.Load5.toFixed(2) || "0.00"} /{" "}
|
||||||
{data.status.Load15.toFixed(2)}
|
{data.status.Load15.toFixed(2) || "0.00"}
|
||||||
</div>
|
</div>
|
||||||
) : (
|
|
||||||
<div className="text-xs">Unknown</div>
|
|
||||||
)}
|
|
||||||
</section>
|
</section>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
Loading…
Reference in New Issue
Block a user