feat: add IP to title
This commit is contained in:
@@ -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 (_) {}
|
||||
|
||||
Reference in New Issue
Block a user