feat: detail page

This commit is contained in:
hamster1963
2024-11-24 02:36:52 +08:00
parent 05183e64bc
commit b7d7c9cad8
6 changed files with 245 additions and 122 deletions

View File

@@ -15,6 +15,8 @@ export function formatNezhaInfo(serverInfo: NezhaAPI) {
up: serverInfo.state.net_out_speed / 1024 / 1024 || 0,
down: serverInfo.state.net_in_speed / 1024 / 1024 || 0,
online: Date.now() - lastActiveTime <= 300000,
uptime: serverInfo.state.uptime || 0,
version: serverInfo.host.version || null,
tcp: serverInfo.state.tcp_conn_count || 0,
udp: serverInfo.state.udp_conn_count || 0,
mem: (serverInfo.state.mem_used / serverInfo.host.mem_total) * 100 || 0,