Remove unnecessary 'onlyVisibleForSource' (#2982)

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-06-09 07:01:26 +03:00
1 parent 6044d08a74
commit 6677e22371
5 files changed
+17 -24

No files matched your search

@@ -101,20 +101,18 @@ export class KubernetesCluster extends CatalogEntity<CatalogEntityMetadata, Kube
}
async onContextMenuOpen(context: CatalogEntityContextMenuContext) {
context.menuItems = [
{
if (!this.metadata.source || this.metadata.source === "local") {
context.menuItems.push({
title: "Settings",
icon: "edit",
onlyVisibleForSource: "local",
onClick: async () => context.navigate(`/entity/${this.metadata.uid}/settings`)
},
];
});
}
if (this.metadata.labels["file"]?.startsWith(ClusterStore.storedKubeConfigFolder)) {
context.menuItems.push({
title: "Delete",
icon: "delete",
onlyVisibleForSource: "local",
onClick: async () => ClusterStore.getInstance().removeById(this.metadata.uid),
confirm: {
message: `Remove Kubernetes Cluster "${this.metadata.name} from ${productName}?`
-4
View File
@@ -104,10 +104,6 @@ export interface CatalogEntityContextMenu {
* Menu icon
*/
icon?: string;
/**
* Show only if empty or if value matches with entity.metadata.source
*/
onlyVisibleForSource?: string;
/**
* OnClick handler
*/