Enhance device traffic feedback and totals
Build and Deploy Gateway / build-and-push (push) Successful in 15s
Build and Deploy Gateway / deploy (push) Successful in 6s

This commit is contained in:
2026-08-07 18:10:19 +03:00
parent d0c5336b7e
commit 00a2e1606b
5 changed files with 162 additions and 16 deletions
+6
View File
@@ -31,6 +31,12 @@ export function formatByteString(value) {
return `${tenths / 10n},${tenths % 10n} ${units[unit]}`;
}
export function positiveByteDelta(previous, current) {
const before = byteString(previous);
const after = byteString(current);
return after > before ? formatByteString((after - before).toString()) : '';
}
export function sortDevicesByTraffic(devices, direction = 'desc') {
const factor = direction === 'asc' ? 1 : -1;
return (Array.isArray(devices) ? devices : [])