diff --git a/extensions/Servers/Proxmox/views/statistics.blade.php b/extensions/Servers/Proxmox/views/statistics.blade.php index 2c146fb28..9083c394b 100644 --- a/extensions/Servers/Proxmox/views/statistics.blade.php +++ b/extensions/Servers/Proxmox/views/statistics.blade.php @@ -2138,23 +2138,8 @@
@foreach($networkAnalysis['connections'] as $index => $connection) @php - // Calculate bytes for sorting (extract numeric value) - $bytesForSort = 0; - if (isset($connection['bytes_human'])) { - $bytesHuman = $connection['bytes_human']; - // Extract number and unit, convert to bytes - if (preg_match('/([\d.]+)\s*(Bytes|KiB|MiB|GiB|TiB)/i', $bytesHuman, $matches)) { - $value = (float)$matches[1]; - $unit = strtoupper($matches[2]); - $bytesForSort = match($unit) { - 'KIB' => $value * 1024, - 'MIB' => $value * 1024 * 1024, - 'GIB' => $value * 1024 * 1024 * 1024, - 'TIB' => $value * 1024 * 1024 * 1024 * 1024, - default => $value - }; - } - } + // Use raw bytes value from backend for reliable numeric sorting + $bytesForSort = (int)($connection['bytes'] ?? 0); @endphp