1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

fix set of cluster entity icon src

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen 2021-06-21 17:13:29 +03:00
parent e2e3e371a8
commit a7f69ab0e3

View File

@ -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,10 @@ export class ClusterManager extends Singleton {
entity.spec.metrics.prometheus = prometheus;
}
entity.spec.icon.src = cluster.preferences.icon;
cluster.preferences.icon ? entity.spec.icon = {
src: cluster.preferences.icon,
...entity.spec.icon
} : entity.spec.icon = null;
catalogEntityRegistry.items.splice(index, 1, entity);
}