From fda4b928d2c628af0fe72bf32046d62158843ff1 Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Tue, 23 May 2023 09:09:13 -0400 Subject: [PATCH] Revert "fix: The command pallet command for navigating to Custom Resource Definitions should navigate to the correct route" This reverts commit 723cfe8ae8fed5c3fdfc98961ec0ab315cefe972. --- .../registered-commands/internal-commands.injectable.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/core/src/renderer/components/command-palette/registered-commands/internal-commands.injectable.tsx b/packages/core/src/renderer/components/command-palette/registered-commands/internal-commands.injectable.tsx index 62c37477b4..e160e1b49c 100644 --- a/packages/core/src/renderer/components/command-palette/registered-commands/internal-commands.injectable.tsx +++ b/packages/core/src/renderer/components/command-palette/registered-commands/internal-commands.injectable.tsx @@ -34,13 +34,13 @@ import navigateToDaemonsetsInjectable from "../../../../common/front-end-routing import navigateToStatefulsetsInjectable from "../../../../common/front-end-routing/routes/cluster/workloads/statefulsets/navigate-to-statefulsets.injectable"; import navigateToJobsInjectable from "../../../../common/front-end-routing/routes/cluster/workloads/jobs/navigate-to-jobs.injectable"; import navigateToCronJobsInjectable from "../../../../common/front-end-routing/routes/cluster/workloads/cron-jobs/navigate-to-cron-jobs.injectable"; +import navigateToCustomResourcesInjectable from "../../../../common/front-end-routing/routes/cluster/custom-resources/navigate-to-custom-resources.injectable"; import navigateToEntitySettingsInjectable from "../../../../common/front-end-routing/routes/entity-settings/navigate-to-entity-settings.injectable"; // TODO: Importing from features is not OK. Make commands to comply with Open Closed Principle to allow moving implementation under a feature import navigateToPreferencesInjectable from "../../../../features/preferences/common/navigate-to-preferences.injectable"; import type { HasCatalogEntitySettingItems } from "../../entity-settings/has-settings.injectable"; import hasCatalogEntitySettingItemsInjectable from "../../entity-settings/has-settings.injectable"; -import navigateToCustomResourceDefinitionsInjectable from "../../../../common/front-end-routing/routes/cluster/custom-resources/navigate-to-custom-resource-definitions.injectable"; export function isKubernetesClusterActive(context: CommandContext): boolean { return context.entity?.kind === "KubernetesCluster"; @@ -71,7 +71,7 @@ interface Dependencies { navigateToStatefulsets: () => void; navigateToJobs: () => void; navigateToCronJobs: () => void; - navigateToCustomResourceDefinitions: () => void; + navigateToCustomResources: () => void; navigateToEntitySettings: (entityId: string) => void; } @@ -206,7 +206,7 @@ function getInternalCommands(dependencies: Dependencies): CommandRegistration[] id: "cluster.viewCustomResourceDefinitions", title: "Cluster: View Custom Resource Definitions", isActive: isKubernetesClusterActive, - action: () => dependencies.navigateToCustomResourceDefinitions(), + action: () => dependencies.navigateToCustomResources(), }, { id: "entity.viewSettings", @@ -278,7 +278,7 @@ const internalCommandsInjectable = getInjectable({ navigateToStatefulsets: di.inject(navigateToStatefulsetsInjectable), navigateToJobs: di.inject(navigateToJobsInjectable), navigateToCronJobs: di.inject(navigateToCronJobsInjectable), - navigateToCustomResourceDefinitions: di.inject(navigateToCustomResourceDefinitionsInjectable), + navigateToCustomResources: di.inject(navigateToCustomResourcesInjectable), navigateToEntitySettings: di.inject(navigateToEntitySettingsInjectable), }), });