mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Sort cluster list by label column
Signed-off-by: gitstart <bot@gitstart.com>
This commit is contained in:
parent
f1a960fd78
commit
839a76e639
@ -88,7 +88,10 @@ export class ClusterManager {
|
||||
protected updateCatalog(clusters: Cluster[]) {
|
||||
this.dependencies.logger.debug("[CLUSTER-MANAGER]: updating catalog from cluster store");
|
||||
|
||||
for (const cluster of clusters) {
|
||||
// Sort clusters based on the path of the kubeconfig file
|
||||
const sortedClusters = [...clusters].sort((a, b) => a.kubeConfigPath.get().localeCompare(b.kubeConfigPath.get()));
|
||||
|
||||
for (const cluster of sortedClusters) {
|
||||
this.updateEntityFromCluster(cluster);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user