feat: add IP to title

This commit is contained in:
2025-09-16 14:30:37 +02:00
parent d870219136
commit f9dc811239
4 changed files with 26 additions and 215 deletions

View File

@@ -63,9 +63,20 @@ class TopologyGraphComponent extends Component {
openDrawerForNode(nodeData) {
this.ensureDrawer();
// Title from hostname or IP
// Title from hostname and IP
try {
const displayName = nodeData.hostname || nodeData.ip || 'Node Details';
const hostname = nodeData.hostname || '';
const ip = nodeData.ip || '';
let displayName = 'Node Details';
if (hostname && ip) {
displayName = `${hostname} - ${ip}`;
} else if (hostname) {
displayName = hostname;
} else if (ip) {
displayName = ip;
}
const titleEl = this.detailsDrawer.querySelector('.drawer-title');
if (titleEl) titleEl.textContent = displayName;
} catch (_) {}