mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Adding routes and navigate-to injectables
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
704a642276
commit
34f7b2f6b1
@ -0,0 +1,26 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
|
*/
|
||||||
|
import {
|
||||||
|
shouldShowResourceInjectionToken,
|
||||||
|
} from "../../../../../../features/cluster/showing-kube-resources/common/allowed-resources-injection-token";
|
||||||
|
import { frontEndRouteInjectionToken } from "../../../../front-end-route-injection-token";
|
||||||
|
import { getInjectable } from "@ogre-tools/injectable";
|
||||||
|
|
||||||
|
const mutatingWebhookConfigurationsRouteInjectable = getInjectable({
|
||||||
|
id: "mutatingwebhookconfigurations",
|
||||||
|
|
||||||
|
instantiate: (di) => ({
|
||||||
|
path: "/mutatingwebhookconfigurations",
|
||||||
|
clusterFrame: true,
|
||||||
|
isEnabled: di.inject(shouldShowResourceInjectionToken, {
|
||||||
|
apiName: "mutatingwebhookconfigurations",
|
||||||
|
group: "admissionregistration.k8s.io",
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
|
||||||
|
injectionToken: frontEndRouteInjectionToken,
|
||||||
|
});
|
||||||
|
|
||||||
|
export default mutatingWebhookConfigurationsRouteInjectable;
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
|
*/
|
||||||
|
import { getInjectable } from "@ogre-tools/injectable";
|
||||||
|
import mutatingWebhookConfigurationsRouteInjectable from "./mutating-webhook-configurations-route.injectable";
|
||||||
|
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
|
||||||
|
|
||||||
|
const navigateToMutatingWebhookConfigurationsInjectable = getInjectable({
|
||||||
|
id: "navigate-to-mutating-webhook-configurations",
|
||||||
|
|
||||||
|
instantiate: (di) => {
|
||||||
|
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
|
||||||
|
const route = di.inject(mutatingWebhookConfigurationsRouteInjectable);
|
||||||
|
|
||||||
|
return () => navigateToRoute(route);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
export default navigateToMutatingWebhookConfigurationsInjectable;
|
||||||
Loading…
Reference in New Issue
Block a user