mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Make apiBase not an InjectionToken and make openNodeShellSession not special (#6774)
* Replace apiBaseInjectionToken with tokens for configuration instead Signed-off-by: Sebastian Malton <sebastian@malton.name> * Use new ordering to make openNodeShellSession non-special Signed-off-by: Sebastian Malton <sebastian@malton.name> Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
de789ff955
commit
5c6402b60a
33 files changed
+175
-133
No files matched your search
@@ -7,8 +7,8 @@ import { PortForwardStore } from "./port-forward-store";
|
||||
import type { ForwardedPort } from "../port-forward-item";
|
||||
import createStorageInjectable from "../../utils/create-storage/create-storage.injectable";
|
||||
import notifyErrorPortForwardingInjectable from "../notify-error-port-forwarding.injectable";
|
||||
import { apiBaseInjectionToken } from "../../../common/k8s-api/api-base";
|
||||
import requestActivePortForwardInjectable from "./request-active-port-forward.injectable";
|
||||
import apiBaseInjectable from "../../../common/k8s-api/api-base.injectable";
|
||||
|
||||
const portForwardStoreInjectable = getInjectable({
|
||||
id: "port-forward-store",
|
||||
@@ -22,7 +22,7 @@ const portForwardStoreInjectable = getInjectable({
|
||||
undefined,
|
||||
),
|
||||
notifyErrorPortForwarding: di.inject(notifyErrorPortForwardingInjectable),
|
||||
apiBase: di.inject(apiBaseInjectionToken),
|
||||
apiBase: di.inject(apiBaseInjectable),
|
||||
requestActivePortForward: di.inject(requestActivePortForwardInjectable),
|
||||
});
|
||||
},
|
||||
|
||||
+2
-2
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { apiBaseInjectionToken } from "../../../common/k8s-api/api-base";
|
||||
import apiBaseInjectable from "../../../common/k8s-api/api-base.injectable";
|
||||
import loggerInjectable from "../../../common/logger.injectable";
|
||||
import { urlBuilderFor } from "../../../common/utils/buildUrl";
|
||||
import type { ForwardedPort } from "../port-forward-item";
|
||||
@@ -16,7 +16,7 @@ const requestActiveEndpoint = urlBuilderFor("/pods/port-forward/:namespace/:kind
|
||||
const requestActivePortForwardInjectable = getInjectable({
|
||||
id: "request-active-port-forward",
|
||||
instantiate: (di): RequestActivePortForward => {
|
||||
const apiBase = di.inject(apiBaseInjectionToken);
|
||||
const apiBase = di.inject(apiBaseInjectable);
|
||||
const logger = di.inject(loggerInjectable);
|
||||
|
||||
return async ({ port, forwardPort, namespace, kind, name, ...rest }) => {
|
||||
|
||||
Reference in new issue
Block a user