From c7e5e530b5ce8f3dc8152ee677833350a2641ec7 Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Mon, 18 Oct 2021 10:09:52 -0400 Subject: [PATCH] Revert adding /cluster prefix, change settings navigation call Signed-off-by: Sebastian Malton --- integration/__tests__/cluster-pages.tests.ts | 82 +++++++++---------- .../catalog-entities/kubernetes-cluster.ts | 8 +- src/common/routes/apps.ts | 2 +- src/common/routes/cluster-view.ts | 2 +- src/common/routes/cluster.ts | 2 +- src/common/routes/config-maps.ts | 2 +- src/common/routes/crd.ts | 2 +- src/common/routes/endpoints.ts | 2 +- src/common/routes/events.ts | 2 +- src/common/routes/hpa.ts | 2 +- src/common/routes/ingresses.ts | 2 +- src/common/routes/limit-ranges.ts | 2 +- src/common/routes/namespaces.ts | 2 +- src/common/routes/network-policies.ts | 2 +- src/common/routes/nodes.ts | 2 +- src/common/routes/pod-disruption-budgets.ts | 2 +- src/common/routes/port-forwards.ts | 2 +- src/common/routes/resource-quotas.ts | 2 +- src/common/routes/secrets.ts | 2 +- src/common/routes/services.ts | 2 +- src/common/routes/storage-classes.ts | 2 +- src/common/routes/user-management.ts | 12 +-- src/common/routes/volume-claims.ts | 2 +- src/common/routes/volumes.ts | 2 +- src/common/routes/workloads.ts | 16 ++-- src/renderer/components/app.tsx | 1 - src/renderer/components/layout/sidebar.tsx | 12 +-- 27 files changed, 83 insertions(+), 90 deletions(-) diff --git a/integration/__tests__/cluster-pages.tests.ts b/integration/__tests__/cluster-pages.tests.ts index 4d6bb7e924..bd31a80102 100644 --- a/integration/__tests__/cluster-pages.tests.ts +++ b/integration/__tests__/cluster-pages.tests.ts @@ -73,7 +73,7 @@ function isTopPageTest(test: CommonPageTest): test is TopPageTest { const commonPageTests: CommonPageTest[] = [{ page: { name: "Cluster", - href: "/cluster/overview", + href: "/overview", expectedSelector: "div.ClusterOverview div.label", expectedText: "CPU" } @@ -81,7 +81,7 @@ const commonPageTests: CommonPageTest[] = [{ { page: { name: "Nodes", - href: "/cluster/nodes", + href: "/nodes", expectedSelector: "h5.title", expectedText: "Nodes" } @@ -91,49 +91,49 @@ const commonPageTests: CommonPageTest[] = [{ pages: [ { name: "Overview", - href: "/cluster/workloads", + href: "/workloads", expectedSelector: "h5.box", expectedText: "Overview" }, { name: "Pods", - href: "/cluster/pods", + href: "/pods", expectedSelector: "h5.title", expectedText: "Pods" }, { name: "Deployments", - href: "/cluster/deployments", + href: "/deployments", expectedSelector: "h5.title", expectedText: "Deployments" }, { name: "DaemonSets", - href: "/cluster/daemonsets", + href: "/daemonsets", expectedSelector: "h5.title", expectedText: "Daemon Sets" }, { name: "StatefulSets", - href: "/cluster/statefulsets", + href: "/statefulsets", expectedSelector: "h5.title", expectedText: "Stateful Sets" }, { name: "ReplicaSets", - href: "/cluster/replicasets", + href: "/replicasets", expectedSelector: "h5.title", expectedText: "Replica Sets" }, { name: "Jobs", - href: "/cluster/jobs", + href: "/jobs", expectedSelector: "h5.title", expectedText: "Jobs" }, { name: "CronJobs", - href: "/cluster/cronjobs", + href: "/cronjobs", expectedSelector: "h5.title", expectedText: "Cron Jobs" }, @@ -144,37 +144,37 @@ const commonPageTests: CommonPageTest[] = [{ pages: [ { name: "ConfigMaps", - href: "/cluster/configmaps", + href: "/configmaps", expectedSelector: "h5.title", expectedText: "Config Maps" }, { name: "Secrets", - href: "/cluster/secrets", + href: "/secrets", expectedSelector: "h5.title", expectedText: "Secrets" }, { name: "Resource Quotas", - href: "/cluster/resourcequotas", + href: "/resourcequotas", expectedSelector: "h5.title", expectedText: "Resource Quotas" }, { name: "Limit Ranges", - href: "/cluster/limitranges", + href: "/limitranges", expectedSelector: "h5.title", expectedText: "Limit Ranges" }, { name: "HPA", - href: "/cluster/hpa", + href: "/hpa", expectedSelector: "h5.title", expectedText: "Horizontal Pod Autoscalers" }, { name: "Pod Disruption Budgets", - href: "/cluster/poddisruptionbudgets", + href: "/poddisruptionbudgets", expectedSelector: "h5.title", expectedText: "Pod Disruption Budgets" }, @@ -185,25 +185,25 @@ const commonPageTests: CommonPageTest[] = [{ pages: [ { name: "Services", - href: "/cluster/services", + href: "/services", expectedSelector: "h5.title", expectedText: "Services" }, { name: "Endpoints", - href: "/cluster/endpoints", + href: "/endpoints", expectedSelector: "h5.title", expectedText: "Endpoints" }, { name: "Ingresses", - href: "/cluster/ingresses", + href: "/ingresses", expectedSelector: "h5.title", expectedText: "Ingresses" }, { name: "Network Policies", - href: "/cluster/network-policies", + href: "/network-policies", expectedSelector: "h5.title", expectedText: "Network Policies" }, @@ -214,19 +214,19 @@ const commonPageTests: CommonPageTest[] = [{ pages: [ { name: "Persistent Volume Claims", - href: "/cluster/persistent-volume-claims", + href: "/persistent-volume-claims", expectedSelector: "h5.title", expectedText: "Persistent Volume Claims" }, { name: "Persistent Volumes", - href: "/cluster/persistent-volumes", + href: "/persistent-volumes", expectedSelector: "h5.title", expectedText: "Persistent Volumes" }, { name: "Storage Classes", - href: "/cluster/storage-classes", + href: "/storage-classes", expectedSelector: "h5.title", expectedText: "Storage Classes" }, @@ -235,7 +235,7 @@ const commonPageTests: CommonPageTest[] = [{ { page: { name: "Namespaces", - href: "/cluster/namespaces", + href: "/namespaces", expectedSelector: "h5.title", expectedText: "Namespaces" } @@ -243,7 +243,7 @@ const commonPageTests: CommonPageTest[] = [{ { page: { name: "Events", - href: "/cluster/events", + href: "/events", expectedSelector: "h5.title", expectedText: "Events" } @@ -253,12 +253,12 @@ const commonPageTests: CommonPageTest[] = [{ pages: [ { name: "Charts", - href: "/cluster/apps/charts", + href: "/apps/charts", expectedSelector: "div.HelmCharts input", }, { name: "Releases", - href: "/cluster/apps/releases", + href: "/apps/releases", expectedSelector: "h5.title", expectedText: "Releases" }, @@ -269,37 +269,37 @@ const commonPageTests: CommonPageTest[] = [{ pages: [ { name: "Service Accounts", - href: "/cluster/service-accounts", + href: "/service-accounts", expectedSelector: "h5.title", expectedText: "Service Accounts" }, { name: "Roles", - href: "/cluster/roles", + href: "/roles", expectedSelector: "h5.title", expectedText: "Roles" }, { name: "Cluster Roles", - href: "/cluster/cluster-roles", + href: "/cluster-roles", expectedSelector: "h5.title", expectedText: "Cluster Roles" }, { name: "Role Bindings", - href: "/cluster/role-bindings", + href: "/role-bindings", expectedSelector: "h5.title", expectedText: "Role Bindings" }, { name: "Cluster Role Bindings", - href: "/cluster/cluster-role-bindings", + href: "/cluster-role-bindings", expectedSelector: "h5.title", expectedText: "Cluster Role Bindings" }, { name: "Pod Security Policies", - href: "/cluster/pod-security-policies", + href: "/pod-security-policies", expectedSelector: "h5.title", expectedText: "Pod Security Policies" }, @@ -310,7 +310,7 @@ const commonPageTests: CommonPageTest[] = [{ pages: [ { name: "Definitions", - href: "/cluster/crd/definitions", + href: "/crd/definitions", expectedSelector: "h5.title", expectedText: "Custom Resources" }, @@ -363,8 +363,8 @@ utils.describeIf(minikubeReady(TEST_NAMESPACE))("Minikube based tests", () => { }, 10*60*1000); it("show logs and highlight the log search entries", async () => { - await frame.click(`a[href="/cluster/workloads"]`); - await frame.click(`a[href="/cluster/pods"]`); + await frame.click(`a[href="/workloads"]`); + await frame.click(`a[href="/pods"]`); const namespacesSelector = await frame.waitForSelector(".NamespaceSelect"); @@ -401,13 +401,13 @@ utils.describeIf(minikubeReady(TEST_NAMESPACE))("Minikube based tests", () => { }, 10*60*1000); it("should show the default namespaces", async () => { - await frame.click('a[href="/cluster/namespaces"]'); + await frame.click('a[href="/namespaces"]'); await frame.waitForSelector("div.TableCell >> text='default'"); await frame.waitForSelector("div.TableCell >> text='kube-system'"); }, 10*60*1000); it(`should create the ${TEST_NAMESPACE} and a pod in the namespace`, async () => { - await frame.click('a[href="/cluster/namespaces"]'); + await frame.click('a[href="/namespaces"]'); await frame.click("button.add-button"); await frame.waitForSelector("div.AddNamespaceDialog >> text='Create Namespace'"); @@ -418,11 +418,11 @@ utils.describeIf(minikubeReady(TEST_NAMESPACE))("Minikube based tests", () => { await frame.waitForSelector(`div.TableCell >> text=${TEST_NAMESPACE}`); - if ((await frame.innerText(`a[href^="/cluster/workloads"] .expand-icon`)) === "keyboard_arrow_down") { - await frame.click(`a[href^="/cluster/workloads"]`); + if ((await frame.innerText(`a[href^="/workloads"] .expand-icon`)) === "keyboard_arrow_down") { + await frame.click(`a[href^="/workloads"]`); } - await frame.click(`a[href^="/cluster/pods"]`); + await frame.click(`a[href^="/pods"]`); const namespacesSelector = await frame.waitForSelector(".NamespaceSelect"); diff --git a/src/common/catalog-entities/kubernetes-cluster.ts b/src/common/catalog-entities/kubernetes-cluster.ts index 3335d3803d..50c1ec656d 100644 --- a/src/common/catalog-entities/kubernetes-cluster.ts +++ b/src/common/catalog-entities/kubernetes-cluster.ts @@ -23,10 +23,11 @@ import { catalogCategoryRegistry } from "../catalog/catalog-category-registry"; import { CatalogEntity, CatalogEntityActionContext, CatalogEntityContextMenuContext, CatalogEntityMetadata, CatalogEntityStatus } from "../catalog"; import { clusterActivateHandler, clusterDisconnectHandler } from "../cluster-ipc"; import { ClusterStore } from "../cluster-store"; -import { requestMain } from "../ipc"; +import { broadcastMessage, requestMain } from "../ipc"; import { CatalogCategory, CatalogCategorySpec } from "../catalog"; import { app } from "electron"; import type { CatalogEntitySpec } from "../catalog/catalog-entity"; +import { IpcRendererNavigationEvents } from "../../renderer/navigation/events"; export interface KubernetesClusterPrometheusMetrics { address?: { @@ -105,7 +106,10 @@ export class KubernetesCluster extends CatalogEntity context.navigate(`/entity/${this.metadata.uid}/settings`) + onClick: () => broadcastMessage( + IpcRendererNavigationEvents.NAVIGATE_IN_APP, + `/entity/${this.metadata.uid}/settings`, + ), }); } diff --git a/src/common/routes/apps.ts b/src/common/routes/apps.ts index 3e54a73a15..72a92616dc 100644 --- a/src/common/routes/apps.ts +++ b/src/common/routes/apps.ts @@ -23,7 +23,7 @@ import type { RouteProps } from "react-router"; import { buildURL } from "../utils/buildUrl"; export const appsRoute: RouteProps = { - path: "/cluster/apps", + path: "/apps", }; export const appsURL = buildURL(appsRoute.path); diff --git a/src/common/routes/cluster-view.ts b/src/common/routes/cluster-view.ts index 66b9c63d60..78b15c0a18 100644 --- a/src/common/routes/cluster-view.ts +++ b/src/common/routes/cluster-view.ts @@ -28,7 +28,7 @@ export interface ClusterViewRouteParams { export const clusterViewRoute: RouteProps = { exact: true, - path: "/cluster/:clusterId", + path: "/:clusterId", }; export const clusterViewURL = buildURL(clusterViewRoute.path); diff --git a/src/common/routes/cluster.ts b/src/common/routes/cluster.ts index cfc714950f..2ba39ae53f 100644 --- a/src/common/routes/cluster.ts +++ b/src/common/routes/cluster.ts @@ -23,7 +23,7 @@ import type { RouteProps } from "react-router"; import { buildURL } from "../utils/buildUrl"; export const clusterRoute: RouteProps = { - path: "/cluster/overview" + path: "/overview" }; export const clusterURL = buildURL(clusterRoute.path); diff --git a/src/common/routes/config-maps.ts b/src/common/routes/config-maps.ts index 1931ac361c..99aeaaf553 100644 --- a/src/common/routes/config-maps.ts +++ b/src/common/routes/config-maps.ts @@ -23,7 +23,7 @@ import type { RouteProps } from "react-router"; import { buildURL } from "../utils/buildUrl"; export const configMapsRoute: RouteProps = { - path: "/cluster/configmaps" + path: "/configmaps" }; export interface ConfigMapsRouteParams { diff --git a/src/common/routes/crd.ts b/src/common/routes/crd.ts index 01c338c8c3..1a70fac875 100644 --- a/src/common/routes/crd.ts +++ b/src/common/routes/crd.ts @@ -23,7 +23,7 @@ import type { RouteProps } from "react-router"; import { buildURL } from "../utils/buildUrl"; export const crdRoute: RouteProps = { - path: "/cluster/crd" + path: "/crd" }; export const crdDefinitionsRoute: RouteProps = { diff --git a/src/common/routes/endpoints.ts b/src/common/routes/endpoints.ts index ec4dc88a76..db09de66a0 100644 --- a/src/common/routes/endpoints.ts +++ b/src/common/routes/endpoints.ts @@ -23,7 +23,7 @@ import type { RouteProps } from "react-router"; import { buildURL } from "../utils/buildUrl"; export const endpointRoute: RouteProps = { - path: "/cluster/endpoints" + path: "/endpoints" }; export interface EndpointRouteParams { diff --git a/src/common/routes/events.ts b/src/common/routes/events.ts index dea2c18223..73995ce6b0 100644 --- a/src/common/routes/events.ts +++ b/src/common/routes/events.ts @@ -23,7 +23,7 @@ import type { RouteProps } from "react-router"; import { buildURL } from "../utils/buildUrl"; export const eventRoute: RouteProps = { - path: "/cluster/events" + path: "/events" }; export const eventsURL = buildURL(eventRoute.path); diff --git a/src/common/routes/hpa.ts b/src/common/routes/hpa.ts index 8d18a65063..a6f89661c2 100644 --- a/src/common/routes/hpa.ts +++ b/src/common/routes/hpa.ts @@ -23,7 +23,7 @@ import type { RouteProps } from "react-router"; import { buildURL } from "../utils/buildUrl"; export const hpaRoute: RouteProps = { - path: "/cluster/hpa" + path: "/hpa" }; export interface HpaRouteParams { diff --git a/src/common/routes/ingresses.ts b/src/common/routes/ingresses.ts index 83fc03d61e..66c37774d5 100644 --- a/src/common/routes/ingresses.ts +++ b/src/common/routes/ingresses.ts @@ -23,7 +23,7 @@ import type { RouteProps } from "react-router"; import { buildURL } from "../utils/buildUrl"; export const ingressRoute: RouteProps = { - path: "/cluster/ingresses" + path: "/ingresses" }; export interface IngressRouteParams { diff --git a/src/common/routes/limit-ranges.ts b/src/common/routes/limit-ranges.ts index 23cf3481b3..02b9258c67 100644 --- a/src/common/routes/limit-ranges.ts +++ b/src/common/routes/limit-ranges.ts @@ -23,7 +23,7 @@ import type { RouteProps } from "react-router"; import { buildURL } from "../utils/buildUrl"; export const limitRangesRoute: RouteProps = { - path: "/cluster/limitranges" + path: "/limitranges" }; export interface LimitRangeRouteParams { diff --git a/src/common/routes/namespaces.ts b/src/common/routes/namespaces.ts index ba85d162c7..4a23950648 100644 --- a/src/common/routes/namespaces.ts +++ b/src/common/routes/namespaces.ts @@ -23,7 +23,7 @@ import type { RouteProps } from "react-router"; import { buildURL } from "../utils/buildUrl"; export const namespacesRoute: RouteProps = { - path: "/cluster/namespaces" + path: "/namespaces" }; export interface NamespacesRouteParams { diff --git a/src/common/routes/network-policies.ts b/src/common/routes/network-policies.ts index 54a97add6d..b49094a418 100644 --- a/src/common/routes/network-policies.ts +++ b/src/common/routes/network-policies.ts @@ -23,7 +23,7 @@ import type { RouteProps } from "react-router"; import { buildURL } from "../utils/buildUrl"; export const networkPoliciesRoute: RouteProps = { - path: "/cluster/network-policies" + path: "/network-policies" }; export interface NetworkPoliciesRouteParams { diff --git a/src/common/routes/nodes.ts b/src/common/routes/nodes.ts index 5a196131da..bfb6d8ea00 100644 --- a/src/common/routes/nodes.ts +++ b/src/common/routes/nodes.ts @@ -23,7 +23,7 @@ import type { RouteProps } from "react-router"; import { buildURL } from "../utils/buildUrl"; export const nodesRoute: RouteProps = { - path: "/cluster/nodes" + path: "/nodes" }; export interface NodesRouteParams { diff --git a/src/common/routes/pod-disruption-budgets.ts b/src/common/routes/pod-disruption-budgets.ts index f1391cb847..985752746a 100644 --- a/src/common/routes/pod-disruption-budgets.ts +++ b/src/common/routes/pod-disruption-budgets.ts @@ -23,7 +23,7 @@ import type { RouteProps } from "react-router"; import { buildURL } from "../utils/buildUrl"; export const pdbRoute: RouteProps = { - path: "/cluster/poddisruptionbudgets" + path: "/poddisruptionbudgets" }; export interface PodDisruptionBudgetsRouteParams { diff --git a/src/common/routes/port-forwards.ts b/src/common/routes/port-forwards.ts index 317327c688..d05b8583ab 100644 --- a/src/common/routes/port-forwards.ts +++ b/src/common/routes/port-forwards.ts @@ -23,7 +23,7 @@ import type { RouteProps } from "react-router"; import { buildURL } from "../utils/buildUrl"; export const portForwardsRoute: RouteProps = { - path: "/cluster/port-forwards" + path: "/port-forwards" }; export interface PortForwardsRouteParams { diff --git a/src/common/routes/resource-quotas.ts b/src/common/routes/resource-quotas.ts index aac4e18f15..7d8a5163a2 100644 --- a/src/common/routes/resource-quotas.ts +++ b/src/common/routes/resource-quotas.ts @@ -23,7 +23,7 @@ import type { RouteProps } from "react-router"; import { buildURL } from "../utils/buildUrl"; export const resourceQuotaRoute: RouteProps = { - path: "/cluster/resourcequotas" + path: "/resourcequotas" }; export interface ResourceQuotaRouteParams { diff --git a/src/common/routes/secrets.ts b/src/common/routes/secrets.ts index cfaaead75c..10ee187f64 100644 --- a/src/common/routes/secrets.ts +++ b/src/common/routes/secrets.ts @@ -23,7 +23,7 @@ import type { RouteProps } from "react-router"; import { buildURL } from "../utils/buildUrl"; export const secretsRoute: RouteProps = { - path: "/cluster/secrets" + path: "/secrets" }; export interface SecretsRouteParams { diff --git a/src/common/routes/services.ts b/src/common/routes/services.ts index 14c9134a14..b4e3acdad9 100644 --- a/src/common/routes/services.ts +++ b/src/common/routes/services.ts @@ -23,7 +23,7 @@ import type { RouteProps } from "react-router"; import { buildURL } from "../utils/buildUrl"; export const servicesRoute: RouteProps = { - path: "/cluster/services" + path: "/services" }; export interface ServicesRouteParams { diff --git a/src/common/routes/storage-classes.ts b/src/common/routes/storage-classes.ts index d918506b78..1a0128cbf8 100644 --- a/src/common/routes/storage-classes.ts +++ b/src/common/routes/storage-classes.ts @@ -23,7 +23,7 @@ import type { RouteProps } from "react-router"; import { buildURL } from "../utils/buildUrl"; export const storageClassesRoute: RouteProps = { - path: "/cluster/storage-classes" + path: "/storage-classes" }; export interface StorageClassesRouteParams { diff --git a/src/common/routes/user-management.ts b/src/common/routes/user-management.ts index af50217830..97aef36e1f 100644 --- a/src/common/routes/user-management.ts +++ b/src/common/routes/user-management.ts @@ -24,22 +24,22 @@ import { buildURL, URLParams } from "../utils/buildUrl"; // Routes export const serviceAccountsRoute: RouteProps = { - path: "/cluster/service-accounts" + path: "/service-accounts" }; export const podSecurityPoliciesRoute: RouteProps = { - path: "/cluster/pod-security-policies" + path: "/pod-security-policies" }; export const rolesRoute: RouteProps = { - path: "/cluster/roles" + path: "/roles" }; export const clusterRolesRoute: RouteProps = { - path: "/cluster/cluster-roles" + path: "/cluster-roles" }; export const roleBindingsRoute: RouteProps = { - path: "/cluster/role-bindings" + path: "/role-bindings" }; export const clusterRoleBindingsRoute: RouteProps = { - path: "/cluster/cluster-role-bindings" + path: "/cluster-role-bindings" }; export const usersManagementRoute: RouteProps = { diff --git a/src/common/routes/volume-claims.ts b/src/common/routes/volume-claims.ts index 6a784c2807..42171328df 100644 --- a/src/common/routes/volume-claims.ts +++ b/src/common/routes/volume-claims.ts @@ -23,7 +23,7 @@ import type { RouteProps } from "react-router"; import { buildURL } from "../utils/buildUrl"; export const volumeClaimsRoute: RouteProps = { - path: "/cluster/persistent-volume-claims" + path: "/persistent-volume-claims" }; export interface VolumeClaimsRouteParams { diff --git a/src/common/routes/volumes.ts b/src/common/routes/volumes.ts index 171651ba5e..c5a969e988 100644 --- a/src/common/routes/volumes.ts +++ b/src/common/routes/volumes.ts @@ -23,7 +23,7 @@ import type { RouteProps } from "react-router"; import { buildURL } from "../utils/buildUrl"; export const volumesRoute: RouteProps = { - path: "/cluster/persistent-volumes" + path: "/persistent-volumes" }; export interface VolumesRouteParams { diff --git a/src/common/routes/workloads.ts b/src/common/routes/workloads.ts index 169fdd4388..94a9378d02 100644 --- a/src/common/routes/workloads.ts +++ b/src/common/routes/workloads.ts @@ -25,28 +25,28 @@ import type { KubeResource } from "../rbac"; // Routes export const overviewRoute: RouteProps = { - path: "/cluster/workloads" + path: "/workloads" }; export const podsRoute: RouteProps = { - path: "/cluster/pods" + path: "/pods" }; export const deploymentsRoute: RouteProps = { - path: "/cluster/deployments" + path: "/deployments" }; export const daemonSetsRoute: RouteProps = { - path: "/cluster/daemonsets" + path: "/daemonsets" }; export const statefulSetsRoute: RouteProps = { - path: "/cluster/statefulsets" + path: "/statefulsets" }; export const replicaSetsRoute: RouteProps = { - path: "/cluster/replicasets" + path: "/replicasets" }; export const jobsRoute: RouteProps = { - path: "/cluster/jobs" + path: "/jobs" }; export const cronJobsRoute: RouteProps = { - path: "/cluster/cronjobs" + path: "/cronjobs" }; export const workloadsRoute: RouteProps = { diff --git a/src/renderer/components/app.tsx b/src/renderer/components/app.tsx index 470ad8f845..16e783857b 100755 --- a/src/renderer/components/app.tsx +++ b/src/renderer/components/app.tsx @@ -221,7 +221,6 @@ export class App extends React.Component { {this.renderExtensionTabLayoutRoutes()} {this.renderExtensionRoutes()} - diff --git a/src/renderer/components/layout/sidebar.tsx b/src/renderer/components/layout/sidebar.tsx index 53087e9f83..6c91bf41a0 100644 --- a/src/renderer/components/layout/sidebar.tsx +++ b/src/renderer/components/layout/sidebar.tsx @@ -45,8 +45,6 @@ import { HotbarIcon } from "../hotbar/hotbar-icon"; import { makeObservable, observable } from "mobx"; import type { CatalogEntityContextMenuContext } from "../../../common/catalog"; import { HotbarStore } from "../../../common/hotbar-store"; -import { broadcastMessage } from "../../../common/ipc"; -import { IpcRendererNavigationEvents } from "../../navigation/events"; interface Props { className?: string; @@ -57,15 +55,7 @@ export class Sidebar extends React.Component { static displayName = "Sidebar"; @observable private contextMenu: CatalogEntityContextMenuContext = { menuItems: [], - navigate: (pathname: string) => { - if (pathname.startsWith("/cluster/")) { - // assume in-frame navigation - // FIXME: this is not entirely correct because of extension navigation rules - navigate(pathname); - } else { - broadcastMessage(IpcRendererNavigationEvents.NAVIGATE_IN_APP, pathname); - } - }, + navigate, }; constructor(props: Props) {