mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
* Fix shouldShowResource when not a cluster admin Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix only tests that rely on bad formatting of resources Signed-off-by: Sebastian Malton <sebastian@malton.name> Signed-off-by: Sebastian Malton <sebastian@malton.name>
25 lines
752 B
TypeScript
25 lines
752 B
TypeScript
/**
|
|
* 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 { shouldShowResourceInjectionToken } from "../../../../cluster-store/allowed-resources-injection-token";
|
|
import { frontEndRouteInjectionToken } from "../../../front-end-route-injection-token";
|
|
|
|
const eventsRouteInjectable = getInjectable({
|
|
id: "events-route",
|
|
|
|
instantiate: (di) => ({
|
|
path: "/events",
|
|
clusterFrame: true,
|
|
isEnabled: di.inject(shouldShowResourceInjectionToken, {
|
|
apiName: "events",
|
|
group: "",
|
|
}),
|
|
}),
|
|
|
|
injectionToken: frontEndRouteInjectionToken,
|
|
});
|
|
|
|
export default eventsRouteInjectable;
|