Make CatalogEntity labels clickable (#3075)

- Transition workspace's to be labels

- Fix migrations to support multiple migrations for the same version

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-06-18 08:44:28 -04:00
1 parent d812e28639
commit 7f51e3addd
30 files changed
+268 -120

No files matched your search

+2
View File
@@ -102,6 +102,8 @@ 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) {
entity.metadata.name = cluster.preferences.clusterName;
+10
View File
@@ -207,6 +207,11 @@ export class Cluster implements ClusterModel, ClusterState {
*/
@observable accessibleNamespaces: string[] = [];
/**
* Labels for the catalog entity
*/
@observable labels: Record<string, string> = {};
/**
* Is cluster available
*
@@ -304,6 +309,10 @@ export class Cluster implements ClusterModel, ClusterState {
if (model.accessibleNamespaces) {
this.accessibleNamespaces = model.accessibleNamespaces;
}
if (model.labels) {
this.labels = model.labels;
}
}
/**
@@ -583,6 +592,7 @@ export class Cluster implements ClusterModel, ClusterState {
preferences: this.preferences,
metadata: this.metadata,
accessibleNamespaces: this.accessibleNamespaces,
labels: this.labels,
};
return toJS(model);