From fc21f855e1f9d4e68ab7b4cf6a515f1286b8d7eb Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Thu, 7 Apr 2022 08:56:34 -0400 Subject: [PATCH] revert move hostedCluster(Id) Signed-off-by: Sebastian Malton --- src/common/cluster-store/allowed-resources.injectable.ts | 2 +- .../cluster-store}/hosted-cluster-id.injectable.ts | 2 +- .../cluster-store}/hosted-cluster.injectable.ts | 2 +- src/renderer/api/create-terminal-api.injectable.ts | 2 +- .../cluster-frame-context/cluster-frame-context.injectable.ts | 2 +- src/renderer/components/+cluster/cluster-overview.tsx | 2 +- src/renderer/components/command-palette/command-container.tsx | 2 +- .../init-cluster-frame/init-cluster-frame.injectable.ts | 2 +- src/renderer/port-forward/about-port-forwarding.injectable.ts | 2 +- .../port-forward/notify-error-port-forwarding.injectable.ts | 2 +- src/renderer/utils/create-storage/create-storage.injectable.ts | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) rename src/{renderer/cluster => common/cluster-store}/hosted-cluster-id.injectable.ts (87%) rename src/{renderer/cluster => common/cluster-store}/hosted-cluster.injectable.ts (86%) diff --git a/src/common/cluster-store/allowed-resources.injectable.ts b/src/common/cluster-store/allowed-resources.injectable.ts index 3bb71e0af0..27ce2d510f 100644 --- a/src/common/cluster-store/allowed-resources.injectable.ts +++ b/src/common/cluster-store/allowed-resources.injectable.ts @@ -4,7 +4,7 @@ */ import { getInjectable } from "@ogre-tools/injectable"; import { comparer, computed } from "mobx"; -import hostedClusterInjectable from "../../renderer/cluster/hosted-cluster.injectable"; +import hostedClusterInjectable from "./hosted-cluster.injectable"; const allowedResourcesInjectable = getInjectable({ id: "allowed-resources", diff --git a/src/renderer/cluster/hosted-cluster-id.injectable.ts b/src/common/cluster-store/hosted-cluster-id.injectable.ts similarity index 87% rename from src/renderer/cluster/hosted-cluster-id.injectable.ts rename to src/common/cluster-store/hosted-cluster-id.injectable.ts index 854e004796..5a5c99c580 100644 --- a/src/renderer/cluster/hosted-cluster-id.injectable.ts +++ b/src/common/cluster-store/hosted-cluster-id.injectable.ts @@ -3,7 +3,7 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ import { getInjectable } from "@ogre-tools/injectable"; -import { getClusterIdFromHost } from "../../common/utils"; +import { getClusterIdFromHost } from "../utils"; const hostedClusterIdInjectable = getInjectable({ id: "hosted-cluster-id", diff --git a/src/renderer/cluster/hosted-cluster.injectable.ts b/src/common/cluster-store/hosted-cluster.injectable.ts similarity index 86% rename from src/renderer/cluster/hosted-cluster.injectable.ts rename to src/common/cluster-store/hosted-cluster.injectable.ts index a466984952..fa49cbca48 100644 --- a/src/renderer/cluster/hosted-cluster.injectable.ts +++ b/src/common/cluster-store/hosted-cluster.injectable.ts @@ -4,7 +4,7 @@ */ import { getInjectable } from "@ogre-tools/injectable"; import hostedClusterIdInjectable from "./hosted-cluster-id.injectable"; -import clusterStoreInjectable from "../../common/cluster-store/cluster-store.injectable"; +import clusterStoreInjectable from "./cluster-store.injectable"; const hostedClusterInjectable = getInjectable({ id: "hosted-cluster", diff --git a/src/renderer/api/create-terminal-api.injectable.ts b/src/renderer/api/create-terminal-api.injectable.ts index 23d181d726..8eb737dfe2 100644 --- a/src/renderer/api/create-terminal-api.injectable.ts +++ b/src/renderer/api/create-terminal-api.injectable.ts @@ -4,7 +4,7 @@ */ import { getInjectable } from "@ogre-tools/injectable"; import assert from "assert"; -import hostedClusterIdInjectable from "../cluster/hosted-cluster-id.injectable"; +import hostedClusterIdInjectable from "../../common/cluster-store/hosted-cluster-id.injectable"; import type { TerminalApiDependencies, TerminalApiQuery } from "./terminal-api"; import { TerminalApi } from "./terminal-api"; diff --git a/src/renderer/cluster-frame-context/cluster-frame-context.injectable.ts b/src/renderer/cluster-frame-context/cluster-frame-context.injectable.ts index e066a05102..d53f7df22d 100644 --- a/src/renderer/cluster-frame-context/cluster-frame-context.injectable.ts +++ b/src/renderer/cluster-frame-context/cluster-frame-context.injectable.ts @@ -5,7 +5,7 @@ import { getInjectable } from "@ogre-tools/injectable"; import { ClusterFrameContext } from "./cluster-frame-context"; import namespaceStoreInjectable from "../components/+namespaces/namespace-store/namespace-store.injectable"; -import hostedClusterInjectable from "../cluster/hosted-cluster.injectable"; +import hostedClusterInjectable from "../../common/cluster-store/hosted-cluster.injectable"; import assert from "assert"; const clusterFrameContextInjectable = getInjectable({ diff --git a/src/renderer/components/+cluster/cluster-overview.tsx b/src/renderer/components/+cluster/cluster-overview.tsx index 61098c3f0b..a618f2cc0d 100644 --- a/src/renderer/components/+cluster/cluster-overview.tsx +++ b/src/renderer/components/+cluster/cluster-overview.tsx @@ -25,7 +25,7 @@ import kubeWatchApiInjectable from "../../kube-watch-api/kube-watch-api.injectab import clusterOverviewStoreInjectable from "./cluster-overview-store/cluster-overview-store.injectable"; import type { SubscribeStores } from "../../kube-watch-api/kube-watch-api"; import type { Cluster } from "../../../common/cluster/cluster"; -import hostedClusterInjectable from "../../cluster/hosted-cluster.injectable"; +import hostedClusterInjectable from "../../../common/cluster-store/hosted-cluster.injectable"; import assert from "assert"; interface Dependencies { diff --git a/src/renderer/components/command-palette/command-container.tsx b/src/renderer/components/command-palette/command-container.tsx index 0225f5fe49..4569b4c31a 100644 --- a/src/renderer/components/command-palette/command-container.tsx +++ b/src/renderer/components/command-palette/command-container.tsx @@ -18,7 +18,7 @@ import { broadcastMessage, ipcRendererOn } from "../../../common/ipc"; import type { Disposer } from "../../utils"; import { withInjectables } from "@ogre-tools/injectable-react"; import windowAddEventListenerInjectable from "../../window/event-listener.injectable"; -import hostedClusterInjectable from "../../cluster/hosted-cluster.injectable"; +import hostedClusterInjectable from "../../../common/cluster-store/hosted-cluster.injectable"; import type { IComputedValue } from "mobx"; import matchedClusterIdInjectable from "../../navigation/matched-cluster-id.injectable"; diff --git a/src/renderer/frames/cluster-frame/init-cluster-frame/init-cluster-frame.injectable.ts b/src/renderer/frames/cluster-frame/init-cluster-frame/init-cluster-frame.injectable.ts index e8cd7491b6..1b2e145edf 100644 --- a/src/renderer/frames/cluster-frame/init-cluster-frame/init-cluster-frame.injectable.ts +++ b/src/renderer/frames/cluster-frame/init-cluster-frame/init-cluster-frame.injectable.ts @@ -7,7 +7,7 @@ import { initClusterFrame } from "./init-cluster-frame"; import extensionLoaderInjectable from "../../../../extensions/extension-loader/extension-loader.injectable"; import catalogEntityRegistryInjectable from "../../../api/catalog-entity-registry/catalog-entity-registry.injectable"; import frameRoutingIdInjectable from "./frame-routing-id/frame-routing-id.injectable"; -import hostedClusterInjectable from "../../../cluster/hosted-cluster.injectable"; +import hostedClusterInjectable from "../../../../common/cluster-store/hosted-cluster.injectable"; import appEventBusInjectable from "../../../../common/app-event-bus/app-event-bus.injectable"; import clusterFrameContextInjectable from "../../../cluster-frame-context/cluster-frame-context.injectable"; import assert from "assert"; diff --git a/src/renderer/port-forward/about-port-forwarding.injectable.ts b/src/renderer/port-forward/about-port-forwarding.injectable.ts index 05bdb9df5c..4656310964 100644 --- a/src/renderer/port-forward/about-port-forwarding.injectable.ts +++ b/src/renderer/port-forward/about-port-forwarding.injectable.ts @@ -5,7 +5,7 @@ import { getInjectable } from "@ogre-tools/injectable"; import { aboutPortForwarding } from "./port-forward-notify"; import navigateToPortForwardsInjectable from "../../common/front-end-routing/routes/cluster/network/port-forwards/navigate-to-port-forwards.injectable"; -import hostedClusterIdInjectable from "../cluster/hosted-cluster-id.injectable"; +import hostedClusterIdInjectable from "../../common/cluster-store/hosted-cluster-id.injectable"; import assert from "assert"; const aboutPortForwardingInjectable = getInjectable({ diff --git a/src/renderer/port-forward/notify-error-port-forwarding.injectable.ts b/src/renderer/port-forward/notify-error-port-forwarding.injectable.ts index 478f7fe7e0..9d4cd5caa7 100644 --- a/src/renderer/port-forward/notify-error-port-forwarding.injectable.ts +++ b/src/renderer/port-forward/notify-error-port-forwarding.injectable.ts @@ -5,7 +5,7 @@ import { getInjectable } from "@ogre-tools/injectable"; import { notifyErrorPortForwarding } from "./port-forward-notify"; import navigateToPortForwardsInjectable from "../../common/front-end-routing/routes/cluster/network/port-forwards/navigate-to-port-forwards.injectable"; -import hostedClusterIdInjectable from "../cluster/hosted-cluster-id.injectable"; +import hostedClusterIdInjectable from "../../common/cluster-store/hosted-cluster-id.injectable"; import assert from "assert"; const notifyErrorPortForwardingInjectable = getInjectable({ diff --git a/src/renderer/utils/create-storage/create-storage.injectable.ts b/src/renderer/utils/create-storage/create-storage.injectable.ts index 3f8e67fdee..b9b7fae39b 100644 --- a/src/renderer/utils/create-storage/create-storage.injectable.ts +++ b/src/renderer/utils/create-storage/create-storage.injectable.ts @@ -10,7 +10,7 @@ import writeJsonFileInjectable from "../../../common/fs/write-json-file.injectab import { observable } from "mobx"; import loggerInjectable from "../../../common/logger.injectable"; import getAbsolutePathInjectable from "../../../common/path/get-absolute-path.injectable"; -import hostedClusterIdInjectable from "../../cluster/hosted-cluster-id.injectable"; +import hostedClusterIdInjectable from "../../../common/cluster-store/hosted-cluster-id.injectable"; const createStorageInjectable = getInjectable({ id: "create-storage",