mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
chore: Use a helper to fix type errors from routeSpecificComponent
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
6642aef44a
commit
048ed7d143
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
import { getRouteSpecificComponentInjectable } from "../../../renderer/routes/route-specific-component-injection-token";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../../renderer/routes/route-specific-component-injection-token";
|
|
||||||
import preferencesRouteForLegacyExtensions from "../common/preferences-route-for-legacy-extensions.injectable";
|
import preferencesRouteForLegacyExtensions from "../common/preferences-route-for-legacy-extensions.injectable";
|
||||||
import { Preferences } from "./preferences";
|
import { Preferences } from "./preferences";
|
||||||
|
|
||||||
const preferencesRouteComponentInjectable = getInjectable({
|
const preferencesRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "preferences-route-component-for-legacy-extensions",
|
id: "preferences-route-component-for-legacy-extensions",
|
||||||
|
routeInjectable: preferencesRouteForLegacyExtensions,
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(preferencesRouteForLegacyExtensions),
|
|
||||||
Component: Preferences,
|
Component: Preferences,
|
||||||
}),
|
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default preferencesRouteComponentInjectable;
|
export default preferencesRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
import { getRouteSpecificComponentInjectable } from "../../../renderer/routes/route-specific-component-injection-token";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../../renderer/routes/route-specific-component-injection-token";
|
|
||||||
import { Preferences } from "./preferences";
|
import { Preferences } from "./preferences";
|
||||||
import preferencesRouteInjectable from "../common/preferences-route.injectable";
|
import preferencesRouteInjectable from "../common/preferences-route.injectable";
|
||||||
|
|
||||||
const preferencesRouteComponentInjectable = getInjectable({
|
const preferencesRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "preferences-route-component",
|
id: "preferences-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(preferencesRouteInjectable),
|
|
||||||
Component: Preferences,
|
Component: Preferences,
|
||||||
}),
|
routeInjectable: preferencesRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default preferencesRouteComponentInjectable;
|
export default preferencesRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { AddCluster } from "./add-cluster";
|
import { AddCluster } from "./add-cluster";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
import addClusterRouteInjectable from "../../../common/front-end-routing/routes/add-cluster/add-cluster-route.injectable";
|
import addClusterRouteInjectable from "../../../common/front-end-routing/routes/add-cluster/add-cluster-route.injectable";
|
||||||
|
|
||||||
const addClusterRouteComponentInjectable = getInjectable({
|
const addClusterRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "add-cluster-route-component",
|
id: "add-cluster-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(addClusterRouteInjectable),
|
|
||||||
Component: AddCluster,
|
Component: AddCluster,
|
||||||
}),
|
routeInjectable: addClusterRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default addClusterRouteComponentInjectable;
|
export default addClusterRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { Catalog } from "./catalog";
|
import { Catalog } from "./catalog";
|
||||||
import catalogRouteInjectable from "../../../common/front-end-routing/routes/catalog/catalog-route.injectable";
|
import catalogRouteInjectable from "../../../common/front-end-routing/routes/catalog/catalog-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const catalogRouteComponentInjectable = getInjectable({
|
const catalogRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "catalog-route-component",
|
id: "catalog-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(catalogRouteInjectable),
|
|
||||||
Component: Catalog,
|
Component: Catalog,
|
||||||
}),
|
routeInjectable: catalogRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default catalogRouteComponentInjectable;
|
export default catalogRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { ClusterView } from "./cluster-view";
|
import { ClusterView } from "./cluster-view";
|
||||||
import clusterViewRouteInjectable from "../../../common/front-end-routing/routes/cluster-view/cluster-view-route.injectable";
|
import clusterViewRouteInjectable from "../../../common/front-end-routing/routes/cluster-view/cluster-view-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const clusterViewRouteComponentInjectable = getInjectable({
|
const clusterViewRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "cluster-view-route-component",
|
id: "cluster-view-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(clusterViewRouteInjectable),
|
|
||||||
Component: ClusterView,
|
Component: ClusterView,
|
||||||
}),
|
routeInjectable: clusterViewRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default clusterViewRouteComponentInjectable;
|
export default clusterViewRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
|
||||||
import { ClusterOverview } from "./cluster-overview";
|
import { ClusterOverview } from "./cluster-overview";
|
||||||
import clusterOverviewRouteInjectable from "../../../common/front-end-routing/routes/cluster/overview/cluster-overview-route.injectable";
|
import clusterOverviewRouteInjectable from "../../../common/front-end-routing/routes/cluster/overview/cluster-overview-route.injectable";
|
||||||
|
|
||||||
const clusterOverviewRouteComponentInjectable = getInjectable({
|
const clusterOverviewRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "cluster-overview-route-component",
|
id: "cluster-overview-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(clusterOverviewRouteInjectable),
|
|
||||||
Component: ClusterOverview,
|
Component: ClusterOverview,
|
||||||
}),
|
routeInjectable: clusterOverviewRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default clusterOverviewRouteComponentInjectable;
|
export default clusterOverviewRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
|
||||||
import horizontalPodAutoscalersRouteInjectable from "../../../common/front-end-routing/routes/cluster/config/horizontal-pod-autoscalers/horizontal-pod-autoscalers-route.injectable";
|
import horizontalPodAutoscalersRouteInjectable from "../../../common/front-end-routing/routes/cluster/config/horizontal-pod-autoscalers/horizontal-pod-autoscalers-route.injectable";
|
||||||
import { HorizontalPodAutoscalers } from "./list-view";
|
import { HorizontalPodAutoscalers } from "./list-view";
|
||||||
|
|
||||||
const horizontalPodAutoscalersRouteComponentInjectable = getInjectable({
|
const horizontalPodAutoscalersRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "horizontal-pod-autoscalers-route-component",
|
id: "horizontal-pod-autoscalers-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(horizontalPodAutoscalersRouteInjectable),
|
|
||||||
Component: HorizontalPodAutoscalers,
|
Component: HorizontalPodAutoscalers,
|
||||||
}),
|
routeInjectable: horizontalPodAutoscalersRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default horizontalPodAutoscalersRouteComponentInjectable;
|
export default horizontalPodAutoscalersRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { Leases } from "./leases";
|
import { Leases } from "./leases";
|
||||||
import leasesRouteInjectable from "../../../common/front-end-routing/routes/cluster/config/leases/leases-route.injectable";
|
import leasesRouteInjectable from "../../../common/front-end-routing/routes/cluster/config/leases/leases-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const leasesRouteComponentInjectable = getInjectable({
|
const leasesRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "leases-route-component",
|
id: "leases-route-component",
|
||||||
|
routeInjectable: leasesRouteInjectable,
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(leasesRouteInjectable),
|
|
||||||
Component: Leases,
|
Component: Leases,
|
||||||
}),
|
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default leasesRouteComponentInjectable;
|
export default leasesRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { LimitRanges } from "./limit-ranges";
|
import { LimitRanges } from "./limit-ranges";
|
||||||
import limitRangesRouteInjectable from "../../../common/front-end-routing/routes/cluster/config/limit-ranges/limit-ranges-route.injectable";
|
import limitRangesRouteInjectable from "../../../common/front-end-routing/routes/cluster/config/limit-ranges/limit-ranges-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const limitRangesRouteComponentInjectable = getInjectable({
|
const limitRangesRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "limit-ranges-route-component",
|
id: "limit-ranges-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(limitRangesRouteInjectable),
|
|
||||||
Component: LimitRanges,
|
Component: LimitRanges,
|
||||||
}),
|
routeInjectable: limitRangesRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default limitRangesRouteComponentInjectable;
|
export default limitRangesRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { ConfigMaps } from "./config-maps";
|
import { ConfigMaps } from "./config-maps";
|
||||||
import configMapsRouteInjectable from "../../../common/front-end-routing/routes/cluster/config/config-maps/config-maps-route.injectable";
|
import configMapsRouteInjectable from "../../../common/front-end-routing/routes/cluster/config/config-maps/config-maps-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const configMapsRouteComponentInjectable = getInjectable({
|
const configMapsRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "config-maps-route-component",
|
id: "config-maps-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(configMapsRouteInjectable),
|
|
||||||
Component: ConfigMaps,
|
Component: ConfigMaps,
|
||||||
}),
|
routeInjectable: configMapsRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default configMapsRouteComponentInjectable;
|
export default configMapsRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,23 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
import {
|
import mutatingWebhookConfigurationsRouteInjectable from "../../../common/front-end-routing/routes/cluster/config/mutating-webhook-configurations/mutating-webhook-configurations-route.injectable";
|
||||||
routeSpecificComponentInjectionToken,
|
|
||||||
} from "../../routes/route-specific-component-injection-token";
|
|
||||||
import mutatingWebhookConfigurationsRouteInjectable
|
|
||||||
from "../../../common/front-end-routing/routes/cluster/config/mutating-webhook-configurations/mutating-webhook-configurations-route.injectable";
|
|
||||||
import { MutatingWebhookConfigurations } from "./mutating-webhook-configurations";
|
import { MutatingWebhookConfigurations } from "./mutating-webhook-configurations";
|
||||||
|
|
||||||
const mutatingWebhookConfigurationsRouteComponentInjectable = getInjectable({
|
const mutatingWebhookConfigurationsRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "mutating-webhook-configuration-route-component",
|
id: "mutating-webhook-configuration-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(mutatingWebhookConfigurationsRouteInjectable),
|
|
||||||
Component: MutatingWebhookConfigurations,
|
Component: MutatingWebhookConfigurations,
|
||||||
}),
|
routeInjectable: mutatingWebhookConfigurationsRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default mutatingWebhookConfigurationsRouteComponentInjectable;
|
export default mutatingWebhookConfigurationsRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { PodDisruptionBudgets } from "./pod-disruption-budgets";
|
import { PodDisruptionBudgets } from "./pod-disruption-budgets";
|
||||||
import podDisruptionBudgetsRouteInjectable from "../../../common/front-end-routing/routes/cluster/config/pod-disruption-budgets/pod-disruption-budgets-route.injectable";
|
import podDisruptionBudgetsRouteInjectable from "../../../common/front-end-routing/routes/cluster/config/pod-disruption-budgets/pod-disruption-budgets-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const podDisruptionBudgetsRouteComponentInjectable = getInjectable({
|
const podDisruptionBudgetsRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "pod-disruption-budgets-route-component",
|
id: "pod-disruption-budgets-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(podDisruptionBudgetsRouteInjectable),
|
|
||||||
Component: PodDisruptionBudgets,
|
Component: PodDisruptionBudgets,
|
||||||
}),
|
routeInjectable: podDisruptionBudgetsRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default podDisruptionBudgetsRouteComponentInjectable;
|
export default podDisruptionBudgetsRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { PriorityClasses } from "./priority-classes";
|
import { PriorityClasses } from "./priority-classes";
|
||||||
import priorityClassesRouteInjectable from "../../../common/front-end-routing/routes/cluster/config/priority-classes/priority-classes-route.injectable";
|
import priorityClassesRouteInjectable from "../../../common/front-end-routing/routes/cluster/config/priority-classes/priority-classes-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const priorityClassesRouteComponentInjectable = getInjectable({
|
const priorityClassesRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "priority-classes-route-component",
|
id: "priority-classes-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(priorityClassesRouteInjectable),
|
|
||||||
Component: PriorityClasses,
|
Component: PriorityClasses,
|
||||||
}),
|
routeInjectable: priorityClassesRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default priorityClassesRouteComponentInjectable;
|
export default priorityClassesRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,22 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { ResourceQuotas } from "./resource-quotas";
|
import { ResourceQuotas } from "./resource-quotas";
|
||||||
import resourceQuotasRouteInjectable from "../../../common/front-end-routing/routes/cluster/config/resource-quotas/resource-quotas-route.injectable";
|
import resourceQuotasRouteInjectable from "../../../common/front-end-routing/routes/cluster/config/resource-quotas/resource-quotas-route.injectable";
|
||||||
import {
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
routeSpecificComponentInjectionToken,
|
|
||||||
} from "../../routes/route-specific-component-injection-token";
|
|
||||||
|
|
||||||
const resourceQuotasRouteComponentInjectable = getInjectable({
|
const resourceQuotasRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "resource-quotas-route-component",
|
id: "resource-quotas-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(resourceQuotasRouteInjectable),
|
|
||||||
Component: ResourceQuotas,
|
Component: ResourceQuotas,
|
||||||
}),
|
routeInjectable: resourceQuotasRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default resourceQuotasRouteComponentInjectable;
|
export default resourceQuotasRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { Secrets } from "./secrets";
|
import { Secrets } from "./secrets";
|
||||||
import secretsRouteInjectable from "../../../common/front-end-routing/routes/cluster/config/secrets/secrets-route.injectable";
|
import secretsRouteInjectable from "../../../common/front-end-routing/routes/cluster/config/secrets/secrets-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const secretsRouteComponentInjectable = getInjectable({
|
const secretsRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "secrets-route-component",
|
id: "secrets-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(secretsRouteInjectable),
|
|
||||||
Component: Secrets,
|
Component: Secrets,
|
||||||
}),
|
routeInjectable: secretsRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default secretsRouteComponentInjectable;
|
export default secretsRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,23 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
import {
|
import validatingWebhookConfigurationsRouteInjectable from "../../../common/front-end-routing/routes/cluster/config/validating-webhook-configurations/validating-webhook-configurations-route.injectable";
|
||||||
routeSpecificComponentInjectionToken,
|
|
||||||
} from "../../routes/route-specific-component-injection-token";
|
|
||||||
import validatingWebhookConfigurationsRouteInjectable
|
|
||||||
from "../../../common/front-end-routing/routes/cluster/config/validating-webhook-configurations/validating-webhook-configurations-route.injectable";
|
|
||||||
import { ValidatingWebhookConfigurations } from "./validating-webhook-configurations";
|
import { ValidatingWebhookConfigurations } from "./validating-webhook-configurations";
|
||||||
|
|
||||||
const validatingWebhookConfigurationsRouteComponentInjectable = getInjectable({
|
const validatingWebhookConfigurationsRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "validating-webhook-configuration-route-component",
|
id: "validating-webhook-configuration-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(validatingWebhookConfigurationsRouteInjectable),
|
|
||||||
Component: ValidatingWebhookConfigurations,
|
Component: ValidatingWebhookConfigurations,
|
||||||
}),
|
routeInjectable: validatingWebhookConfigurationsRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default validatingWebhookConfigurationsRouteComponentInjectable;
|
export default validatingWebhookConfigurationsRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
|
||||||
import verticalPodAutoscalersRouteInjectable from "../../../common/front-end-routing/routes/cluster/config/vertical-pod-autoscalers/vertical-pod-autoscalers-route.injectable";
|
import verticalPodAutoscalersRouteInjectable from "../../../common/front-end-routing/routes/cluster/config/vertical-pod-autoscalers/vertical-pod-autoscalers-route.injectable";
|
||||||
import { VerticalPodAutoscalers } from "./vpa";
|
import { VerticalPodAutoscalers } from "./vpa";
|
||||||
|
|
||||||
const verticalPodAutoscalersRouteComponentInjectable = getInjectable({
|
const verticalPodAutoscalersRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "vertical-pod-autoscalers-route-component",
|
id: "vertical-pod-autoscalers-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(verticalPodAutoscalersRouteInjectable),
|
|
||||||
Component: VerticalPodAutoscalers,
|
Component: VerticalPodAutoscalers,
|
||||||
}),
|
routeInjectable: verticalPodAutoscalersRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default verticalPodAutoscalersRouteComponentInjectable;
|
export default verticalPodAutoscalersRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { CustomResources } from "./view";
|
import { CustomResources } from "./view";
|
||||||
import customResourcesRouteInjectable from "../../../common/front-end-routing/routes/cluster/custom-resources/custom-resources-route.injectable";
|
import customResourcesRouteInjectable from "../../../common/front-end-routing/routes/cluster/custom-resources/custom-resources-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const customResourcesRouteComponentInjectable = getInjectable({
|
const customResourcesRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "custom-resources-route-component",
|
id: "custom-resources-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(customResourcesRouteInjectable),
|
|
||||||
Component: CustomResources,
|
Component: CustomResources,
|
||||||
}),
|
routeInjectable: customResourcesRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default customResourcesRouteComponentInjectable;
|
export default customResourcesRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { EntitySettingsRouteComponent } from "./entity-settings";
|
import { EntitySettingsRouteComponent } from "./entity-settings";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
import entitySettingsRouteInjectable from "../../../common/front-end-routing/routes/entity-settings/entity-settings-route.injectable";
|
import entitySettingsRouteInjectable from "../../../common/front-end-routing/routes/entity-settings/entity-settings-route.injectable";
|
||||||
|
|
||||||
const entitySettingsRouteComponentInjectable = getInjectable({
|
const entitySettingsRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "entity-settings-route-component",
|
id: "entity-settings-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(entitySettingsRouteInjectable),
|
|
||||||
Component: EntitySettingsRouteComponent,
|
Component: EntitySettingsRouteComponent,
|
||||||
}),
|
routeInjectable: entitySettingsRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default entitySettingsRouteComponentInjectable;
|
export default entitySettingsRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { Events } from "./events";
|
import { Events } from "./events";
|
||||||
import eventsRouteInjectable from "../../../common/front-end-routing/routes/cluster/events/events-route.injectable";
|
import eventsRouteInjectable from "../../../common/front-end-routing/routes/cluster/events/events-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const eventsRouteComponentInjectable = getInjectable({
|
const eventsRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "events-route-component",
|
id: "events-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(eventsRouteInjectable),
|
|
||||||
Component: Events,
|
Component: Events,
|
||||||
}),
|
routeInjectable: eventsRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default eventsRouteComponentInjectable;
|
export default eventsRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { Extensions } from "./extensions";
|
import { Extensions } from "./extensions";
|
||||||
import extensionsRouteInjectable from "../../../common/front-end-routing/routes/extensions/extensions-route.injectable";
|
import extensionsRouteInjectable from "../../../common/front-end-routing/routes/extensions/extensions-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const extensionsRouteComponentInjectable = getInjectable({
|
const extensionsRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "extensions-route-component",
|
id: "extensions-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(extensionsRouteInjectable),
|
|
||||||
Component: Extensions,
|
Component: Extensions,
|
||||||
}),
|
routeInjectable: extensionsRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default extensionsRouteComponentInjectable;
|
export default extensionsRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { HelmCharts } from "./helm-charts";
|
import { HelmCharts } from "./helm-charts";
|
||||||
import helmChartsRouteInjectable from "../../../common/front-end-routing/routes/cluster/helm/charts/helm-charts-route.injectable";
|
import helmChartsRouteInjectable from "../../../common/front-end-routing/routes/cluster/helm/charts/helm-charts-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const helmChartsRouteComponentInjectable = getInjectable({
|
const helmChartsRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "helm-charts-route-component",
|
id: "helm-charts-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(helmChartsRouteInjectable),
|
|
||||||
Component: HelmCharts,
|
Component: HelmCharts,
|
||||||
}),
|
routeInjectable: helmChartsRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default helmChartsRouteComponentInjectable;
|
export default helmChartsRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { HelmReleases } from "./releases";
|
import { HelmReleases } from "./releases";
|
||||||
import helmReleasesRouteInjectable from "../../../common/front-end-routing/routes/cluster/helm/releases/helm-releases-route.injectable";
|
import helmReleasesRouteInjectable from "../../../common/front-end-routing/routes/cluster/helm/releases/helm-releases-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const helmReleasesRouteComponentInjectable = getInjectable({
|
const helmReleasesRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "helm-releases-route-component",
|
id: "helm-releases-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(helmReleasesRouteInjectable),
|
|
||||||
Component: HelmReleases,
|
Component: HelmReleases,
|
||||||
}),
|
routeInjectable: helmReleasesRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default helmReleasesRouteComponentInjectable;
|
export default helmReleasesRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { NamespacesRoute } from "./route";
|
import { NamespacesRoute } from "./route";
|
||||||
import namespacesRouteInjectable from "../../../common/front-end-routing/routes/cluster/namespaces/namespaces-route.injectable";
|
import namespacesRouteInjectable from "../../../common/front-end-routing/routes/cluster/namespaces/namespaces-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const namespacesRouteComponentInjectable = getInjectable({
|
const namespacesRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "namespaces-route-component",
|
id: "namespaces-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(namespacesRouteInjectable),
|
|
||||||
Component: NamespacesRoute,
|
Component: NamespacesRoute,
|
||||||
}),
|
routeInjectable: namespacesRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default namespacesRouteComponentInjectable;
|
export default namespacesRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { Endpoints } from "./endpoints";
|
import { Endpoints } from "./endpoints";
|
||||||
import endpointsRouteInjectable from "../../../common/front-end-routing/routes/cluster/network/endpoints/endpoints-route.injectable";
|
import endpointsRouteInjectable from "../../../common/front-end-routing/routes/cluster/network/endpoints/endpoints-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const endpointsRouteComponentInjectable = getInjectable({
|
const endpointsRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "endpoints-route-component",
|
id: "endpoints-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(endpointsRouteInjectable),
|
|
||||||
Component: Endpoints,
|
Component: Endpoints,
|
||||||
}),
|
routeInjectable: endpointsRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default endpointsRouteComponentInjectable;
|
export default endpointsRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
|
||||||
import ingressClassesRouteInjectable from "../../../common/front-end-routing/routes/cluster/network/ingress-class/ingress-classes-route.injectable";
|
import ingressClassesRouteInjectable from "../../../common/front-end-routing/routes/cluster/network/ingress-class/ingress-classes-route.injectable";
|
||||||
import { IngressClasses } from "./ingress-classes";
|
import { IngressClasses } from "./ingress-classes";
|
||||||
|
|
||||||
const ingressClassesRouteComponentInjectable = getInjectable({
|
const ingressClassesRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "ingress-classes-route-component",
|
id: "ingress-classes-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(ingressClassesRouteInjectable),
|
|
||||||
Component: IngressClasses,
|
Component: IngressClasses,
|
||||||
}),
|
routeInjectable: ingressClassesRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default ingressClassesRouteComponentInjectable;
|
export default ingressClassesRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { Ingresses } from "./ingresses";
|
import { Ingresses } from "./ingresses";
|
||||||
import ingressesRouteInjectable from "../../../common/front-end-routing/routes/cluster/network/ingresses/ingresses-route.injectable";
|
import ingressesRouteInjectable from "../../../common/front-end-routing/routes/cluster/network/ingresses/ingresses-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const ingressesRouteComponentInjectable = getInjectable({
|
const ingressesRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "ingresses-route-component",
|
id: "ingresses-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(ingressesRouteInjectable),
|
|
||||||
Component: Ingresses,
|
Component: Ingresses,
|
||||||
}),
|
routeInjectable: ingressesRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default ingressesRouteComponentInjectable;
|
export default ingressesRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { NetworkPolicies } from "./network-policies";
|
import { NetworkPolicies } from "./network-policies";
|
||||||
import networkPoliciesRouteInjectable from "../../../common/front-end-routing/routes/cluster/network/network-policies/network-policies-route.injectable";
|
import networkPoliciesRouteInjectable from "../../../common/front-end-routing/routes/cluster/network/network-policies/network-policies-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const networkPoliciesRouteComponentInjectable = getInjectable({
|
const networkPoliciesRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "network-policies-route-component",
|
id: "network-policies-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(networkPoliciesRouteInjectable),
|
|
||||||
Component: NetworkPolicies,
|
Component: NetworkPolicies,
|
||||||
}),
|
routeInjectable: networkPoliciesRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default networkPoliciesRouteComponentInjectable;
|
export default networkPoliciesRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { PortForwards } from "./port-forwards";
|
import { PortForwards } from "./port-forwards";
|
||||||
import portForwardsRouteInjectable from "../../../common/front-end-routing/routes/cluster/network/port-forwards/port-forwards-route.injectable";
|
import portForwardsRouteInjectable from "../../../common/front-end-routing/routes/cluster/network/port-forwards/port-forwards-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const portForwardsRouteComponentInjectable = getInjectable({
|
const portForwardsRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "port-forwards-route-component",
|
id: "port-forwards-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(portForwardsRouteInjectable),
|
|
||||||
Component: PortForwards,
|
Component: PortForwards,
|
||||||
}),
|
routeInjectable: portForwardsRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default portForwardsRouteComponentInjectable;
|
export default portForwardsRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { Services } from "./services";
|
import { Services } from "./services";
|
||||||
import servicesRouteInjectable from "../../../common/front-end-routing/routes/cluster/network/services/services-route.injectable";
|
import servicesRouteInjectable from "../../../common/front-end-routing/routes/cluster/network/services/services-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const servicesRouteComponentInjectable = getInjectable({
|
const servicesRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "services-route-component",
|
id: "services-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(servicesRouteInjectable),
|
|
||||||
Component: Services,
|
Component: Services,
|
||||||
}),
|
routeInjectable: servicesRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default servicesRouteComponentInjectable;
|
export default servicesRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { NodesRoute } from "./route";
|
import { NodesRoute } from "./route";
|
||||||
import nodesRouteInjectable from "../../../common/front-end-routing/routes/cluster/nodes/nodes-route.injectable";
|
import nodesRouteInjectable from "../../../common/front-end-routing/routes/cluster/nodes/nodes-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const nodesRouteComponentInjectable = getInjectable({
|
const nodesRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "nodes-route-component",
|
id: "nodes-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(nodesRouteInjectable),
|
|
||||||
Component: NodesRoute,
|
Component: NodesRoute,
|
||||||
}),
|
routeInjectable: nodesRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default nodesRouteComponentInjectable;
|
export default nodesRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { PodSecurityPolicies } from "./pod-security-policies";
|
import { PodSecurityPolicies } from "./pod-security-policies";
|
||||||
import podSecurityPoliciesRouteInjectable from "../../../common/front-end-routing/routes/cluster/user-management/pod-security-policies/pod-security-policies-route.injectable";
|
import podSecurityPoliciesRouteInjectable from "../../../common/front-end-routing/routes/cluster/user-management/pod-security-policies/pod-security-policies-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const podSecurityPoliciesRouteComponentInjectable = getInjectable({
|
const podSecurityPoliciesRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "pod-security-policies-route-component",
|
id: "pod-security-policies-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(podSecurityPoliciesRouteInjectable),
|
|
||||||
Component: PodSecurityPolicies,
|
Component: PodSecurityPolicies,
|
||||||
}),
|
routeInjectable: podSecurityPoliciesRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default podSecurityPoliciesRouteComponentInjectable;
|
export default podSecurityPoliciesRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { StorageClasses } from "./storage-classes";
|
import { StorageClasses } from "./storage-classes";
|
||||||
import storageClassesRouteInjectable from "../../../common/front-end-routing/routes/cluster/storage/storage-classes/storage-classes-route.injectable";
|
import storageClassesRouteInjectable from "../../../common/front-end-routing/routes/cluster/storage/storage-classes/storage-classes-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const storageClassesRouteComponentInjectable = getInjectable({
|
const storageClassesRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "storage-classes-route-component",
|
id: "storage-classes-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(storageClassesRouteInjectable),
|
|
||||||
Component: StorageClasses,
|
Component: StorageClasses,
|
||||||
}),
|
routeInjectable: storageClassesRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default storageClassesRouteComponentInjectable;
|
export default storageClassesRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { PersistentVolumeClaims } from "./volume-claims";
|
import { PersistentVolumeClaims } from "./volume-claims";
|
||||||
import persistentVolumeClaimsRouteInjectable from "../../../common/front-end-routing/routes/cluster/storage/persistent-volume-claims/persistent-volume-claims-route.injectable";
|
import persistentVolumeClaimsRouteInjectable from "../../../common/front-end-routing/routes/cluster/storage/persistent-volume-claims/persistent-volume-claims-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const persistentVolumeClaimsRouteComponentInjectable = getInjectable({
|
const persistentVolumeClaimsRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "persistent-volume-claims-route-component",
|
id: "persistent-volume-claims-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(persistentVolumeClaimsRouteInjectable),
|
|
||||||
Component: PersistentVolumeClaims,
|
Component: PersistentVolumeClaims,
|
||||||
}),
|
routeInjectable: persistentVolumeClaimsRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default persistentVolumeClaimsRouteComponentInjectable;
|
export default persistentVolumeClaimsRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,21 +2,15 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { PersistentVolumes } from "./volumes";
|
import { PersistentVolumes } from "./volumes";
|
||||||
|
|
||||||
import persistentVolumesRouteInjectable from "../../../common/front-end-routing/routes/cluster/storage/persistent-volumes/persistent-volumes-route.injectable";
|
import persistentVolumesRouteInjectable from "../../../common/front-end-routing/routes/cluster/storage/persistent-volumes/persistent-volumes-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const persistentVolumesRouteComponentInjectable = getInjectable({
|
const persistentVolumesRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "persistent-volumes-route-component",
|
id: "persistent-volumes-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(persistentVolumesRouteInjectable),
|
|
||||||
Component: PersistentVolumes,
|
Component: PersistentVolumes,
|
||||||
}),
|
routeInjectable: persistentVolumesRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default persistentVolumesRouteComponentInjectable;
|
export default persistentVolumesRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { ClusterRoleBindings } from "./view";
|
import { ClusterRoleBindings } from "./view";
|
||||||
import clusterRoleBindingsRouteInjectable from "../../../../common/front-end-routing/routes/cluster/user-management/cluster-role-bindings/cluster-role-bindings-route.injectable";
|
import clusterRoleBindingsRouteInjectable from "../../../../common/front-end-routing/routes/cluster/user-management/cluster-role-bindings/cluster-role-bindings-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const clusterRoleBindingsRouteComponentInjectable = getInjectable({
|
const clusterRoleBindingsRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "cluster-role-bindings-route-component",
|
id: "cluster-role-bindings-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(clusterRoleBindingsRouteInjectable),
|
|
||||||
Component: ClusterRoleBindings,
|
Component: ClusterRoleBindings,
|
||||||
}),
|
routeInjectable: clusterRoleBindingsRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default clusterRoleBindingsRouteComponentInjectable;
|
export default clusterRoleBindingsRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { ClusterRoles } from "./view";
|
import { ClusterRoles } from "./view";
|
||||||
import clusterRolesRouteInjectable from "../../../../common/front-end-routing/routes/cluster/user-management/cluster-roles/cluster-roles-route.injectable";
|
import clusterRolesRouteInjectable from "../../../../common/front-end-routing/routes/cluster/user-management/cluster-roles/cluster-roles-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const clusterRolesRouteComponentInjectable = getInjectable({
|
const clusterRolesRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "cluster-roles-route-component",
|
id: "cluster-roles-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(clusterRolesRouteInjectable),
|
|
||||||
Component: ClusterRoles,
|
Component: ClusterRoles,
|
||||||
}),
|
routeInjectable: clusterRolesRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default clusterRolesRouteComponentInjectable;
|
export default clusterRolesRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { RoleBindings } from "./view";
|
import { RoleBindings } from "./view";
|
||||||
import roleBindingsRouteInjectable from "../../../../common/front-end-routing/routes/cluster/user-management/role-bindings/role-bindings-route.injectable";
|
import roleBindingsRouteInjectable from "../../../../common/front-end-routing/routes/cluster/user-management/role-bindings/role-bindings-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const roleBindingsRouteComponentInjectable = getInjectable({
|
const roleBindingsRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "role-bindings-route-component",
|
id: "role-bindings-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(roleBindingsRouteInjectable),
|
|
||||||
Component: RoleBindings,
|
Component: RoleBindings,
|
||||||
}),
|
routeInjectable: roleBindingsRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default roleBindingsRouteComponentInjectable;
|
export default roleBindingsRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { Roles } from "./view";
|
import { Roles } from "./view";
|
||||||
import rolesRouteInjectable from "../../../../common/front-end-routing/routes/cluster/user-management/roles/roles-route.injectable";
|
import rolesRouteInjectable from "../../../../common/front-end-routing/routes/cluster/user-management/roles/roles-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const rolesRouteComponentInjectable = getInjectable({
|
const rolesRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "roles-route-component",
|
id: "roles-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(rolesRouteInjectable),
|
|
||||||
Component: Roles,
|
Component: Roles,
|
||||||
}),
|
routeInjectable: rolesRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default rolesRouteComponentInjectable;
|
export default rolesRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { ServiceAccounts } from "./view";
|
import { ServiceAccounts } from "./view";
|
||||||
import serviceAccountsRouteInjectable from "../../../../common/front-end-routing/routes/cluster/user-management/service-accounts/service-accounts-route.injectable";
|
import serviceAccountsRouteInjectable from "../../../../common/front-end-routing/routes/cluster/user-management/service-accounts/service-accounts-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const serviceAccountsRouteComponentInjectable = getInjectable({
|
const serviceAccountsRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "service-accounts-route-component",
|
id: "service-accounts-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(serviceAccountsRouteInjectable),
|
|
||||||
Component: ServiceAccounts,
|
Component: ServiceAccounts,
|
||||||
}),
|
routeInjectable: serviceAccountsRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default serviceAccountsRouteComponentInjectable;
|
export default serviceAccountsRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { Welcome } from "./welcome";
|
import { Welcome } from "./welcome";
|
||||||
import defaultWelcomeRouteInjectable from "../../../common/front-end-routing/routes/welcome/default-welcome-route.injectable";
|
import defaultWelcomeRouteInjectable from "../../../common/front-end-routing/routes/welcome/default-welcome-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const defaultWelcomeRouteComponentInjectable = getInjectable({
|
const defaultWelcomeRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "default-welcome-route-component",
|
id: "default-welcome-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(defaultWelcomeRouteInjectable),
|
|
||||||
Component: Welcome,
|
Component: Welcome,
|
||||||
}),
|
routeInjectable: defaultWelcomeRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default defaultWelcomeRouteComponentInjectable;
|
export default defaultWelcomeRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { CronJobs } from "./cronjobs";
|
import { CronJobs } from "./cronjobs";
|
||||||
import cronJobsRouteInjectable from "../../../common/front-end-routing/routes/cluster/workloads/cron-jobs/cron-jobs-route.injectable";
|
import cronJobsRouteInjectable from "../../../common/front-end-routing/routes/cluster/workloads/cron-jobs/cron-jobs-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const cronJobsRouteComponentInjectable = getInjectable({
|
const cronJobsRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "cron-jobs-route-component",
|
id: "cron-jobs-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(cronJobsRouteInjectable),
|
|
||||||
Component: CronJobs,
|
Component: CronJobs,
|
||||||
}),
|
routeInjectable: cronJobsRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default cronJobsRouteComponentInjectable;
|
export default cronJobsRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { DaemonSets } from "./daemonsets";
|
import { DaemonSets } from "./daemonsets";
|
||||||
import daemonsetsRouteInjectable from "../../../common/front-end-routing/routes/cluster/workloads/daemonsets/daemonsets-route.injectable";
|
import daemonsetsRouteInjectable from "../../../common/front-end-routing/routes/cluster/workloads/daemonsets/daemonsets-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const daemonsetsRouteComponentInjectable = getInjectable({
|
const daemonsetsRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "daemonsets-route-component",
|
id: "daemonsets-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(daemonsetsRouteInjectable),
|
|
||||||
Component: DaemonSets,
|
Component: DaemonSets,
|
||||||
}),
|
routeInjectable: daemonsetsRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default daemonsetsRouteComponentInjectable;
|
export default daemonsetsRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { Deployments } from "./deployments";
|
import { Deployments } from "./deployments";
|
||||||
import deploymentsRouteInjectable from "../../../common/front-end-routing/routes/cluster/workloads/deployments/deployments-route.injectable";
|
import deploymentsRouteInjectable from "../../../common/front-end-routing/routes/cluster/workloads/deployments/deployments-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const deploymentsRouteComponentInjectable = getInjectable({
|
const deploymentsRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "deployments-route-component",
|
id: "deployments-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(deploymentsRouteInjectable),
|
|
||||||
Component: Deployments,
|
Component: Deployments,
|
||||||
}),
|
routeInjectable: deploymentsRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default deploymentsRouteComponentInjectable;
|
export default deploymentsRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { Jobs } from "./jobs";
|
import { Jobs } from "./jobs";
|
||||||
import jobsRouteInjectable from "../../../common/front-end-routing/routes/cluster/workloads/jobs/jobs-route.injectable";
|
import jobsRouteInjectable from "../../../common/front-end-routing/routes/cluster/workloads/jobs/jobs-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const jobsRouteComponentInjectable = getInjectable({
|
const jobsRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "jobs-route-component",
|
id: "jobs-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(jobsRouteInjectable),
|
|
||||||
Component: Jobs,
|
Component: Jobs,
|
||||||
}),
|
routeInjectable: jobsRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default jobsRouteComponentInjectable;
|
export default jobsRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { WorkloadsOverview } from "./overview";
|
import { WorkloadsOverview } from "./overview";
|
||||||
import workloadsOverviewRouteInjectable from "../../../common/front-end-routing/routes/cluster/workloads/overview/workloads-overview-route.injectable";
|
import workloadsOverviewRouteInjectable from "../../../common/front-end-routing/routes/cluster/workloads/overview/workloads-overview-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const workloadsOverviewRouteComponentInjectable = getInjectable({
|
const workloadsOverviewRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "workloads-overview-route-component",
|
id: "workloads-overview-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(workloadsOverviewRouteInjectable),
|
|
||||||
Component: WorkloadsOverview,
|
Component: WorkloadsOverview,
|
||||||
}),
|
routeInjectable: workloadsOverviewRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default workloadsOverviewRouteComponentInjectable;
|
export default workloadsOverviewRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { Pods } from "./pods";
|
import { Pods } from "./pods";
|
||||||
import podsRouteInjectable from "../../../common/front-end-routing/routes/cluster/workloads/pods/pods-route.injectable";
|
import podsRouteInjectable from "../../../common/front-end-routing/routes/cluster/workloads/pods/pods-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const podsRouteComponentInjectable = getInjectable({
|
const podsRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "pods-route-component",
|
id: "pods-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(podsRouteInjectable),
|
|
||||||
Component: Pods,
|
Component: Pods,
|
||||||
}),
|
routeInjectable: podsRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default podsRouteComponentInjectable;
|
export default podsRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { ReplicaSets } from "./replicasets";
|
import { ReplicaSets } from "./replicasets";
|
||||||
import replicasetsRouteInjectable from "../../../common/front-end-routing/routes/cluster/workloads/replicasets/replicasets-route.injectable";
|
import replicasetsRouteInjectable from "../../../common/front-end-routing/routes/cluster/workloads/replicasets/replicasets-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const replicasetsRouteComponentInjectable = getInjectable({
|
const replicasetsRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "replicasets-route-component",
|
id: "replicasets-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(replicasetsRouteInjectable),
|
|
||||||
Component: ReplicaSets,
|
Component: ReplicaSets,
|
||||||
}),
|
routeInjectable: replicasetsRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default replicasetsRouteComponentInjectable;
|
export default replicasetsRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { ReplicationControllers } from "./replication-controllers";
|
import { ReplicationControllers } from "./replication-controllers";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
import replicationControllersRouteInjectable from "../../../common/front-end-routing/routes/cluster/workloads/replication-controllers/route.injectable";
|
import replicationControllersRouteInjectable from "../../../common/front-end-routing/routes/cluster/workloads/replication-controllers/route.injectable";
|
||||||
|
|
||||||
const replicationControllersRouteComponentInjectable = getInjectable({
|
const replicationControllersRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "replication-controller-route-component",
|
id: "replication-controller-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(replicationControllersRouteInjectable),
|
|
||||||
Component: ReplicationControllers,
|
Component: ReplicationControllers,
|
||||||
}),
|
routeInjectable: replicationControllersRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default replicationControllersRouteComponentInjectable;
|
export default replicationControllersRouteComponentInjectable;
|
||||||
|
|||||||
@ -2,20 +2,14 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import { StatefulSets } from "./statefulsets";
|
import { StatefulSets } from "./statefulsets";
|
||||||
import statefulsetsRouteInjectable from "../../../common/front-end-routing/routes/cluster/workloads/statefulsets/statefulsets-route.injectable";
|
import statefulsetsRouteInjectable from "../../../common/front-end-routing/routes/cluster/workloads/statefulsets/statefulsets-route.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../routes/route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "../../routes/route-specific-component-injection-token";
|
||||||
|
|
||||||
const statefulsetsRouteComponentInjectable = getInjectable({
|
const statefulsetsRouteComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: "statefulsets-route-component",
|
id: "statefulsets-route-component",
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(statefulsetsRouteInjectable),
|
|
||||||
Component: StatefulSets,
|
Component: StatefulSets,
|
||||||
}),
|
routeInjectable: statefulsetsRouteInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default statefulsetsRouteComponentInjectable;
|
export default statefulsetsRouteComponentInjectable;
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import { isEmpty, matches } from "lodash/fp";
|
|||||||
import { extensionRegistratorInjectionToken } from "../../extensions/extension-loader/extension-registrator-injection-token";
|
import { extensionRegistratorInjectionToken } from "../../extensions/extension-loader/extension-registrator-injection-token";
|
||||||
import { SiblingsInTabLayout } from "../components/layout/siblings-in-tab-layout";
|
import { SiblingsInTabLayout } from "../components/layout/siblings-in-tab-layout";
|
||||||
import extensionPageParametersInjectable from "./extension-page-parameters.injectable";
|
import extensionPageParametersInjectable from "./extension-page-parameters.injectable";
|
||||||
import { routeSpecificComponentInjectionToken } from "./route-specific-component-injection-token";
|
import { getRouteSpecificComponentInjectable } from "./route-specific-component-injection-token";
|
||||||
import type { IComputedValue } from "mobx";
|
import type { IComputedValue } from "mobx";
|
||||||
import { computed } from "mobx";
|
import { computed } from "mobx";
|
||||||
import { frontEndRouteInjectionToken } from "../../common/front-end-routing/front-end-route-injection-token";
|
import { frontEndRouteInjectionToken } from "../../common/front-end-routing/front-end-route-injection-token";
|
||||||
@ -62,12 +62,8 @@ const extensionRouteRegistratorInjectable = getInjectable({
|
|||||||
|
|
||||||
export default extensionRouteRegistratorInjectable;
|
export default extensionRouteRegistratorInjectable;
|
||||||
|
|
||||||
const toRouteInjectableFor =
|
const toRouteInjectableFor = (di: DiContainerForInjection, extension: LensRendererExtension) => (
|
||||||
(
|
(clusterFrame: boolean, getIsEnabled: (registration: PageRegistration) => IComputedValue<boolean>) => (
|
||||||
di: DiContainerForInjection,
|
|
||||||
extension: LensRendererExtension,
|
|
||||||
) =>
|
|
||||||
(clusterFrame: boolean, getIsEnabled: (registration: PageRegistration) => IComputedValue<boolean>) =>
|
|
||||||
(registration: PageRegistration) => {
|
(registration: PageRegistration) => {
|
||||||
const routeInjectable = getInjectable({
|
const routeInjectable = getInjectable({
|
||||||
id: `route-${registration.id ?? ""}-for-extension-${extension.sanitizedExtensionId}`,
|
id: `route-${registration.id ?? ""}-for-extension-${extension.sanitizedExtensionId}`,
|
||||||
@ -111,16 +107,13 @@ const toRouteInjectableFor =
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const routeSpecificComponentInjectable = getInjectable({
|
const routeSpecificComponentInjectable = getRouteSpecificComponentInjectable({
|
||||||
id: `route-${registration.id ?? ""}-component-for-extension-${extension.sanitizedExtensionId}`,
|
id: `route-${registration.id ?? ""}-component-for-extension-${extension.sanitizedExtensionId}`,
|
||||||
|
|
||||||
instantiate: (di) => ({
|
|
||||||
route: di.inject(routeInjectable),
|
|
||||||
Component,
|
Component,
|
||||||
}),
|
routeInjectable,
|
||||||
|
|
||||||
injectionToken: routeSpecificComponentInjectionToken,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return [routeInjectable, routeSpecificComponentInjectable];
|
return [routeInjectable, routeSpecificComponentInjectable];
|
||||||
};
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|||||||
@ -2,12 +2,28 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectionToken } from "@ogre-tools/injectable";
|
import type { Injectable } from "@ogre-tools/injectable";
|
||||||
|
import { getInjectable, getInjectionToken } from "@ogre-tools/injectable";
|
||||||
import type { Route } from "../../common/front-end-routing/front-end-route-injection-token";
|
import type { Route } from "../../common/front-end-routing/front-end-route-injection-token";
|
||||||
|
|
||||||
export const routeSpecificComponentInjectionToken = getInjectionToken<{
|
export const routeSpecificComponentInjectionToken = getInjectionToken<{
|
||||||
route: Route<unknown>;
|
route: Route<unknown>;
|
||||||
Component: React.ElementType<object>;
|
Component: React.ComponentType<unknown>;
|
||||||
}>({
|
}>({
|
||||||
id: "route-specific-component-injection-token",
|
id: "route-specific-component-injection-token",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export interface GetRouteSpecificComponentOptions<Params> {
|
||||||
|
id: string;
|
||||||
|
routeInjectable: Injectable<Route<Params>, Route<unknown>, void>;
|
||||||
|
Component: Params extends object ? React.ComponentType<Params> : React.ComponentType;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getRouteSpecificComponentInjectable = <Params>(options: GetRouteSpecificComponentOptions<Params>) => getInjectable({
|
||||||
|
id: options.id,
|
||||||
|
instantiate: (di) => ({
|
||||||
|
route: di.inject(options.routeInjectable),
|
||||||
|
Component: options.Component as React.ComponentType<unknown>,
|
||||||
|
}),
|
||||||
|
injectionToken: routeSpecificComponentInjectionToken,
|
||||||
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user