diff --git a/frontend/src/NetworkConfigManager.jsx b/frontend/src/NetworkConfigManager.jsx index ae4889e..4d675f1 100644 --- a/frontend/src/NetworkConfigManager.jsx +++ b/frontend/src/NetworkConfigManager.jsx @@ -24,7 +24,8 @@ import { IconCircleFilled, IconLayoutGrid, IconList, - IconCode + IconCode, + IconArrowsRightLeft } from '@tabler/icons-react'; /** @@ -922,72 +923,99 @@ function NetworkConfigManager() { ? getParentGateway(gateway.parentGatewayId) : null; - // Определяем тип индикатора + // Определяем тип индикатора (как в ServerCard) const indicatorType = gateway.type === 'recursive' ? 'EXIT' : 'JUMP'; const indicatorColor = gateway.type === 'recursive' ? 'red' : 'blue'; - const indicatorIcon = gateway.type === 'recursive' ? IconRouter : IconWorld; + const IndicatorIcon = gateway.type === 'recursive' ? IconArrowsRightLeft : IconRouter; - // Определяем отображаемый IP/домен для зеленого блока - const displayIp = parentGateway - ? (parentGateway.parentType === 'interface' - ? (parentGateway.name || parentGateway.interfaceType || 'interface') - : parentGateway.ip) - : gateway.ip; + // Формируем текст для зеленого блока + let displayText = ''; + if (gateway.type === 'direct') { + // Для прямого gateway: 0.0.0.0/0 -> IP адрес + displayText = gateway.ip ? `0.0.0.0/0 → ${gateway.ip}` : ''; + } else if (gateway.type === 'recursive' && parentGateway) { + // Для рекурсивного: IP адрес -> IP адрес родительского gateway + const parentIp = parentGateway.parentType === 'interface' + ? parentGateway.remoteIp + : parentGateway.ip; + displayText = gateway.ip && parentIp ? `${gateway.ip} → ${parentIp}` : ''; + } return ( -
+ {server.dns || server.ip || gateway.serverId}
+
+ )}
+
+ {gatewayType.label}
+
+ {gateway.ip && (
+
)}
{displayIp}
-
-