Handle rejected subscriptions and add local client compose
Build and Deploy Gateway / build-and-push (push) Successful in 14s
Build and Deploy Gateway / deploy (push) Successful in 6s

This commit is contained in:
2026-07-13 20:23:37 +03:00
parent 8c19f2cba9
commit 56f5e408e3
10 changed files with 306 additions and 443 deletions
+11 -2
View File
@@ -108,8 +108,9 @@ export async function probeGatewayPresence({
}) {
if (!isIpv4(gateway)) throw new Error('Некорректный адрес default gateway');
const presenceUrl = `http://${gateway}:${port}/api/gateway-presence?nonce=${nonce}`;
const response = await fetchImpl(
`http://${gateway}:${port}/api/gateway-presence?nonce=${nonce}`,
presenceUrl,
{ headers: { accept: 'application/json' }, signal: AbortSignal.timeout(timeoutMs) },
);
const payload = await response.json().catch(() => ({}));
@@ -117,7 +118,11 @@ export async function probeGatewayPresence({
throw new Error('Текущий default gateway не является доверенным Harbor Gateway');
}
return { gatewayId: payload.gatewayId };
return {
gatewayId: payload.gatewayId,
uiOrigin: new URL(presenceUrl).origin,
verifiedAt: new Date().toISOString(),
};
}
export function normalizeHostNetworkState(value, {
@@ -169,6 +174,8 @@ export function createGatewayAutoState() {
failures: 0,
gateway: null,
gatewayId: '',
uiOrigin: '',
lastVerifiedAt: null,
lastError: '',
};
}
@@ -199,6 +206,8 @@ export function nextGatewayAutoState(current, {
mode: 'gateway-direct',
failures: 0,
gatewayId: verifiedGateway.gatewayId,
uiOrigin: verifiedGateway.uiOrigin || '',
lastVerifiedAt: verifiedGateway.verifiedAt || new Date().toISOString(),
lastError: '',
};
}