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:
1 file changed
+4
-1
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user