diff --git a/web/views/index.erb b/web/views/index.erb index 595576f..0f167bc 100644 --- a/web/views/index.erb +++ b/web/views/index.erb @@ -1687,13 +1687,24 @@ var(--fg); } function openNeighborOverlay(target, segment) { if (!shortInfoOverlay || !shortInfoContent || !segment) return; const nodeName = shortInfoValueOrDash(segment.sourceDisplayName || segment.sourceId || ''); - const neighborName = shortInfoValueOrDash(segment.targetDisplayName || segment.targetId || ''); const snrText = shortInfoValueOrDash(formatSnrDisplay(segment.snr)); - const sourceIdHtml = segment.sourceId ? ` ${escapeHtml(segment.sourceId)}` : ''; - const targetIdHtml = segment.targetId ? ` ${escapeHtml(segment.targetId)}` : ''; + const sourceShortHtml = renderShortHtml( + segment.sourceShortName, + segment.sourceRole, + segment.sourceDisplayName + ); + const targetShortHtml = renderShortHtml( + segment.targetShortName, + segment.targetRole, + segment.targetDisplayName + ); + const sourceIdText = shortInfoValueOrDash(segment.sourceId || ''); + const neighborFullName = shortInfoValueOrDash(segment.targetDisplayName || segment.targetId || ''); const lines = []; - lines.push(`${escapeHtml(nodeName)}${sourceIdHtml}`); - lines.push(`Neighbor: ${escapeHtml(neighborName)}${targetIdHtml}`); + lines.push(`${escapeHtml(nodeName)}`); + lines.push(`${sourceShortHtml} ${escapeHtml(sourceIdText)}`); + const neighborLine = `${targetShortHtml} [${escapeHtml(neighborFullName)}]`; + lines.push(neighborLine); lines.push(`SNR: ${escapeHtml(snrText)}`); shortInfoContent.innerHTML = lines.join('
'); shortInfoAnchor = target; @@ -2210,6 +2221,8 @@ var(--fg); } const snrValue = toFiniteNumber(entry.snr); const sourceDisplayName = getNodeDisplayNameForOverlay(sourceNode); const targetDisplayName = getNodeDisplayNameForOverlay(targetNode); + const sourceShortName = normalizeNodeNameValue(sourceNode.short_name ?? sourceNode.shortName); + const targetShortName = normalizeNodeNameValue(targetNode.short_name ?? targetNode.shortName); neighborSegments.push({ latlngs: [[srcLat, srcLon], [tgtLat, tgtLon]], @@ -2220,7 +2233,11 @@ var(--fg); } targetId, snr: snrValue, sourceDisplayName, - targetDisplayName + targetDisplayName, + sourceShortName, + sourceRole: sourceNode.role, + targetShortName, + targetRole: targetNode.role }); }