diff --git a/frontend/src/NetworkMapDashboard.jsx b/frontend/src/NetworkMapDashboard.jsx index c99ee7a..a7a977c 100644 --- a/frontend/src/NetworkMapDashboard.jsx +++ b/frontend/src/NetworkMapDashboard.jsx @@ -89,6 +89,13 @@ export default function NetworkMapDashboard() { const from = String(c.from); const to = String(c.to); if (!from || !to || from === to) return; + const srcFrom = servers.find((s) => s.ip === from); + const srcTo = servers.find((s) => s.ip === to); + const canPingFrom = srcFrom && ['jumphost', 'home'].includes(String(srcFrom.type || '').toLowerCase()); + const canPingTo = srcTo && ['jumphost', 'home'].includes(String(srcTo.type || '').toLowerCase()); + + // Пингуем только с jumphost/home, иначе бекенд возвращает E_PING (сервер не найден) + if (canPingFrom) { tasks.push(async () => { if (pingAbortRef.current) return; try { @@ -103,6 +110,9 @@ export default function NetworkMapDashboard() { return { key: key(from, to), ms: null }; } }); + } + + if (canPingTo) { tasks.push(async () => { if (pingAbortRef.current) return; try { @@ -117,6 +127,7 @@ export default function NetworkMapDashboard() { return { key: key(to, from), ms: null }; } }); + } }); const results = await runWithLimit(tasks, 4);