Track proxy traffic separately in device inventory
Build and Deploy Gateway / build-and-push (push) Successful in 15s
Build and Deploy Gateway / deploy (push) Successful in 13s

This commit is contained in:
2026-08-07 17:08:24 +03:00
parent 9f31eaf396
commit 53e6cf2146
13 changed files with 714 additions and 146 deletions
+4 -2
View File
@@ -36,8 +36,10 @@ export function sortDevicesByTraffic(devices, direction = 'desc') {
return (Array.isArray(devices) ? devices : [])
.map((device, index) => ({ device, index }))
.sort((left, right) => {
const leftTotal = byteString(left.device.uploadBytes) + byteString(left.device.downloadBytes);
const rightTotal = byteString(right.device.uploadBytes) + byteString(right.device.downloadBytes);
const leftTotal = byteString(left.device.uploadBytes) + byteString(left.device.downloadBytes)
+ byteString(left.device.proxyUploadBytes) + byteString(left.device.proxyDownloadBytes);
const rightTotal = byteString(right.device.uploadBytes) + byteString(right.device.downloadBytes)
+ byteString(right.device.proxyUploadBytes) + byteString(right.device.proxyDownloadBytes);
if (leftTotal === rightTotal) return left.index - right.index;
return (leftTotal < rightTotal ? -1 : 1) * factor;
})