diff --git a/vite-frontend/src/pages/node.tsx b/vite-frontend/src/pages/node.tsx index 9ffe687..ae63bf3 100644 --- a/vite-frontend/src/pages/node.tsx +++ b/vite-frontend/src/pages/node.tsx @@ -1114,9 +1114,12 @@ export default function NodePage() { strategy={rectSortingStrategy} >
- {sortedNodes.map((node) => ( - - {(listeners) => ( + {sortedNodes.map((node) => { + const isRemoteNode = node.isRemote === 1; + + return ( + + {(listeners) => (
- {node.isRemote === 1 && ( + {isRemoteNode && (
-
- 版本 - - {node.version || "未知"} - -
-
- 开机时间 - - {node.connectionStatus === "online" && - node.systemInfo - ? formatUptime(node.systemInfo.uptime) - : "-"} - -
- - - {/* 系统监控 */} -
-
-
-
- CPU - + {!isRemoteNode && ( + <> +
+ 版本 + + {node.version || "未知"} + +
+
+ 开机时间 + {node.connectionStatus === "online" && node.systemInfo - ? `${node.systemInfo.cpuUsage.toFixed(1)}%` + ? formatUptime(node.systemInfo.uptime) : "-"}
- -
-
-
- 内存 - - {node.connectionStatus === "online" && - node.systemInfo - ? `${node.systemInfo.memoryUsage.toFixed(1)}%` - : "-"} - -
- -
-
- -
-
-
- 上传 -
-
- {node.connectionStatus === "online" && - node.systemInfo - ? formatSpeed(node.systemInfo.uploadSpeed) - : "-"} -
-
-
-
- 下载 -
-
- {node.connectionStatus === "online" && - node.systemInfo - ? formatSpeed(node.systemInfo.downloadSpeed) - : "-"} -
-
-
- - {/* 流量统计 */} -
-
-
- ↑ 上行流量 -
-
- {node.connectionStatus === "online" && - node.systemInfo - ? formatTraffic(node.systemInfo.uploadTraffic) - : "-"} -
-
-
-
- ↓ 下行流量 -
-
- {node.connectionStatus === "online" && - node.systemInfo - ? formatTraffic( - node.systemInfo.downloadTraffic, - ) - : "-"} -
-
-
+ + )}
+ {!isRemoteNode && ( + <> + {/* 系统监控 */} +
+
+
+
+ CPU + + {node.connectionStatus === "online" && + node.systemInfo + ? `${node.systemInfo.cpuUsage.toFixed(1)}%` + : "-"} + +
+ +
+
+
+ 内存 + + {node.connectionStatus === "online" && + node.systemInfo + ? `${node.systemInfo.memoryUsage.toFixed(1)}%` + : "-"} + +
+ +
+
+ +
+
+
+ 上传 +
+
+ {node.connectionStatus === "online" && + node.systemInfo + ? formatSpeed(node.systemInfo.uploadSpeed) + : "-"} +
+
+
+
+ 下载 +
+
+ {node.connectionStatus === "online" && + node.systemInfo + ? formatSpeed(node.systemInfo.downloadSpeed) + : "-"} +
+
+
+ + {/* 流量统计 */} +
+
+
+ ↑ 上行流量 +
+
+ {node.connectionStatus === "online" && + node.systemInfo + ? formatTraffic(node.systemInfo.uploadTraffic) + : "-"} +
+
+
+
+ ↓ 下行流量 +
+
+ {node.connectionStatus === "online" && + node.systemInfo + ? formatTraffic( + node.systemInfo.downloadTraffic, + ) + : "-"} +
+
+
+
+ + )} + {/* 操作按钮 */}
+ {!isRemoteNode && ( + <> + + + + )} - -