Reposition Gateway traffic summary below power controls
Build and Deploy Gateway / build-and-push (push) Successful in 14s
Build and Deploy Gateway / deploy (push) Successful in 7s

This commit is contained in:
2026-08-08 01:13:48 +03:00
parent 3cdb0c735e
commit c26d4cb43b
5 changed files with 47 additions and 26 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
export const HARBOR_VERSIONS = Object.freeze({
macClient: '0.18.1',
gatewayClient: '0.19.1',
macClient: '0.18.2',
gatewayClient: '0.19.2',
gatewayBackend: '0.19.0',
});
+19 -19
View File
@@ -1426,25 +1426,6 @@ export function ClientOverviewPage({
</div>
</div>
{isGateway && <section className="client-gateway-summary" aria-label="Общий трафик Harbor">
<div className="client-gateway-traffic-heading">
<span>Учтено Harbor</span>
<strong>{formatByteString(globalTraffic?.totalBytes || '0')}</strong>
</div>
<div className="client-gateway-traffic-chart">
<TrafficChart
samples={globalTraffic?.history || []}
capacity={deviceSnapshot?.trafficHistoryCapacity || 120}
routeLabel="Gateway"
/>
</div>
<div className={`client-gateway-traffic-freshness${trafficSourceError ? ' is-stale' : ''}`} role="status" aria-live="polite">
{trafficSourceError
? `Трафик не обновляется · последние данные ${trafficFreshness}`
: globalTraffic?.observedAt ? `Обновлено ${trafficFreshness}` : 'Ожидаем первые данные трафика'}
</div>
</section>}
<section className={`client-proxies${isGateway ? ' is-gateway' : ''}`} aria-label={isGateway ? 'Gateway и Gateway Proxy' : 'Локальный прокси'}>
<div className="client-access-point">
{!isGateway && (
@@ -1486,6 +1467,25 @@ export function ClientOverviewPage({
</section>
)}
{isGateway && <section className="client-gateway-summary" aria-label="Общий трафик Harbor">
<div className="client-gateway-traffic-heading">
<span>Учтено Harbor</span>
<strong>{formatByteString(globalTraffic?.totalBytes || '0')}</strong>
</div>
<div className="client-gateway-traffic-chart">
<TrafficChart
samples={globalTraffic?.history || []}
capacity={deviceSnapshot?.trafficHistoryCapacity || 120}
routeLabel="Gateway"
/>
</div>
<div className={`client-gateway-traffic-freshness${trafficSourceError ? ' is-stale' : ''}`} role="status" aria-live="polite">
{trafficSourceError
? `Трафик не обновляется · последние данные ${trafficFreshness}`
: globalTraffic?.observedAt ? `Обновлено ${trafficFreshness}` : 'Ожидаем первые данные трафика'}
</div>
</section>}
<div
ref={isGateway ? subscriptionPanelRef : undefined}
id={isGateway ? 'client-subscription-drawer' : undefined}
+14 -1
View File
@@ -2615,8 +2615,16 @@ p {
justify-self: center;
}
.client-panel.is-gateway-home {
grid-template-rows: minmax(0, 1fr) auto;
row-gap: 28px;
}
.client-gateway-summary {
width: min(300px, 100%);
grid-column: 1 / -1;
grid-row: 2;
justify-self: center;
width: min(480px, calc(100% - 24px));
display: grid;
gap: 6px;
text-align: center;
@@ -4553,6 +4561,11 @@ p {
order: 1;
}
.client-gateway-summary {
grid-row: auto;
order: 2;
}
.client-form {
height: auto;
max-height: none;