mirror of
https://github.com/woodchen-ink/nezha-dash-v1.git
synced 2025-07-18 17:41:56 +08:00
fix(detail): chart detail info
This commit is contained in:
parent
a9186f1148
commit
924f7e24bd
@ -354,10 +354,17 @@ function MemChart({ now, data }: { now: number; data: NezhaServer }) {
|
|||||||
<section className="flex flex-col items-end gap-0.5">
|
<section className="flex flex-col items-end gap-0.5">
|
||||||
<div className="flex text-[11px] font-medium items-center gap-2">
|
<div className="flex text-[11px] font-medium items-center gap-2">
|
||||||
{formatBytes(data.state.mem_used)} /{" "}
|
{formatBytes(data.state.mem_used)} /{" "}
|
||||||
{formatBytes(data.state.mem_total)}
|
{formatBytes(data.host.mem_total)}
|
||||||
</div>
|
</div>
|
||||||
<div className="flex text-[11px] font-medium items-center gap-2">
|
<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>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
@ -468,7 +475,7 @@ function DiskChart({ now, data }: { now: number; data: NezhaServer }) {
|
|||||||
</section>
|
</section>
|
||||||
<div className="flex text-[11px] font-medium items-center gap-2">
|
<div className="flex text-[11px] font-medium items-center gap-2">
|
||||||
{formatBytes(data.state.disk_used)} /{" "}
|
{formatBytes(data.state.disk_used)} /{" "}
|
||||||
{formatBytes(data.state.disk_total)}
|
{formatBytes(data.host.disk_total)}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
@ -28,10 +28,8 @@ export interface NezhaServerHost {
|
|||||||
export interface NezhaServerStatus {
|
export interface NezhaServerStatus {
|
||||||
cpu: number;
|
cpu: number;
|
||||||
mem_used: number;
|
mem_used: number;
|
||||||
mem_total: number;
|
|
||||||
swap_used: number;
|
swap_used: number;
|
||||||
disk_used: number;
|
disk_used: number;
|
||||||
disk_total: number;
|
|
||||||
net_in_transfer: number;
|
net_in_transfer: number;
|
||||||
net_out_transfer: number;
|
net_out_transfer: number;
|
||||||
net_in_speed: number;
|
net_in_speed: number;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user