mirror of
https://github.com/hamster1963/nezha-dash.git
synced 2025-04-24 21:10:45 +08:00
fix: net badge error
This commit is contained in:
parent
f8f7b5190a
commit
dd15612d15
@ -107,19 +107,19 @@ export default function ServerCard({
|
|||||||
variant="secondary"
|
variant="secondary"
|
||||||
className="items-center justify-center rounded-[8px] text-nowrap text-[11px] border-muted-50 shadow-md shadow-neutral-200/30 dark:shadow-none"
|
className="items-center justify-center rounded-[8px] text-nowrap text-[11px] border-muted-50 shadow-md shadow-neutral-200/30 dark:shadow-none"
|
||||||
style={{
|
style={{
|
||||||
width: `${(serverInfo.status.NetInTransfer / (serverInfo.status.NetInTransfer + serverInfo.status.NetOutTransfer)) * 100}%`,
|
width: `${(serverInfo.status.NetOutTransfer / (serverInfo.status.NetInTransfer + serverInfo.status.NetOutTransfer)) * 100}%`,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t("Upload")}:{formatBytes(serverInfo.status.NetInTransfer)}
|
{t("Upload")}:{formatBytes(serverInfo.status.NetOutTransfer)}
|
||||||
</Badge>
|
</Badge>
|
||||||
<Badge
|
<Badge
|
||||||
variant="outline"
|
variant="outline"
|
||||||
className="items-center justify-center rounded-[8px] text-nowrap text-[11px] shadow-md shadow-neutral-200/30 dark:shadow-none"
|
className="items-center justify-center rounded-[8px] text-nowrap text-[11px] shadow-md shadow-neutral-200/30 dark:shadow-none"
|
||||||
style={{
|
style={{
|
||||||
width: `${(serverInfo.status.NetOutTransfer / (serverInfo.status.NetInTransfer + serverInfo.status.NetOutTransfer)) * 100}%`,
|
width: `${(serverInfo.status.NetInTransfer / (serverInfo.status.NetInTransfer + serverInfo.status.NetOutTransfer)) * 100}%`,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t("Download")}:{formatBytes(serverInfo.status.NetOutTransfer)}
|
{t("Download")}:{formatBytes(serverInfo.status.NetInTransfer)}
|
||||||
</Badge>
|
</Badge>
|
||||||
</section>
|
</section>
|
||||||
)}
|
)}
|
||||||
|
Loading…
Reference in New Issue
Block a user