From 0a37121dbe90175936a2d4ccce111f4932743f38 Mon Sep 17 00:00:00 2001 From: Dmitriy Petrov Date: Fri, 7 Aug 2026 17:51:53 +0300 Subject: [PATCH] Refine device traffic display and sorting --- src/shared/versions.js | 4 +- src/web/components/DevicesPanel.jsx | 16 ++------ src/web/styles.css | 45 +--------------------- src/web/utils/format.js | 6 ++- test/web/device-inventory-contract.test.js | 10 +++-- 5 files changed, 17 insertions(+), 64 deletions(-) diff --git a/src/shared/versions.js b/src/shared/versions.js index ff938ba..e172f13 100644 --- a/src/shared/versions.js +++ b/src/shared/versions.js @@ -1,6 +1,6 @@ export const HARBOR_VERSIONS = Object.freeze({ - macClient: '0.13.1', - gatewayClient: '0.14.1', + macClient: '0.13.2', + gatewayClient: '0.14.2', gatewayBackend: '0.14.0', }); diff --git a/src/web/components/DevicesPanel.jsx b/src/web/components/DevicesPanel.jsx index 4c45134..cefb72d 100644 --- a/src/web/components/DevicesPanel.jsx +++ b/src/web/components/DevicesPanel.jsx @@ -275,15 +275,10 @@ export function DevicesPanel({ open, panelRef, closeRef, onClose }) { const saving = savingId === device.id; const seen = formatLastSeen(device.lastSeenAt); const online = device.status === 'online'; - const download = formatByteString(device.downloadBytes); - const upload = formatByteString(device.uploadBytes); - const proxyDownload = formatByteString(device.proxyDownloadBytes); - const proxyUpload = formatByteString(device.proxyUploadBytes); const gatewayTotal = byteString(device.downloadBytes) + byteString(device.uploadBytes); const proxyTotal = byteString(device.proxyDownloadBytes) + byteString(device.proxyUploadBytes); const gatewayTraffic = formatByteString(gatewayTotal.toString()); const proxyTraffic = formatByteString(proxyTotal.toString()); - const trafficLabel = `Gateway: получено ${download}, отдано ${upload}. Прокси: получено ${proxyDownload}, отдано ${proxyUpload}`; const copied = copyFeedback?.id === device.id; const policyBusy = device.policyStatus === 'applying'; const policyFailed = device.policyStatus === 'failed'; @@ -344,7 +339,7 @@ export function DevicesPanel({ open, panelRef, closeRef, onClose }) { ) : ( -
+ <> {device.ip ?

+ )}