mirror of
https://github.com/Buriburizaem0n/nezha-dash-v1.git
synced 2026-02-07 06:00:08 +00:00
fix: use formatNezhaInfo
This commit is contained in:
@@ -27,6 +27,17 @@ export function formatNezhaInfo(now: number, serverInfo: NezhaServer) {
|
||||
platform: serverInfo.host.platform || "",
|
||||
net_out_transfer: serverInfo.state.net_out_transfer || 0,
|
||||
net_in_transfer: serverInfo.state.net_in_transfer || 0,
|
||||
arch: serverInfo.host.arch || "",
|
||||
mem_total: serverInfo.host.mem_total || 0,
|
||||
swap_total: serverInfo.host.swap_total || 0,
|
||||
disk_total: serverInfo.host.disk_total || 0,
|
||||
boot_time: serverInfo.host.boot_time || 0,
|
||||
platform_version: serverInfo.host.platform_version || "",
|
||||
cpu_info: serverInfo.host.cpu || [],
|
||||
gpu_info: serverInfo.host.gpu || [],
|
||||
load_1: serverInfo.state.load_1?.toFixed(2) || 0.0,
|
||||
load_5: serverInfo.state.load_5?.toFixed(2) || 0.0,
|
||||
load_15: serverInfo.state.load_15?.toFixed(2) || 0.0,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user