mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix set of cluster entity icon src (#3134)
Co-authored-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
20d6e50cb7
commit
31b48fe245
2 files changed
+14
-6
No files matched your search
@@ -102,7 +102,7 @@ export class ClusterManager extends Singleton {
|
||||
const entity = catalogEntityRegistry.items[index] as KubernetesCluster;
|
||||
|
||||
this.updateEntityStatus(entity, cluster);
|
||||
|
||||
|
||||
entity.metadata.labels = Object.assign({}, cluster.labels, entity.metadata.labels);
|
||||
|
||||
if (cluster.preferences?.clusterName) {
|
||||
@@ -119,7 +119,12 @@ export class ClusterManager extends Singleton {
|
||||
entity.spec.metrics.prometheus = prometheus;
|
||||
}
|
||||
|
||||
entity.spec.icon.src = cluster.preferences.icon;
|
||||
if (cluster.preferences.icon) {
|
||||
entity.spec.icon ??= {};
|
||||
entity.spec.icon.src = cluster.preferences.icon;
|
||||
} else {
|
||||
entity.spec.icon = null;
|
||||
}
|
||||
|
||||
catalogEntityRegistry.items.splice(index, 1, entity);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user