From 60ea0fa11b93cfc79ddf2cd6aab06f041579c2eb Mon Sep 17 00:00:00 2001 From: findthelorax Date: Mon, 4 May 2026 20:37:43 -0400 Subject: [PATCH] made multiple ips all clickable separately --- .../src/components/panels/DetailPanel.tsx | 35 +++++++++++++++---- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/frontend/src/components/panels/DetailPanel.tsx b/frontend/src/components/panels/DetailPanel.tsx index cddd301..16ec7ce 100644 --- a/frontend/src/components/panels/DetailPanel.tsx +++ b/frontend/src/components/panels/DetailPanel.tsx @@ -85,7 +85,14 @@ export function DetailPanel({ onEdit }: DetailPanelProps) { const { data } = node const services = data.services ?? [] const statusColor = STATUS_COLORS[data.status] - const host = data.ip ?? data.hostname + const host = data.ip ? primaryIp(data.ip) : data.hostname + const ipAddresses = data.ip + ? data.ip + .split(/[\n,;]+/) + .map((ip) => primaryIp(ip.trim())) + .filter(Boolean) + .filter((ip, index, all) => all.indexOf(ip) === index) + : [] const handleDelete = () => { if (confirm(`Delete "${data.label}"?`)) { @@ -223,12 +230,26 @@ export function DetailPanel({ onEdit }: DetailPanelProps) { )} - {data.ip && ( -
- IP Address - - {data.ip} - + {ipAddresses.length > 0 && ( +
+ {ipAddresses.length > 1 ? 'IP Addresses' : 'IP Address'} +
+ {ipAddresses.map((ip, index) => ( + + + {ip} + + + {index < ipAddresses.length - 1 && ,} + + ))} +
)} {data.mac && }