Update network-metrics.tsx

This commit is contained in:
MacRimi
2025-10-26 11:49:13 +01:00
parent a7af072ca7
commit 2ff7c111af

View File

@@ -846,6 +846,22 @@ export function NetworkMetrics() {
{/* Network Traffic Statistics - Only show if interface is UP and NOT a VM interface */} {/* Network Traffic Statistics - Only show if interface is UP and NOT a VM interface */}
{displayInterface.status.toLowerCase() === "up" && displayInterface.vm_type !== "vm" ? ( {displayInterface.status.toLowerCase() === "up" && displayInterface.vm_type !== "vm" ? (
<div> <div>
<h3 className="text-sm font-semibold text-muted-foreground mb-4">Traffic since last boot</h3>
<div className="grid grid-cols-2 gap-4 mb-6">
<div>
<div className="text-sm text-muted-foreground">Bytes Received</div>
<div className="font-medium text-green-500 text-lg">
{formatBytes(displayInterface.bytes_recv)}
</div>
</div>
<div>
<div className="text-sm text-muted-foreground">Bytes Sent</div>
<div className="font-medium text-blue-500 text-lg">
{formatBytes(displayInterface.bytes_sent)}
</div>
</div>
</div>
<h3 className="text-sm font-semibold text-muted-foreground mb-4"> <h3 className="text-sm font-semibold text-muted-foreground mb-4">
Network Traffic Statistics ( Network Traffic Statistics (
{modalTimeframe === "hour" {modalTimeframe === "hour"