Skip to content

Commit ea2bbda

Browse files
authored
fix(ports): show WAN tooltip only on the gateway unit (#1386)
Non-gateway routers with a wan jack showed the gateway's public IP and DNS on a local link. The WAN info now reaches the jack only on the gateway unit.\n\nCloses #1383
1 parent 9dcab46 commit ea2bbda

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎app/src/components/routers/PortPanel.tsx‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,10 @@ export function PortPanel({ router, extras, className, snmpStats }: {
325325
})
326326
const used = ports.filter((p) => p.up).length
327327
const wirelessUplink = ex.backhaul?.kind === 'wireless'
328+
// #1383: la info WAN del contexto es la del gateway; pintarla en la boca
329+
// "wan" de cualquier otra unidad (p.ej. un AP cuyo uplink entra por su ex
330+
// boca WAN) le cuelga una IP pública y DNS que no son suyos.
331+
const jackWan = router.roleBadge === 'Principal' ? wan : undefined
328332

329333
// Separador visual tras el puerto WAN
330334
const wanPorts = ports.filter((p) => p.id === 'wan')
@@ -360,7 +364,7 @@ export function PortPanel({ router, extras, className, snmpStats }: {
360364
)}
361365
>
362366
{wanPorts.map((p, i) => (
363-
<Jack key={p.id} port={p} index={i} wan={wan} />
367+
<Jack key={p.id} port={p} index={i} wan={jackWan} />
364368
))}
365369
{wanPorts.length > 0 && lanPorts.length > 0 && (
366370
<div className="mx-1 h-[104px] w-px shrink-0 self-center bg-border/70" aria-hidden="true" />

0 commit comments

Comments
 (0)