Reposition Gateway traffic summary below power controls
This commit is contained in:
@@ -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',
|
||||
});
|
||||
|
||||
|
||||
@@ -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
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user