mirror of
https://github.com/lensapp/lens.git
synced 2024-11-28 11:53:41 +03:00
fix: Custom Resource Definitions sidebar item should navigate to the correct route
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
a8ff6ce095
commit
897e289514
@ -6,8 +6,8 @@ import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { navigateToRouteInjectionToken } from "../../../navigate-to-route-injection-token";
|
||||
import crdListRouteInjectable from "./custom-resource-definitions.injectable";
|
||||
|
||||
const navigateToCrdListInjectable = getInjectable({
|
||||
id: "navigate-to-crd-list",
|
||||
const navigateToCustomResourceDefinitionsInjectable = getInjectable({
|
||||
id: "navigate-to-custom-resource-definitions",
|
||||
|
||||
instantiate: (di) => {
|
||||
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
|
||||
@ -17,4 +17,4 @@ const navigateToCrdListInjectable = getInjectable({
|
||||
},
|
||||
});
|
||||
|
||||
export default navigateToCrdListInjectable;
|
||||
export default navigateToCustomResourceDefinitionsInjectable;
|
||||
|
@ -5,7 +5,7 @@
|
||||
import { sidebarItemInjectionToken } from "@k8slens/cluster-sidebar";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import customResourceDefinitionsRouteInjectable from "../../../common/front-end-routing/routes/cluster/custom-resources/custom-resource-definitions.injectable";
|
||||
import navigateToCustomResourcesInjectable from "../../../common/front-end-routing/routes/cluster/custom-resources/navigate-to-custom-resources.injectable";
|
||||
import navigateToCustomResourceDefinitionsInjectable from "../../../common/front-end-routing/routes/cluster/custom-resources/navigate-to-custom-resource-definitions.injectable";
|
||||
import routeIsActiveInjectable from "../../routes/route-is-active.injectable";
|
||||
import customResourcesSidebarItemInjectable from "./custom-resources-sidebar-item.injectable";
|
||||
|
||||
@ -17,7 +17,7 @@ const customResourceDefinitionsSidebarItemInjectable = getInjectable({
|
||||
return {
|
||||
parentId: customResourcesSidebarItemInjectable.id,
|
||||
title: "Definitions",
|
||||
onClick: di.inject(navigateToCustomResourcesInjectable),
|
||||
onClick: di.inject(navigateToCustomResourceDefinitionsInjectable),
|
||||
isActive: di.inject(routeIsActiveInjectable, customResourceDefinitionsRoute),
|
||||
isVisible: customResourceDefinitionsRoute.isEnabled,
|
||||
orderNumber: 0,
|
||||
|
Loading…
Reference in New Issue
Block a user