mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
show delete only for internally stored clusters
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
123b628ad7
commit
9f972ef088
@ -39,7 +39,10 @@ export class KubernetesCluster extends CatalogEntity<CatalogEntityMetadata, Kube
|
|||||||
onlyVisibleForSource: "local",
|
onlyVisibleForSource: "local",
|
||||||
onClick: async () => context.navigate(`/entity/${this.metadata.uid}/settings`)
|
onClick: async () => context.navigate(`/entity/${this.metadata.uid}/settings`)
|
||||||
},
|
},
|
||||||
{
|
];
|
||||||
|
|
||||||
|
if (this.metadata.labels["file"]?.startsWith(ClusterStore.storedKubeConfigFolder)) {
|
||||||
|
context.menuItems.push({
|
||||||
icon: "delete",
|
icon: "delete",
|
||||||
title: "Delete",
|
title: "Delete",
|
||||||
onlyVisibleForSource: "local",
|
onlyVisibleForSource: "local",
|
||||||
@ -47,8 +50,8 @@ export class KubernetesCluster extends CatalogEntity<CatalogEntityMetadata, Kube
|
|||||||
confirm: {
|
confirm: {
|
||||||
message: `Remove Kubernetes Cluster "${this.metadata.name} from ${productName}?`
|
message: `Remove Kubernetes Cluster "${this.metadata.name} from ${productName}?`
|
||||||
}
|
}
|
||||||
},
|
});
|
||||||
];
|
}
|
||||||
|
|
||||||
if (this.status.phase == "connected") {
|
if (this.status.phase == "connected") {
|
||||||
context.menuItems.unshift({
|
context.menuItems.unshift({
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user