Use first name only in protocol hover cards

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Ian Gulliver
2026-01-30 22:19:22 -08:00
parent a0e71d2347
commit 2c27ce7ff5
2 changed files with 18 additions and 5 deletions

View File

@@ -32,6 +32,19 @@ export function getShortLabel(node) {
return '??';
}
export function getFirstName(node) {
if (node.names && node.names.length > 0) return node.names[0];
if (node.interfaces && node.interfaces.length > 0) {
for (const iface of node.interfaces) {
if (iface.ips && iface.ips.length > 0) return iface.ips[0];
}
for (const iface of node.interfaces) {
if (iface.mac) return iface.mac;
}
}
return '??';
}
export function getNodeIdentifiers(node) {
const ids = [];
if (node.names) {