From 5738c90721b45d78f3e46bea56524090d7feb9f5 Mon Sep 17 00:00:00 2001 From: MacRimi Date: Sat, 25 Oct 2025 22:31:13 +0200 Subject: [PATCH] Update network-metrics.tsx --- AppImage/components/network-metrics.tsx | 71 +++++++++++++++++++++---- 1 file changed, 62 insertions(+), 9 deletions(-) diff --git a/AppImage/components/network-metrics.tsx b/AppImage/components/network-metrics.tsx index 688914e..8882caa 100644 --- a/AppImage/components/network-metrics.tsx +++ b/AppImage/components/network-metrics.tsx @@ -835,13 +835,66 @@ export function NetworkMetrics() { ) : selectedInterface.status.toLowerCase() === "up" && selectedInterface.vm_type === "vm" ? ( -
- -

Historical Metrics Not Available

-

- Proxmox does not store historical network metrics for individual VM interfaces. Only cumulative - statistics since last boot are available below. -

+
+

Traffic Statistics

+
+
+
Bytes Received
+
+ {formatBytes(selectedInterface.bytes_recv)} +
+
+
+
Bytes Sent
+
+ {formatBytes(selectedInterface.bytes_sent)} +
+
+
+
Packets Received
+
{selectedInterface.packets_recv?.toLocaleString() || "N/A"}
+
+
+
Packets Sent
+
{selectedInterface.packets_sent?.toLocaleString() || "N/A"}
+
+
+
Errors In
+
{selectedInterface.errors_in || 0}
+
+
+
Errors Out
+
{selectedInterface.errors_out || 0}
+
+
+
Drops In
+
{selectedInterface.drops_in || 0}
+
+
+
Drops Out
+
{selectedInterface.drops_out || 0}
+
+ {selectedInterface.packet_loss_in !== undefined && ( +
+
Packet Loss In
+
1 ? "text-red-500" : "text-green-500"}`} + > + {selectedInterface.packet_loss_in}% +
+
+ )} + {selectedInterface.packet_loss_out !== undefined && ( +
+
Packet Loss Out
+
1 ? "text-red-500" : "text-green-500"}`} + > + {selectedInterface.packet_loss_out}% +
+
+ )} +
) : (
@@ -853,8 +906,8 @@ export function NetworkMetrics() {
)} - {/* Cumulative Statistics - Only show if interface is UP */} - {selectedInterface.status.toLowerCase() === "up" && ( + {/* Cumulative Statistics - Only show if interface is UP and NOT a VM interface */} + {selectedInterface.status.toLowerCase() === "up" && selectedInterface.vm_type !== "vm" && (

Cumulative Statistics (Since Last Boot)