From 3f96f880276140423cbb31119f5e37d3c1dd754a Mon Sep 17 00:00:00 2001 From: MacRimi Date: Sun, 12 Oct 2025 18:19:50 +0200 Subject: [PATCH] Update system-overview.tsx --- AppImage/components/system-overview.tsx | 171 +++++------------------- 1 file changed, 35 insertions(+), 136 deletions(-) diff --git a/AppImage/components/system-overview.tsx b/AppImage/components/system-overview.tsx index a7b03de..71bea5d 100644 --- a/AppImage/components/system-overview.tsx +++ b/AppImage/components/system-overview.tsx @@ -541,83 +541,61 @@ export function SystemOverview() { {networkData ? (
-
+
Active Interfaces: {(networkData.physical_active_count || 0) + (networkData.bridge_active_count || 0)}
- {(() => { - const primaryInterface = - networkData.physical_interfaces?.find((i) => i.status === "up") || - networkData.bridge_interfaces?.find((i) => i.status === "up") || - networkData.interfaces.find((i) => i.status === "up") - - return primaryInterface ? ( -
- Primary Interface: - {primaryInterface.name} -
- ) : null - })()} - -
- Data Sent: - - {(networkData.traffic.bytes_sent / 1024 ** 3).toFixed(2)} GB - -
-
- Data Received: - - {(networkData.traffic.bytes_recv / 1024 ** 3).toFixed(2)} GB - -
- -
+
{networkData.physical_interfaces && networkData.physical_interfaces.length > 0 && ( - <> -
Physical Interfaces
- {networkData.physical_interfaces.slice(0, 2).map((iface) => ( -
- {iface.name}: +
+ {networkData.physical_interfaces + .filter((iface) => iface.status === "up") + .map((iface) => ( - {iface.status} + {iface.name} -
- ))} - + ))} +
)} {networkData.bridge_interfaces && networkData.bridge_interfaces.length > 0 && ( - <> -
Bridge Interfaces
- {networkData.bridge_interfaces.slice(0, 2).map((iface) => ( -
- {iface.name}: +
+ {networkData.bridge_interfaces + .filter((iface) => iface.status === "up") + .map((iface) => ( - {iface.status} + {iface.name} -
- ))} - + ))} +
)}
+ +
+
+ Data Sent: + + {(networkData.traffic.bytes_sent / 1024 ** 3).toFixed(2)} GB + +
+
+ Data Received: + + {(networkData.traffic.bytes_recv / 1024 ** 3).toFixed(2)} GB + +
+
) : (
Network data not available
@@ -693,85 +671,6 @@ export function SystemOverview() {
- - {vmData.length > 0 && ( - - - -
- - Virtual Machines & Containers -
- - {vmData.length} Total - -
-
- -
- {vmData.map((vm) => ( - - -
-
-
{vm.name}
-
- {vm.type === "lxc" ? "LXC" : "VM"} #{vm.vmid} -
-
- - {vm.status} - -
- -
-
-
- CPU - {(vm.cpu * 100).toFixed(1)}% -
- -
- -
-
- Memory - - {formatBytes(vm.mem)} / {formatBytes(vm.maxmem)} GB - -
- -
- -
-
- Disk - - {formatBytes(vm.disk)} / {formatBytes(vm.maxdisk)} GB - -
- -
- -
- Uptime - {formatUptime(vm.uptime)} -
-
-
-
- ))} -
-
-
- )}
) }