mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fixing placement of typings for icons
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
5aea9001a4
commit
c0f62a7cc9
@ -38,9 +38,6 @@ export interface KubernetesClusterPrometheusMetrics {
|
|||||||
prefix: string;
|
prefix: string;
|
||||||
};
|
};
|
||||||
type?: string;
|
type?: string;
|
||||||
icon?: {
|
|
||||||
src?: string;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface KubernetesClusterSpec extends CatalogEntitySpec {
|
export interface KubernetesClusterSpec extends CatalogEntitySpec {
|
||||||
@ -49,7 +46,13 @@ export interface KubernetesClusterSpec extends CatalogEntitySpec {
|
|||||||
metrics?: {
|
metrics?: {
|
||||||
source: string;
|
source: string;
|
||||||
prometheus?: KubernetesClusterPrometheusMetrics;
|
prometheus?: KubernetesClusterPrometheusMetrics;
|
||||||
}
|
};
|
||||||
|
icon?: {
|
||||||
|
// TODO: move to CatalogEntitySpec once any-entity icons are supported
|
||||||
|
src?: string;
|
||||||
|
material?: string;
|
||||||
|
background?: string;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface KubernetesClusterStatus extends CatalogEntityStatus {
|
export interface KubernetesClusterStatus extends CatalogEntityStatus {
|
||||||
|
|||||||
@ -119,10 +119,12 @@ export class ClusterManager extends Singleton {
|
|||||||
entity.spec.metrics.prometheus = prometheus;
|
entity.spec.metrics.prometheus = prometheus;
|
||||||
}
|
}
|
||||||
|
|
||||||
cluster.preferences.icon ? entity.spec.icon = {
|
if (cluster.preferences.icon) {
|
||||||
...entity.spec.icon,
|
entity.spec.icon ??= {};
|
||||||
src: cluster.preferences.icon
|
entity.spec.icon.src = cluster.preferences.icon;
|
||||||
} : entity.spec.icon = null;
|
} else {
|
||||||
|
entity.spec.icon = null;
|
||||||
|
}
|
||||||
|
|
||||||
catalogEntityRegistry.items.splice(index, 1, entity);
|
catalogEntityRegistry.items.splice(index, 1, entity);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user