Restructure to monorepo (#6907)

* wip: restructure to monorepo

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* refactor create-release-pr to a package

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* build fixes

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* github workflow fixes

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* fix typo

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* add webpack-env types to core

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* fix github workflows

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* refactor/fix integration tests

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* lint fix

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* yarn run dev

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* eslint settings for vscode

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* move templates to right package

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* open-lens build fixes

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* integration test fix

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* fix nx task dependencies

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* use bash shell for unit tests in test workflow

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* fix test:unit for windows

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* fix win-ca webpack error in open-lens

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* fix win-ca webpack error in open-lens

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* fix build:app on windows

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* remove ELECTRON_BUILDER_EXTRA_ARGS

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* sync src/ from master

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* remove Makefile from core

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen authored and GitHub committed 2023-01-24 10:46:26 -08:00
1 parent 0066ca4ea2
commit 2657df2293
3321 files changed
+28699 -11447

No files matched your search

@@ -0,0 +1,12 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { IpcRendererNavigationEvents } from "../ipc/navigation-events";
import type { MessageChannel } from "../utils/channel/message-channel-listener-injection-token";
export type AppNavigationChannel = MessageChannel<string>;
export const appNavigationChannel: AppNavigationChannel = {
id: IpcRendererNavigationEvents.NAVIGATE_IN_APP,
};
@@ -0,0 +1,12 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { IpcRendererNavigationEvents } from "../ipc/navigation-events";
import type { MessageChannel } from "../utils/channel/message-channel-listener-injection-token";
export type ClusterFrameNavigationChannel = MessageChannel<string>;
export const clusterFrameNavigationChannel: ClusterFrameNavigationChannel = {
id: IpcRendererNavigationEvents.NAVIGATE_IN_CLUSTER,
};
@@ -0,0 +1,20 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectionToken } from "@ogre-tools/injectable";
import type { IComputedValue } from "mobx";
import type { LensRendererExtension } from "../../extensions/lens-renderer-extension";
export const frontEndRouteInjectionToken = getInjectionToken<Route<unknown>>({
id: "front-end-route-injection-token",
});
export interface Route<TParameter = void> {
path: string;
clusterFrame: boolean;
isEnabled: IComputedValue<boolean>;
extension?: LensRendererExtension;
readonly parameterSignature?: TParameter;
}
@@ -0,0 +1,13 @@
/**
* 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 navigateToCatalogInjectable from "./routes/catalog/navigate-to-catalog.injectable";
const navigateToFrontPageInjectable = getInjectable({
id: "navigate-to-front-page",
instantiate: (di) => di.inject(navigateToCatalogInjectable),
});
export default navigateToFrontPageInjectable;
@@ -0,0 +1,52 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectionToken } from "@ogre-tools/injectable";
import type { Route } from "./front-end-route-injection-token";
type InferParametersFrom<TRoute> = TRoute extends Route<infer TParameters>
? TParameters
: never;
type RequiredKeys<T> = Exclude<
{
[K in keyof T]: T extends Record<K, T[K]> ? K : never;
}[keyof T],
undefined
>;
type ObjectContainingNoRequired<T> = T extends void
? never
: RequiredKeys<T> extends []
? any
: never;
type ObjectContainsNoRequired<T> = T extends ObjectContainingNoRequired<T>
? true
: false;
// TODO: Missing types for:
// - Navigating to route without parameters, with parameters
// - Navigating to route with required parameters, without parameters
type Parameters<TParameters> = TParameters extends void
? {}
: ObjectContainsNoRequired<TParameters> extends true
? { parameters?: TParameters }
: { parameters: TParameters };
export type NavigateToRouteOptions<TRoute> = Parameters<
InferParametersFrom<TRoute>
> & {
query?: Record<string, string>;
fragment?: string;
withoutAffectingBackButton?: boolean;
};
export type NavigateToRoute = <TRoute extends Route<unknown>>(
route: TRoute,
options?: NavigateToRouteOptions<TRoute>) => void;
export const navigateToRouteInjectionToken = getInjectionToken<NavigateToRoute>(
{ id: "navigate-to-route-injection-token" },
);
@@ -0,0 +1,16 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectionToken } from "@ogre-tools/injectable";
export interface NavigateToUrlOptions {
withoutAffectingBackButton?: boolean;
forceRootFrame?: boolean;
}
export type NavigateToUrl = (url: string, options?: NavigateToUrlOptions) => void;
export const navigateToUrlInjectionToken = getInjectionToken<NavigateToUrl>(
{ id: "navigate-to-url-injection-token" },
);
@@ -0,0 +1,21 @@
/**
* 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 { computed } from "mobx";
import { frontEndRouteInjectionToken } from "../../front-end-route-injection-token";
const addClusterRouteInjectable = getInjectable({
id: "add-cluster-route",
instantiate: () => ({
path: "/add-cluster",
clusterFrame: false,
isEnabled: computed(() => true),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default addClusterRouteInjectable;
@@ -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 addClusterRouteInjectable from "./add-cluster-route.injectable";
import { navigateToRouteInjectionToken } from "../../navigate-to-route-injection-token";
const navigateToAddClusterInjectable = getInjectable({
id: "navigate-to-add-cluster",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(addClusterRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToAddClusterInjectable;
@@ -0,0 +1,27 @@
/**
* 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 { computed } from "mobx";
import type { Route } from "../../front-end-route-injection-token";
import { frontEndRouteInjectionToken } from "../../front-end-route-injection-token";
export interface CatalogPathParameters {
group?: string;
kind?: string;
}
const catalogRouteInjectable = getInjectable({
id: "catalog-route",
instantiate: (): Route<CatalogPathParameters> => ({
path: "/catalog/:group?/:kind?",
clusterFrame: false,
isEnabled: computed(() => true),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default catalogRouteInjectable;
@@ -0,0 +1,26 @@
/**
* 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 type { CatalogPathParameters } from "./catalog-route.injectable";
import catalogRouteInjectable from "./catalog-route.injectable";
import { navigateToRouteInjectionToken } from "../../navigate-to-route-injection-token";
export type NavigateToCatalog = (parameters?: CatalogPathParameters) => void;
const navigateToCatalogInjectable = getInjectable({
id: "navigate-to-catalog",
instantiate: (di): NavigateToCatalog => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const catalogRoute = di.inject(catalogRouteInjectable);
return (parameters) =>
navigateToRoute(catalogRoute, {
parameters,
});
},
});
export default navigateToCatalogInjectable;
@@ -0,0 +1,21 @@
/**
* 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 { computed } from "mobx";
import { frontEndRouteInjectionToken } from "../../front-end-route-injection-token";
const clusterViewRouteInjectable = getInjectable({
id: "cluster-view-route",
instantiate: () => ({
path: "/cluster/:clusterId",
clusterFrame: false,
isEnabled: computed(() => true),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default clusterViewRouteInjectable;
@@ -0,0 +1,23 @@
/**
* 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 { navigateToRouteInjectionToken } from "../../navigate-to-route-injection-token";
import clusterViewRouteInjectable from "./cluster-view-route.injectable";
export type NavigateToClusterView = (clusterId: string) => void;
const navigateToClusterViewInjectable = getInjectable({
id: "navigate-to-cluster-view",
instantiate: (di): NavigateToClusterView => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(clusterViewRouteInjectable);
return (clusterId) =>
navigateToRoute(route, { parameters: { clusterId }});
},
});
export default navigateToClusterViewInjectable;
@@ -0,0 +1,22 @@
/**
* 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 configMapsRouteInjectable = getInjectable({
id: "config-maps-route",
instantiate: (di) => ({
path: "/configmaps",
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "configmaps",
group: "",
}),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default configMapsRouteInjectable;
@@ -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 configMapsRouteInjectable from "./config-maps-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
const navigateToConfigMapsInjectable = getInjectable({
id: "navigate-to-config-maps",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(configMapsRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToConfigMapsInjectable;
@@ -0,0 +1,24 @@
/**
* 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 horizontalPodAutoscalersRouteInjectable = getInjectable({
id: "horizontal-pod-autoscalers-route",
instantiate: (di) => ({
path: "/hpa",
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "horizontalpodautoscalers",
group: "autoscaling",
}),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default horizontalPodAutoscalersRouteInjectable;
@@ -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 horizontalPodAutoscalersRouteInjectable from "./horizontal-pod-autoscalers-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
const navigateToHorizontalPodAutoscalersInjectable = getInjectable({
id: "navigate-to-horizontal-pod-autoscalers",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(horizontalPodAutoscalersRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToHorizontalPodAutoscalersInjectable;
@@ -0,0 +1,24 @@
/**
* 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 leasesRouteInjectable = getInjectable({
id: "leases",
instantiate: (di) => ({
path: "/leases",
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "leases",
group: "coordination.k8s.io",
}),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default leasesRouteInjectable;
@@ -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 leasesRouteInjectable from "./leases-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
const navigateToLeasesInjectable = getInjectable({
id: "navigate-to-leases",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(leasesRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToLeasesInjectable;
@@ -0,0 +1,24 @@
/**
* 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 limitRangesRouteInjectable = getInjectable({
id: "limit-ranges-route",
instantiate: (di) => ({
path: "/limitranges",
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "limitranges",
group: "",
}),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default limitRangesRouteInjectable;
@@ -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 limitRangesRouteInjectable from "./limit-ranges-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
const navigateToLimitRangesInjectable = getInjectable({
id: "navigate-to-limit-ranges",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(limitRangesRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToLimitRangesInjectable;
@@ -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 podDisruptionBudgetsRouteInjectable from "./pod-disruption-budgets-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
const navigateToPodDisruptionBudgetsInjectable = getInjectable({
id: "navigate-to-pod-disruption-budgets",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(podDisruptionBudgetsRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToPodDisruptionBudgetsInjectable;
@@ -0,0 +1,24 @@
/**
* 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 podDisruptionBudgetsRouteInjectable = getInjectable({
id: "pod-disruption-budgets-route",
instantiate: (di) => ({
path: "/poddisruptionbudgets",
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "poddisruptionbudgets",
group: "policy",
}),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default podDisruptionBudgetsRouteInjectable;
@@ -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 priorityClassesRouteInjectable from "./priority-classes-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
const navigateToPriorityClassesInjectable = getInjectable({
id: "navigate-to-priority-classes",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(priorityClassesRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToPriorityClassesInjectable;
@@ -0,0 +1,24 @@
/**
* 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 priorityClassesRouteInjectable = getInjectable({
id: "priority-classes-route",
instantiate: (di) => ({
path: "/priorityclasses",
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "priorityclasses",
group: "scheduling.k8s.io",
}),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default priorityClassesRouteInjectable;
@@ -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 resourceQuotasRouteInjectable from "./resource-quotas-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
const navigateToResourceQuotasInjectable = getInjectable({
id: "navigate-to-resource-quotas",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(resourceQuotasRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToResourceQuotasInjectable;
@@ -0,0 +1,24 @@
/**
* 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 resourceQuotasRouteInjectable = getInjectable({
id: "resource-quotas-route",
instantiate: (di) => ({
path: "/resourcequotas",
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "resourcequotas",
group: "",
}),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default resourceQuotasRouteInjectable;
@@ -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 runtimeClassesRouteInjectable from "./runtime-classes-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
const navigateToRuntimeClassesInjectable = getInjectable({
id: "navigate-to-runtime-classes",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(runtimeClassesRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToRuntimeClassesInjectable;
@@ -0,0 +1,24 @@
/**
* 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 runtimeClassesRouteInjectable = getInjectable({
id: "runtime-classes-route",
instantiate: (di) => ({
path: "/runtimeclasses",
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "runtimeclasses",
group: "node.k8s.io",
}),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default runtimeClassesRouteInjectable;
@@ -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 secretsRouteInjectable from "./secrets-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
const navigateToSecretsInjectable = getInjectable({
id: "navigate-to-secrets",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(secretsRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToSecretsInjectable;
@@ -0,0 +1,24 @@
/**
* 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 secretsRouteInjectable = getInjectable({
id: "secrets-route",
instantiate: (di) => ({
path: "/secrets",
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "secrets",
group: "",
}),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default secretsRouteInjectable;
@@ -0,0 +1,21 @@
/**
* 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 { computed } from "mobx";
import { frontEndRouteInjectionToken } from "../../../../front-end-route-injection-token";
const crdListRouteInjectable = getInjectable({
id: "crd-list-route",
instantiate: () => ({
path: "/crd/definitions",
clusterFrame: true,
isEnabled: computed(() => true),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default crdListRouteInjectable;
@@ -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 crdListRouteInjectable from "./crd-list-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
const navigateToCrdListInjectable = getInjectable({
id: "navigate-to-crd-list",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(crdListRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToCrdListInjectable;
@@ -0,0 +1,27 @@
/**
* 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 { computed } from "mobx";
import type { Route } from "../../../../front-end-route-injection-token";
import { frontEndRouteInjectionToken } from "../../../../front-end-route-injection-token";
export interface CustomResourcesPathParameters {
group?: string;
name?: string;
}
const customResourcesRouteInjectable = getInjectable({
id: "custom-resources-route",
instantiate: (): Route<CustomResourcesPathParameters> => ({
path: "/crd/:group?/:name?",
clusterFrame: true,
isEnabled: computed(() => true),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default customResourcesRouteInjectable;
@@ -0,0 +1,22 @@
/**
* 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 type { CustomResourcesPathParameters } from "./custom-resources-route.injectable";
import customResourcesRouteInjectable from "./custom-resources-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
const navigateToCustomResourcesInjectable = getInjectable({
id: "navigate-to-custom-resources",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(customResourcesRouteInjectable);
return (parameters?: CustomResourcesPathParameters) =>
navigateToRoute(route, { parameters });
},
});
export default navigateToCustomResourcesInjectable;
@@ -0,0 +1,24 @@
/**
* 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;
@@ -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 eventsRouteInjectable from "./events-route.injectable";
import { navigateToRouteInjectionToken } from "../../../navigate-to-route-injection-token";
const navigateToEventsInjectable = getInjectable({
id: "navigate-to-events",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(eventsRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToEventsInjectable;
@@ -0,0 +1,27 @@
/**
* 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 { computed } from "mobx";
import type { Route } from "../../../../front-end-route-injection-token";
import { frontEndRouteInjectionToken } from "../../../../front-end-route-injection-token";
export interface HelmChartsPathParameters {
repo?: string;
chartName?: string;
}
const helmChartsRouteInjectable = getInjectable({
id: "helm-charts-route",
instantiate: (): Route<HelmChartsPathParameters> => ({
path: "/helm/charts/:repo?/:chartName?",
clusterFrame: true,
isEnabled: computed(() => true),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default helmChartsRouteInjectable;
@@ -0,0 +1,26 @@
/**
* 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 type { HelmChartsPathParameters } from "./helm-charts-route.injectable";
import helmChartsRouteInjectable from "./helm-charts-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
export type NavigateToHelmCharts = (parameters?: HelmChartsPathParameters) => void;
const navigateToHelmChartsInjectable = getInjectable({
id: "navigate-to-helm-charts",
instantiate: (di): NavigateToHelmCharts => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(helmChartsRouteInjectable);
return (parameters) =>
navigateToRoute(route, {
parameters,
});
},
});
export default navigateToHelmChartsInjectable;
@@ -0,0 +1,27 @@
/**
* 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 { computed } from "mobx";
import type { Route } from "../../../../front-end-route-injection-token";
import { frontEndRouteInjectionToken } from "../../../../front-end-route-injection-token";
export interface HelmReleasesPathParameters {
namespace?: string;
name?: string;
}
const helmReleasesRouteInjectable = getInjectable({
id: "helm-releases-route",
instantiate: (): Route<HelmReleasesPathParameters> => ({
path: "/helm/releases/:namespace?/:name?",
clusterFrame: true,
isEnabled: computed(() => true),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default helmReleasesRouteInjectable;
@@ -0,0 +1,23 @@
/**
* 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 type { HelmReleasesPathParameters } from "./helm-releases-route.injectable";
import helmReleasesRouteInjectable from "./helm-releases-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
export type NavigateToHelmReleases = (parameters?: HelmReleasesPathParameters) => void;
const navigateToHelmReleasesInjectable = getInjectable({
id: "navigate-to-helm-releases",
instantiate: (di): NavigateToHelmReleases => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(helmReleasesRouteInjectable);
return (parameters) => navigateToRoute(route, { parameters });
},
});
export default navigateToHelmReleasesInjectable;
@@ -0,0 +1,24 @@
/**
* 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 namespacesRouteInjectable = getInjectable({
id: "namespaces-route",
instantiate: (di) => ({
path: "/namespaces",
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "namespaces",
group: "",
}),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default namespacesRouteInjectable;
@@ -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 namespacesRouteInjectable from "./namespaces-route.injectable";
import { navigateToRouteInjectionToken } from "../../../navigate-to-route-injection-token";
const navigateToNamespacesInjectable = getInjectable({
id: "navigate-to-namespaces",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(namespacesRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToNamespacesInjectable;
@@ -0,0 +1,24 @@
/**
* 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 endpointsRouteInjectable = getInjectable({
id: "endpoints-route",
instantiate: (di) => ({
path: "/endpoints",
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "endpoints",
group: "",
}),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default endpointsRouteInjectable;
@@ -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 endpointsRouteInjectable from "./endpoints-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
const navigateToEndpointsInjectable = getInjectable({
id: "navigate-to-endpoints",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(endpointsRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToEndpointsInjectable;
@@ -0,0 +1,30 @@
/**
* 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 { frontEndRouteInjectionToken } from "../../../../front-end-route-injection-token";
import {
shouldShowResourceInjectionToken,
} from "../../../../../cluster-store/allowed-resources-injection-token";
const ingressClassesesRouteInjectable = getInjectable({
id: "ingress-classes-route",
instantiate: (di) => {
const isEnabled = di.inject(shouldShowResourceInjectionToken, {
apiName: "ingressclasses",
group: "networking.k8s.io",
});
return {
path: "/ingress-classes",
clusterFrame: true,
isEnabled,
};
},
injectionToken: frontEndRouteInjectionToken,
});
export default ingressClassesesRouteInjectable;
@@ -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 { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
import ingressClassesesRouteInjectable from "./ingress-classeses-route.injectable";
const navigateToIngressesInjectable = getInjectable({
id: "navigate-to-ingress-classes",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(ingressClassesesRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToIngressesInjectable;
@@ -0,0 +1,31 @@
/**
* 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 { computedOr } from "../../../../../utils/computed-or";
import { frontEndRouteInjectionToken } from "../../../../front-end-route-injection-token";
const ingressesRouteInjectable = getInjectable({
id: "ingresses-route",
instantiate: (di) => ({
path: "/ingresses",
clusterFrame: true,
isEnabled: computedOr(
di.inject(shouldShowResourceInjectionToken, {
apiName: "ingresses",
group: "networking.k8s.io",
}),
di.inject(shouldShowResourceInjectionToken, {
apiName: "ingresses",
group: "extensions",
}),
),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default ingressesRouteInjectable;
@@ -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 ingressesRouteInjectable from "./ingresses-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
const navigateToIngressesInjectable = getInjectable({
id: "navigate-to-ingresses",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(ingressesRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToIngressesInjectable;
@@ -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 networkPoliciesRouteInjectable from "./network-policies-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
const navigateToNetworkPoliciesInjectable = getInjectable({
id: "navigate-to-network-policies",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(networkPoliciesRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToNetworkPoliciesInjectable;
@@ -0,0 +1,24 @@
/**
* 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 networkPoliciesRouteInjectable = getInjectable({
id: "network-policies-route",
instantiate: (di) => ({
path: "/network-policies",
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "networkpolicies",
group: "networking.k8s.io",
}),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default networkPoliciesRouteInjectable;
@@ -0,0 +1,24 @@
/**
* 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 type { PortForwardsPathParameters } from "./port-forwards-route.injectable";
import portForwardsRouteInjectable from "./port-forwards-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
export type NavigateToPortForwards = (parameters?: PortForwardsPathParameters) => void;
const navigateToPortForwardsInjectable = getInjectable({
id: "navigate-to-port-forwards",
instantiate: (di): NavigateToPortForwards => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(portForwardsRouteInjectable);
return (parameters) =>
navigateToRoute(route, { parameters });
},
});
export default navigateToPortForwardsInjectable;
@@ -0,0 +1,26 @@
/**
* 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 { computed } from "mobx";
import type { Route } from "../../../../front-end-route-injection-token";
import { frontEndRouteInjectionToken } from "../../../../front-end-route-injection-token";
export interface PortForwardsPathParameters {
forwardport?: string;
}
const portForwardsRouteInjectable = getInjectable({
id: "port-forwards-route",
instantiate: (): Route<PortForwardsPathParameters> => ({
path: "/port-forwards/:forwardport?",
clusterFrame: true,
isEnabled: computed(() => true),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default portForwardsRouteInjectable;
@@ -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 servicesRouteInjectable from "./services-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
const navigateToServicesInjectable = getInjectable({
id: "navigate-to-services",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(servicesRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToServicesInjectable;
@@ -0,0 +1,24 @@
/**
* 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 servicesRouteInjectable = getInjectable({
id: "services-route",
instantiate: (di) => ({
path: "/services",
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "services",
group: "",
}),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default servicesRouteInjectable;
@@ -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 nodesRouteInjectable from "./nodes-route.injectable";
import { navigateToRouteInjectionToken } from "../../../navigate-to-route-injection-token";
const navigateToNodesInjectable = getInjectable({
id: "navigate-to-nodes",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(nodesRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToNodesInjectable;
@@ -0,0 +1,24 @@
/**
* 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 nodesRouteInjectable = getInjectable({
id: "nodes-route",
instantiate: (di) => ({
path: "/nodes",
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "nodes",
group: "",
}),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default nodesRouteInjectable;
@@ -0,0 +1,24 @@
/**
* 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 clusterOverviewRouteInjectable = getInjectable({
id: "cluster-overview-route",
instantiate: (di) => ({
path: "/overview",
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "nodes",
group: "",
}),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default clusterOverviewRouteInjectable;
@@ -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 clusterOverviewRouteInjectable from "./cluster-overview-route.injectable";
import { navigateToRouteInjectionToken } from "../../../navigate-to-route-injection-token";
const navigateToClusterOverviewInjectable = getInjectable({
id: "navigate-to-cluster-overview",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(clusterOverviewRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToClusterOverviewInjectable;
@@ -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 persistentVolumeClaimsRouteInjectable from "./persistent-volume-claims-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
const navigateToPersistentVolumeClaimsInjectable = getInjectable({
id: "navigate-to-persistent-volume-claims",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(persistentVolumeClaimsRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToPersistentVolumeClaimsInjectable;
@@ -0,0 +1,24 @@
/**
* 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 persistentVolumeClaimsRouteInjectable = getInjectable({
id: "persistent-volume-claims-route",
instantiate: (di) => ({
path: "/persistent-volume-claims",
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "persistentvolumeclaims",
group: "",
}),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default persistentVolumeClaimsRouteInjectable;
@@ -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 persistentVolumesRouteInjectable from "./persistent-volumes-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
const navigateToPersistentVolumesInjectable = getInjectable({
id: "navigate-to-persistent-volumes",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(persistentVolumesRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToPersistentVolumesInjectable;
@@ -0,0 +1,24 @@
/**
* 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 persistentVolumesRouteInjectable = getInjectable({
id: "persistent-volumes-route",
instantiate: (di) => ({
path: "/persistent-volumes",
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "persistentvolumes",
group: "",
}),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default persistentVolumesRouteInjectable;
@@ -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 storageClassesRouteInjectable from "./storage-classes-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
const navigateToStorageClassesInjectable = getInjectable({
id: "navigate-to-storage-classes",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(storageClassesRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToStorageClassesInjectable;
@@ -0,0 +1,24 @@
/**
* 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 storageClassesRouteInjectable = getInjectable({
id: "storage-classes-route",
instantiate: (di) => ({
path: "/storage-classes",
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "storageclasses",
group: "storage.k8s.io",
}),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default storageClassesRouteInjectable;
@@ -0,0 +1,24 @@
/**
* 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 clusterRoleBindingsRouteInjectable = getInjectable({
id: "cluster-role-bindings-route",
instantiate: (di) => ({
path: "/cluster-role-bindings",
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "clusterrolebindings",
group: "rbac.authorization.k8s.io",
}),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default clusterRoleBindingsRouteInjectable;
@@ -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 clusterRoleBindingsRouteInjectable from "./cluster-role-bindings-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
const navigateToClusterRoleBindingsInjectable = getInjectable({
id: "navigate-to-cluster-role-bindings",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(clusterRoleBindingsRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToClusterRoleBindingsInjectable;
@@ -0,0 +1,24 @@
/**
* 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 clusterRolesRouteInjectable = getInjectable({
id: "cluster-roles-route",
instantiate: (di) => ({
path: "/cluster-roles",
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "clusterroles",
group: "rbac.authorization.k8s.io",
}),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default clusterRolesRouteInjectable;
@@ -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 clusterRolesRouteInjectable from "./cluster-roles-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
const navigateToClusterRolesInjectable = getInjectable({
id: "navigate-to-cluster-roles",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(clusterRolesRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToClusterRolesInjectable;
@@ -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 podSecurityPoliciesRouteInjectable from "./pod-security-policies-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
const navigateToPodSecurityPoliciesInjectable = getInjectable({
id: "navigate-to-pod-security-policies",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(podSecurityPoliciesRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToPodSecurityPoliciesInjectable;
@@ -0,0 +1,26 @@
/**
* 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 podSecurityPoliciesRouteInjectable = getInjectable({
id: "pod-security-policies-route",
instantiate: (di) => {
return {
path: "/pod-security-policies",
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "podsecuritypolicies",
group: "policy",
}),
};
},
injectionToken: frontEndRouteInjectionToken,
});
export default podSecurityPoliciesRouteInjectable;
@@ -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 roleBindingsRouteInjectable from "./role-bindings-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
const navigateToRoleBindingsInjectable = getInjectable({
id: "navigate-to-role-bindings",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(roleBindingsRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToRoleBindingsInjectable;
@@ -0,0 +1,26 @@
/**
* 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 roleBindingsRouteInjectable = getInjectable({
id: "role-bindings-route",
instantiate: (di) => {
return {
path: "/role-bindings",
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "rolebindings",
group: "rbac.authorization.k8s.io",
}),
};
},
injectionToken: frontEndRouteInjectionToken,
});
export default roleBindingsRouteInjectable;
@@ -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 rolesRouteInjectable from "./roles-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
const navigateToRolesInjectable = getInjectable({
id: "navigate-to-roles",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(rolesRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToRolesInjectable;
@@ -0,0 +1,24 @@
/**
* 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 rolesRouteInjectable = getInjectable({
id: "roles-route",
instantiate: (di) => ({
path: "/roles",
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "roles",
group: "rbac.authorization.k8s.io",
}),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default rolesRouteInjectable;
@@ -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 serviceAccountsRouteInjectable from "./service-accounts-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
const navigateToServiceAccountsInjectable = getInjectable({
id: "navigate-to-service-accounts",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(serviceAccountsRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToServiceAccountsInjectable;
@@ -0,0 +1,24 @@
/**
* 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 serviceAccountsRouteInjectable = getInjectable({
id: "service-accounts-route",
instantiate: (di) => ({
path: "/service-accounts",
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "serviceaccounts",
group: "",
}),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default serviceAccountsRouteInjectable;
@@ -0,0 +1,24 @@
/**
* 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 cronJobsRouteInjectable = getInjectable({
id: "cron-jobs-route",
instantiate: (di) => ({
path: "/cronjobs",
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "cronjobs",
group: "batch",
}),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default cronJobsRouteInjectable;
@@ -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 cronJobsRouteInjectable from "./cron-jobs-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
const navigateToCronJobsInjectable = getInjectable({
id: "navigate-to-cron-jobs",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(cronJobsRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToCronJobsInjectable;
@@ -0,0 +1,24 @@
/**
* 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 daemonsetsRouteInjectable = getInjectable({
id: "daemonsets-route",
instantiate: (di) => ({
path: "/daemonsets",
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "daemonsets",
group: "apps",
}),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default daemonsetsRouteInjectable;
@@ -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 daemonsetsRouteInjectable from "./daemonsets-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
const navigateToDaemonsetsInjectable = getInjectable({
id: "navigate-to-daemonsets",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(daemonsetsRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToDaemonsetsInjectable;
@@ -0,0 +1,24 @@
/**
* 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 deploymentsRouteInjectable = getInjectable({
id: "deployments-route",
instantiate: (di) => ({
path: "/deployments",
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "deployments",
group: "apps",
}),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default deploymentsRouteInjectable;
@@ -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 deploymentsRouteInjectable from "./deployments-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
const navigateToDeploymentsInjectable = getInjectable({
id: "navigate-to-deployments",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(deploymentsRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToDeploymentsInjectable;
@@ -0,0 +1,24 @@
/**
* 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 jobsRouteInjectable = getInjectable({
id: "jobs-route",
instantiate: (di) => ({
path: "/jobs",
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "jobs",
group: "batch",
}),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default jobsRouteInjectable;
@@ -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 jobsRouteInjectable from "./jobs-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
const navigateToJobsInjectable = getInjectable({
id: "navigate-to-jobs",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(jobsRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToJobsInjectable;
@@ -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 workloadsOverviewRouteInjectable from "./workloads-overview-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
const navigateToWorkloadsOverviewInjectable = getInjectable({
id: "navigate-to-workloads-overview",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(workloadsOverviewRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToWorkloadsOverviewInjectable;
@@ -0,0 +1,21 @@
/**
* 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 { computed } from "mobx";
import { frontEndRouteInjectionToken } from "../../../../front-end-route-injection-token";
const workloadsOverviewRouteInjectable = getInjectable({
id: "workloads-overview-route",
instantiate: () => ({
path: "/workloads",
clusterFrame: true,
isEnabled: computed(() => true),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default workloadsOverviewRouteInjectable;
@@ -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 podsRouteInjectable from "./pods-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
const navigateToPodsInjectable = getInjectable({
id: "navigate-to-pods",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(podsRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToPodsInjectable;
@@ -0,0 +1,24 @@
/**
* 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 podsRouteInjectable = getInjectable({
id: "pods-route",
instantiate: (di) => ({
path: "/pods",
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "pods",
group: "",
}),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default podsRouteInjectable;
@@ -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 replicasetsRouteInjectable from "./replicasets-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
const navigateToReplicasetsInjectable = getInjectable({
id: "navigate-to-replicasets",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(replicasetsRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToReplicasetsInjectable;
@@ -0,0 +1,24 @@
/**
* 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 replicasetsRouteInjectable = getInjectable({
id: "replicasets-route",
instantiate: (di) => ({
path: "/replicasets",
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "replicasets",
group: "apps",
}),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default replicasetsRouteInjectable;
@@ -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 statefulsetsRouteInjectable from "./statefulsets-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
const navigateToStatefulsetsInjectable = getInjectable({
id: "navigate-to-statefulsets",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(statefulsetsRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToStatefulsetsInjectable;
@@ -0,0 +1,24 @@
/**
* 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 statefulsetsRouteInjectable = getInjectable({
id: "statefulsets-route",
instantiate: (di) => ({
path: "/statefulsets",
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "statefulsets",
group: "apps",
}),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default statefulsetsRouteInjectable;
@@ -0,0 +1,26 @@
/**
* 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 { computed } from "mobx";
import type { Route } from "../../front-end-route-injection-token";
import { frontEndRouteInjectionToken } from "../../front-end-route-injection-token";
export interface EntitySettingsPathParameters {
entityId: string;
}
const entitySettingsRouteInjectable = getInjectable({
id: "entity-settings-route",
instantiate: (): Route<EntitySettingsPathParameters> => ({
path: "/entity/:entityId/settings",
clusterFrame: false,
isEnabled: computed(() => true),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default entitySettingsRouteInjectable;
@@ -0,0 +1,23 @@
/**
* 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 entitySettingsRouteInjectable from "./entity-settings-route.injectable";
import { navigateToRouteInjectionToken } from "../../navigate-to-route-injection-token";
export type NavigateToEntitySettings = (entityId: string, targetTabId?: string) => void;
const navigateToEntitySettingsInjectable = getInjectable({
id: "navigate-to-entity-settings",
instantiate: (di): NavigateToEntitySettings => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(entitySettingsRouteInjectable);
return (entityId, targetTabId) =>
navigateToRoute(route, { parameters: { entityId }, fragment: targetTabId });
},
});
export default navigateToEntitySettingsInjectable;
@@ -0,0 +1,21 @@
/**
* 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 { computed } from "mobx";
import { frontEndRouteInjectionToken } from "../../front-end-route-injection-token";
const extensionsRouteInjectable = getInjectable({
id: "extensions-route",
instantiate: () => ({
path: "/extensions",
clusterFrame: false,
isEnabled: computed(() => true),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default extensionsRouteInjectable;
@@ -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 extensionsRouteInjectable from "./extensions-route.injectable";
import { navigateToRouteInjectionToken } from "../../navigate-to-route-injection-token";
const navigateToExtensionsInjectable = getInjectable({
id: "navigate-to-extensions",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(extensionsRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToExtensionsInjectable;
@@ -0,0 +1,26 @@
/**
* 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 { computed } from "mobx";
import welcomeRouteConfigInjectable from "./welcome-route-config.injectable";
import { frontEndRouteInjectionToken } from "../../front-end-route-injection-token";
const defaultWelcomeRouteInjectable = getInjectable({
id: "default-welcome-route",
instantiate: (di) => {
const welcomeRoute = di.inject(welcomeRouteConfigInjectable);
return {
path: "/welcome",
clusterFrame: false,
isEnabled: computed(() => welcomeRoute === "/welcome"),
};
},
injectionToken: frontEndRouteInjectionToken,
});
export default defaultWelcomeRouteInjectable;
@@ -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 welcomeRouteInjectable from "./welcome-route.injectable";
import { navigateToRouteInjectionToken } from "../../navigate-to-route-injection-token";
const navigateToWelcomeInjectable = getInjectable({
id: "navigate-to-welcome",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(welcomeRouteInjectable);
return () => navigateToRoute(route);
},
});
export default navigateToWelcomeInjectable;
@@ -0,0 +1,14 @@
/**
* 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 applicationInformationToken from "../../../vars/application-information-token";
const welcomeRouteConfigInjectable = getInjectable({
id: "welcome-route-config",
instantiate: (di) => di.inject(applicationInformationToken).config.welcomeRoute,
});
export default welcomeRouteConfigInjectable;
@@ -0,0 +1,26 @@
/**
* 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 { computed } from "mobx";
import welcomeRouteConfigInjectable from "./welcome-route-config.injectable";
import { frontEndRouteInjectionToken } from "../../front-end-route-injection-token";
const welcomeRouteInjectable = getInjectable({
id: "welcome-route",
instantiate: (di) => {
const welcomeRoute = di.inject(welcomeRouteConfigInjectable);
return {
path: welcomeRoute,
clusterFrame: false,
isEnabled: computed(() => true),
};
},
injectionToken: frontEndRouteInjectionToken,
});
export default welcomeRouteInjectable;
Loaded 100 of 3321 files, more files were not shown because too many files have changed in this diff. Show more