feat: always sort nodes by hostname in monitoring view
This commit is contained in:
@@ -343,7 +343,14 @@ class MonitoringViewComponent extends Component {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const nodesHtml = Array.from(nodeResources.values()).map(nodeData => {
|
const nodesHtml = Array.from(nodeResources.values())
|
||||||
|
.sort((a, b) => {
|
||||||
|
// Sort by hostname, fallback to IP if hostname is not available
|
||||||
|
const hostnameA = a.hostname || a.ip || '';
|
||||||
|
const hostnameB = b.hostname || b.ip || '';
|
||||||
|
return hostnameA.localeCompare(hostnameB);
|
||||||
|
})
|
||||||
|
.map(nodeData => {
|
||||||
return this.renderNodeCard(nodeData);
|
return this.renderNodeCard(nodeData);
|
||||||
}).join('');
|
}).join('');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user