mirror of
https://github.com/Buriburizaem0n/nezha-dash-v1.git
synced 2026-02-04 04:30:07 +00:00
fix(detail): chart detail info
This commit is contained in:
@@ -354,10 +354,17 @@ function MemChart({ now, data }: { now: number; data: NezhaServer }) {
|
||||
<section className="flex flex-col items-end gap-0.5">
|
||||
<div className="flex text-[11px] font-medium items-center gap-2">
|
||||
{formatBytes(data.state.mem_used)} /{" "}
|
||||
{formatBytes(data.state.mem_total)}
|
||||
{formatBytes(data.host.mem_total)}
|
||||
</div>
|
||||
<div className="flex text-[11px] font-medium items-center gap-2">
|
||||
swap: {formatBytes(data.state.swap_used)}
|
||||
{data.host.swap_total ? (
|
||||
<>
|
||||
swap: {formatBytes(data.state.swap_used)} /{" "}
|
||||
{formatBytes(data.host.swap_total)}
|
||||
</>
|
||||
) : (
|
||||
<>no swap</>
|
||||
)}
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@@ -468,7 +475,7 @@ function DiskChart({ now, data }: { now: number; data: NezhaServer }) {
|
||||
</section>
|
||||
<div className="flex text-[11px] font-medium items-center gap-2">
|
||||
{formatBytes(data.state.disk_used)} /{" "}
|
||||
{formatBytes(data.state.disk_total)}
|
||||
{formatBytes(data.host.disk_total)}
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@@ -28,10 +28,8 @@ export interface NezhaServerHost {
|
||||
export interface NezhaServerStatus {
|
||||
cpu: number;
|
||||
mem_used: number;
|
||||
mem_total: number;
|
||||
swap_used: number;
|
||||
disk_used: number;
|
||||
disk_total: number;
|
||||
net_in_transfer: number;
|
||||
net_out_transfer: number;
|
||||
net_in_speed: number;
|
||||
|
||||
Reference in New Issue
Block a user