fix(ipsec): показывать неопределённый статус при общих Remote ID

This commit is contained in:
Denozordec committed 2026-10-10 10:33:54 +07:00
1 parent 7815e00a1c
commit cb6ec09312
20 files changed
+1077 -15

No files matched your search

+8 -1
View File
@@ -361,6 +361,7 @@ function IpsecPage({ selectedServerId, setSelectedServerId, workspaceTab, setWor
const serversWithIpsec = scopedSummaries.filter((s) => s.peers.length > 0).length
const clientsOnline = scopedClients.filter((c) => c.online).length
const clientsAmbiguous = scopedClients.filter(c => c.sessionAmbiguous).length
const caOk = scopedSummaries.some((s) => s.caCert)
const compactServer = effectiveServerId !== ALL_SERVERS_ID
const sheetServerId = compactServer ? effectiveServerId : undefined
@@ -690,7 +691,7 @@ function IpsecPage({ selectedServerId, setSelectedServerId, workspaceTab, setWor
{
id: "online",
label: "Онлайн",
value: scopeUnknown ? "—" : clientsOnline,
value: scopeUnknown || clientsAmbiguous > 0 ? "—" : clientsOnline,
icon: <ActivityIcon className="size-4" />,
iconClassName: "text-success",
},
@@ -711,6 +712,12 @@ function IpsecPage({ selectedServerId, setSelectedServerId, workspaceTab, setWor
{scopeWriteReceipt && <span data-source-time="write">Изменение подтверждено API: <time dateTime={scopeWriteReceipt.at} title={`Устройство ${scopeWriteReceipt.serverId}; подтверждение API не заменяет опрос`}>{formatReceipt(scopeWriteReceipt.at)}</time></span>}
</div>}
{clientsAmbiguous > 0 && <Alert>
<AlertCircleIcon />
<AlertTitle>Статус части клиентов не определён</AlertTitle>
<AlertDescription>У {clientsAmbiguous} клиентов совпадает идентификатор сессии. RouterOS не сообщает, какому из них принадлежит подключение. Проверьте Remote ID.</AlertDescription>
</Alert>}
{isLive && (dataError || inventoryError) ? (
<Alert variant="destructive">
<AlertCircleIcon />