mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Update injectable library (#4842)
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
This commit is contained in:
1 parent
e8ca1ddf87
commit
b65f6e00ec
231 files changed
+630
-613
No files matched your search
+3
-3
@@ -2,11 +2,13 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import type { TabId } from "../dock/store";
|
||||
import createResourceTabStoreInjectable from "./store.injectable";
|
||||
|
||||
const clearCreateResourceTabDataInjectable = getInjectable({
|
||||
id: "clear-create-resource-tab-data",
|
||||
|
||||
instantiate: (di) => {
|
||||
const createResourceTabStore = di.inject(createResourceTabStoreInjectable);
|
||||
|
||||
@@ -14,8 +16,6 @@ const clearCreateResourceTabDataInjectable = getInjectable({
|
||||
createResourceTabStore.clearData(tabId);
|
||||
};
|
||||
},
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default clearCreateResourceTabDataInjectable;
|
||||
@@ -2,11 +2,13 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import dockStoreInjectable from "../dock/store.injectable";
|
||||
import { DockTabCreateSpecific, TabKind } from "../dock/store";
|
||||
|
||||
const createResourceTabInjectable = getInjectable({
|
||||
id: "create-resource-tab",
|
||||
|
||||
instantiate: (di) => {
|
||||
const dockStore = di.inject(dockStoreInjectable);
|
||||
|
||||
@@ -17,8 +19,6 @@ const createResourceTabInjectable = getInjectable({
|
||||
kind: TabKind.CREATE_RESOURCE,
|
||||
});
|
||||
},
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default createResourceTabInjectable;
|
||||
+3
-3
@@ -2,7 +2,7 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { computed } from "mobx";
|
||||
import type { GroupSelectOption, SelectOption } from "../../select";
|
||||
import userCreateResourceTemplatesInjectable from "./user-templates.injectable";
|
||||
@@ -11,6 +11,8 @@ import lensCreateResourceTemplatesInjectable from "./lens-templates.injectable";
|
||||
export type RawTemplates = [group: string, items: [file: string, contents: string][]];
|
||||
|
||||
const createResourceTemplatesInjectable = getInjectable({
|
||||
id: "create-resource-templates",
|
||||
|
||||
instantiate: async (di) => {
|
||||
const lensResourceTemplates = await di.inject(lensCreateResourceTemplatesInjectable);
|
||||
const userResourceTemplates = di.inject(userCreateResourceTemplatesInjectable);
|
||||
@@ -27,8 +29,6 @@ const createResourceTemplatesInjectable = getInjectable({
|
||||
}) as GroupSelectOption<SelectOption<string>>);
|
||||
});
|
||||
},
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default createResourceTemplatesInjectable;
|
||||
@@ -2,7 +2,7 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import path from "path";
|
||||
import { hasCorrectExtension } from "./has-correct-extension";
|
||||
import "../../../../common/vars";
|
||||
@@ -33,6 +33,8 @@ async function getTemplates({ readDir, readFile }: Dependencies) {
|
||||
}
|
||||
|
||||
const lensCreateResourceTemplatesInjectable = getInjectable({
|
||||
id: "lens-create-resource-templates",
|
||||
|
||||
instantiate: async (di): Promise<RawTemplates> => {
|
||||
const templates = await getTemplates({
|
||||
readFile: di.inject(readFileInjectable),
|
||||
@@ -41,8 +43,6 @@ const lensCreateResourceTemplatesInjectable = getInjectable({
|
||||
|
||||
return ["lens", templates];
|
||||
},
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default lensCreateResourceTemplatesInjectable;
|
||||
@@ -2,16 +2,16 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { CreateResourceTabStore } from "./store";
|
||||
import createStorageInjectable from "../../../utils/create-storage/create-storage.injectable";
|
||||
|
||||
const createResourceTabStoreInjectable = getInjectable({
|
||||
id: "create-resource-tab-store",
|
||||
|
||||
instantiate: (di) => new CreateResourceTabStore({
|
||||
createStorage: di.inject(createStorageInjectable),
|
||||
}),
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default createResourceTabStoreInjectable;
|
||||
@@ -2,7 +2,7 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { computed, IComputedValue, observable } from "mobx";
|
||||
import path from "path";
|
||||
import os from "os";
|
||||
@@ -95,8 +95,8 @@ function watchUserCreateResourceTemplates(): IComputedValue<RawTemplates[]> {
|
||||
}
|
||||
|
||||
const userCreateResourceTemplatesInjectable = getInjectable({
|
||||
id: "user-create-resource-templates",
|
||||
instantiate: () => watchUserCreateResourceTemplates(),
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default userCreateResourceTemplatesInjectable;
|
||||
@@ -2,11 +2,13 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { DockTabStore, DockTabStoreOptions } from "./dock-tab.store";
|
||||
import createStorageInjectable from "../../../utils/create-storage/create-storage.injectable";
|
||||
|
||||
const createDockTabStoreInjectable = getInjectable({
|
||||
id: "create-dock-tab-store",
|
||||
|
||||
instantiate: (di) => {
|
||||
const dependencies = {
|
||||
createStorage: di.inject(createStorageInjectable),
|
||||
@@ -14,8 +16,6 @@ const createDockTabStoreInjectable = getInjectable({
|
||||
|
||||
return <T>(options: DockTabStoreOptions = {}) => new DockTabStore<T>(dependencies, options);
|
||||
},
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default createDockTabStoreInjectable;
|
||||
@@ -2,11 +2,13 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import type { TabId } from "./store";
|
||||
import dockStoreInjectable from "./store.injectable";
|
||||
|
||||
const closeDockTabInjectable = getInjectable({
|
||||
id: "close-dock-tab",
|
||||
|
||||
instantiate: (di) => {
|
||||
const dockStore = di.inject(dockStoreInjectable);
|
||||
|
||||
@@ -14,8 +16,6 @@ const closeDockTabInjectable = getInjectable({
|
||||
dockStore.closeTab(tabId);
|
||||
};
|
||||
},
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default closeDockTabInjectable;
|
||||
@@ -2,19 +2,19 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import dockStoreInjectable from "./store.injectable";
|
||||
import type { DockTab, DockTabCreate } from "./store";
|
||||
|
||||
const createDockTabInjectable = getInjectable({
|
||||
id: "create-dock-tab",
|
||||
|
||||
instantiate: (di) => {
|
||||
const dockStore = di.inject(dockStoreInjectable);
|
||||
|
||||
return (rawTabDesc: DockTabCreate, addNumber?: boolean): DockTab =>
|
||||
dockStore.createTab(rawTabDesc, addNumber);
|
||||
},
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default createDockTabInjectable;
|
||||
@@ -2,11 +2,13 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import createStorageInjectable from "../../../utils/create-storage/create-storage.injectable";
|
||||
import { DockStorageState, TabKind } from "./store";
|
||||
|
||||
const dockStorageInjectable = getInjectable({
|
||||
id: "dock-storage",
|
||||
|
||||
instantiate: (di) => {
|
||||
const createStorage = di.inject(createStorageInjectable);
|
||||
|
||||
@@ -22,8 +24,6 @@ const dockStorageInjectable = getInjectable({
|
||||
],
|
||||
});
|
||||
},
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default dockStorageInjectable;
|
||||
@@ -2,11 +2,12 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import dockStoreInjectable from "./store.injectable";
|
||||
import type { TabId } from "./store";
|
||||
|
||||
const renameTabInjectable = getInjectable({
|
||||
id: "rename-tab",
|
||||
|
||||
instantiate: (di) => {
|
||||
const dockStore = di.inject(dockStoreInjectable);
|
||||
@@ -15,8 +16,6 @@ const renameTabInjectable = getInjectable({
|
||||
dockStore.renameTab(tabId, title);
|
||||
};
|
||||
},
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default renameTabInjectable;
|
||||
@@ -2,11 +2,13 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import type { TabId } from "./store";
|
||||
import dockStoreInjectable from "./store.injectable";
|
||||
|
||||
const selectDockTabInjectable = getInjectable({
|
||||
id: "select-dock-tab",
|
||||
|
||||
instantiate: (di) => {
|
||||
const dockStore = di.inject(dockStoreInjectable);
|
||||
|
||||
@@ -14,8 +16,6 @@ const selectDockTabInjectable = getInjectable({
|
||||
dockStore.selectTab(tabId);
|
||||
};
|
||||
},
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default selectDockTabInjectable;
|
||||
@@ -2,7 +2,7 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { DockStore, TabKind } from "./store";
|
||||
import dockStorageInjectable from "./dock-storage.injectable";
|
||||
import clearLogTabDataInjectable from "../logs/clear-log-tab-data.injectable";
|
||||
@@ -14,6 +14,8 @@ import clearInstallChartTabDataInjectable from "../install-chart/clear-install-c
|
||||
import isLogsTabDataValidInjectable from "../logs/is-logs-tab-data-valid.injectable";
|
||||
|
||||
const dockStoreInjectable = getInjectable({
|
||||
id: "dock-store",
|
||||
|
||||
instantiate: (di) => new DockStore({
|
||||
storage: di.inject(dockStorageInjectable),
|
||||
tabDataClearers: {
|
||||
@@ -28,8 +30,6 @@ const dockStoreInjectable = getInjectable({
|
||||
[TabKind.POD_LOGS]: di.inject(isLogsTabDataValidInjectable),
|
||||
},
|
||||
}),
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default dockStoreInjectable;
|
||||
+3
-3
@@ -2,11 +2,13 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import type { TabId } from "../dock/store";
|
||||
import editResourceTabStoreInjectable from "./store.injectable";
|
||||
|
||||
const clearEditResourceTabDataInjectable = getInjectable({
|
||||
id: "clear-edit-resource-tab",
|
||||
|
||||
instantiate: (di) => {
|
||||
const editResourceTabStore = di.inject(editResourceTabStoreInjectable);
|
||||
|
||||
@@ -14,8 +16,6 @@ const clearEditResourceTabDataInjectable = getInjectable({
|
||||
editResourceTabStore.clearData(tabId);
|
||||
};
|
||||
},
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default clearEditResourceTabDataInjectable;
|
||||
@@ -2,7 +2,7 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import editResourceTabStoreInjectable from "./store.injectable";
|
||||
import dockStoreInjectable from "../dock/store.injectable";
|
||||
import type { KubeObject } from "../../../../common/k8s-api/kube-object";
|
||||
@@ -45,12 +45,12 @@ const createEditResourceTab = ({ dockStore, editResourceStore }: Dependencies) =
|
||||
};
|
||||
|
||||
const createEditResourceTabInjectable = getInjectable({
|
||||
id: "create-edit-resource-tab",
|
||||
|
||||
instantiate: (di) => createEditResourceTab({
|
||||
dockStore: di.inject(dockStoreInjectable),
|
||||
editResourceStore: di.inject(editResourceTabStoreInjectable),
|
||||
}),
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default createEditResourceTabInjectable;
|
||||
@@ -2,16 +2,16 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { EditResourceTabStore } from "./store";
|
||||
import createStorageInjectable from "../../../utils/create-storage/create-storage.injectable";
|
||||
|
||||
const editResourceTabStoreInjectable = getInjectable({
|
||||
id: "edit-resource-tab-store",
|
||||
|
||||
instantiate: (di) => new EditResourceTabStore({
|
||||
createStorage: di.inject(createStorageInjectable),
|
||||
}),
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default editResourceTabStoreInjectable;
|
||||
+3
-3
@@ -2,11 +2,13 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import type { TabId } from "../dock/store";
|
||||
import installChartTabStoreInjectable from "./store.injectable";
|
||||
|
||||
const clearInstallChartTabDataInjectable = getInjectable({
|
||||
id: "clear-install-chart-tab-data",
|
||||
|
||||
instantiate: (di) => {
|
||||
const installChartTabStore = di.inject(installChartTabStoreInjectable);
|
||||
|
||||
@@ -14,8 +16,6 @@ const clearInstallChartTabDataInjectable = getInjectable({
|
||||
installChartTabStore.clearData(tabId);
|
||||
};
|
||||
},
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default clearInstallChartTabDataInjectable;
|
||||
@@ -2,7 +2,7 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import installChartTabStoreInjectable from "./store.injectable";
|
||||
import type { HelmChart } from "../../../../common/k8s-api/endpoints/helm-charts.api";
|
||||
import {
|
||||
@@ -44,12 +44,12 @@ const createInstallChartTab = ({ createDockTab, installChartStore }: Dependencie
|
||||
};
|
||||
|
||||
const createInstallChartTabInjectable = getInjectable({
|
||||
id: "create-install-chart-tab",
|
||||
|
||||
instantiate: (di) => createInstallChartTab({
|
||||
installChartStore: di.inject(installChartTabStoreInjectable),
|
||||
createDockTab: di.inject(createDockTabInjectable),
|
||||
}),
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default createInstallChartTabInjectable;
|
||||
@@ -2,13 +2,15 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { InstallChartTabStore } from "./store";
|
||||
import createDockTabStoreInjectable from "../dock-tab-store/create-dock-tab-store.injectable";
|
||||
import type { IReleaseUpdateDetails } from "../../../../common/k8s-api/endpoints/helm-releases.api";
|
||||
import createStorageInjectable from "../../../utils/create-storage/create-storage.injectable";
|
||||
|
||||
const installChartTabStoreInjectable = getInjectable({
|
||||
id: "install-chart-tab-store",
|
||||
|
||||
instantiate: (di) => {
|
||||
const createDockTabStore = di.inject(createDockTabStoreInjectable);
|
||||
|
||||
@@ -18,7 +20,6 @@ const installChartTabStoreInjectable = getInjectable({
|
||||
detailsStore: createDockTabStore<IReleaseUpdateDetails>(),
|
||||
});
|
||||
},
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default installChartTabStoreInjectable;
|
||||
@@ -2,18 +2,18 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import type { TabId } from "../dock/store";
|
||||
import logStoreInjectable from "./store.injectable";
|
||||
|
||||
const areLogsPresentInjectable = getInjectable({
|
||||
id: "are-logs-present",
|
||||
|
||||
instantiate: (di) => {
|
||||
const logStore = di.inject(logStoreInjectable);
|
||||
|
||||
return (tabId: TabId) => logStore.areLogsPresent(tabId);
|
||||
},
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default areLogsPresentInjectable;
|
||||
@@ -2,12 +2,12 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { podsApi } from "../../../../common/k8s-api/endpoints";
|
||||
|
||||
const callForLogsInjectable = getInjectable({
|
||||
id: "call-for-logs",
|
||||
instantiate: () => podsApi.getLogs,
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default callForLogsInjectable;
|
||||
@@ -2,11 +2,13 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import type { TabId } from "../dock/store";
|
||||
import logTabStoreInjectable from "./tab-store.injectable";
|
||||
|
||||
const clearLogTabDataInjectable = getInjectable({
|
||||
id: "clear-log-tab-data",
|
||||
|
||||
instantiate: (di) => {
|
||||
const logTabStore = di.inject(logTabStoreInjectable);
|
||||
|
||||
@@ -14,8 +16,6 @@ const clearLogTabDataInjectable = getInjectable({
|
||||
logTabStore.clearData(tabId);
|
||||
};
|
||||
},
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default clearLogTabDataInjectable;
|
||||
@@ -2,7 +2,7 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { DockTabCreate, DockTab, TabKind, TabId } from "../dock/store";
|
||||
import type { LogTabData } from "./tab-store";
|
||||
import * as uuid from "uuid";
|
||||
@@ -37,12 +37,12 @@ const createLogsTab = ({ createDockTab, setLogTabData }: Dependencies) => (title
|
||||
};
|
||||
|
||||
const createLogsTabInjectable = getInjectable({
|
||||
id: "create-logs-tab",
|
||||
|
||||
instantiate: (di) => createLogsTab({
|
||||
createDockTab: di.inject(createDockTabInjectable),
|
||||
setLogTabData: di.inject(setLogTabDataInjectable),
|
||||
}),
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default createLogsTabInjectable;
|
||||
@@ -2,7 +2,7 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import type { IPodContainer, Pod } from "../../../../common/k8s-api/endpoints";
|
||||
import type { TabId } from "../dock/store";
|
||||
import createLogsTabInjectable from "./create-logs-tab.injectable";
|
||||
@@ -13,6 +13,8 @@ export interface PodLogsTabData {
|
||||
}
|
||||
|
||||
const createPodLogsTabInjectable = getInjectable({
|
||||
id: "create-pod-logs-tab",
|
||||
|
||||
instantiate: (di) => {
|
||||
const createLogsTab = di.inject(createLogsTabInjectable);
|
||||
|
||||
@@ -24,8 +26,6 @@ const createPodLogsTabInjectable = getInjectable({
|
||||
selectedPodId: selectedPod.getId(),
|
||||
});
|
||||
},
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default createPodLogsTabInjectable;
|
||||
@@ -2,7 +2,7 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { podsStore } from "../../+workloads-pods/pods.store";
|
||||
import type { WorkloadKubeObject } from "../../../../common/k8s-api/workload-kube-object";
|
||||
import type { TabId } from "../dock/store";
|
||||
@@ -38,11 +38,11 @@ const createWorkloadLogsTab = ({ createLogsTab }: Dependencies) => ({ workload }
|
||||
};
|
||||
|
||||
const createWorkloadLogsTabInjectable = getInjectable({
|
||||
id: "create-workload-logs-tab",
|
||||
|
||||
instantiate: (di) => createWorkloadLogsTab({
|
||||
createLogsTab: di.inject(createLogsTabInjectable),
|
||||
}),
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default createWorkloadLogsTabInjectable;
|
||||
@@ -2,18 +2,18 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import type { LogTabData } from "./tab-store";
|
||||
import logTabStoreInjectable from "./tab-store.injectable";
|
||||
|
||||
const getLogTabDataInjectable = getInjectable({
|
||||
id: "get-log-tab-data",
|
||||
|
||||
instantiate: (di) => {
|
||||
const logTabStore = di.inject(logTabStoreInjectable);
|
||||
|
||||
return (tabId: string): LogTabData => logTabStore.getData(tabId);
|
||||
},
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default getLogTabDataInjectable;
|
||||
@@ -2,18 +2,18 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import logStoreInjectable from "./store.injectable";
|
||||
|
||||
const getLogsWithoutTimestampsInjectable = getInjectable({
|
||||
id: "get-logs-without-timestamps",
|
||||
|
||||
instantiate: (di) => {
|
||||
const logStore = di.inject(logStoreInjectable);
|
||||
|
||||
return (tabId: string): string[] =>
|
||||
logStore.getLogsWithoutTimestamps(tabId);
|
||||
},
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default getLogsWithoutTimestampsInjectable;
|
||||
@@ -2,17 +2,17 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import logStoreInjectable from "./store.injectable";
|
||||
|
||||
const getLogsInjectable = getInjectable({
|
||||
id: "get-logs",
|
||||
|
||||
instantiate: (di) => {
|
||||
const logStore = di.inject(logStoreInjectable);
|
||||
|
||||
return (tabId: string): string[] => logStore.getLogs(tabId);
|
||||
},
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default getLogsInjectable;
|
||||
@@ -2,18 +2,18 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import logStoreInjectable from "./store.injectable";
|
||||
|
||||
const getTimestampSplitLogsInjectable = getInjectable({
|
||||
id: "get-timestamp-split-logs",
|
||||
|
||||
instantiate: (di) => {
|
||||
const logStore = di.inject(logStoreInjectable);
|
||||
|
||||
return (tabId: string): [string, string][] =>
|
||||
logStore.getTimestampSplitLogs(tabId);
|
||||
},
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default getTimestampSplitLogsInjectable;
|
||||
@@ -2,18 +2,18 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import type { TabId } from "../dock/store";
|
||||
import logTabStoreInjectable from "./tab-store.injectable";
|
||||
|
||||
const isLogsTabDataValidInjectable = getInjectable({
|
||||
id: "is-logs-tab-data-valid",
|
||||
|
||||
instantiate: (di) => {
|
||||
const logTabStore = di.inject(logTabStoreInjectable);
|
||||
|
||||
return (tabId: TabId) => logTabStore.isDataValid(tabId);
|
||||
},
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default isLogsTabDataValidInjectable;
|
||||
@@ -2,13 +2,15 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import type { IComputedValue } from "mobx";
|
||||
import type { Pod } from "../../../../common/k8s-api/endpoints";
|
||||
import logStoreInjectable from "./store.injectable";
|
||||
import type { LogTabData } from "./tab-store";
|
||||
|
||||
const loadLogsInjectable = getInjectable({
|
||||
id: "load-logs",
|
||||
|
||||
instantiate: (di) => {
|
||||
const logStore = di.inject(logStoreInjectable);
|
||||
|
||||
@@ -18,8 +20,6 @@ const loadLogsInjectable = getInjectable({
|
||||
logTabData: IComputedValue<LogTabData>,
|
||||
): Promise<void> => logStore.load(tabId, pod, logTabData);
|
||||
},
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default loadLogsInjectable;
|
||||
@@ -23,6 +23,8 @@ export interface InstantiateArgs {
|
||||
}
|
||||
|
||||
const logsViewModelInjectable = getInjectable({
|
||||
id: "logs-view-model",
|
||||
|
||||
instantiate: (di, { tabId }: InstantiateArgs) => new LogTabViewModel(tabId, {
|
||||
getLogs: di.inject(getLogsInjectable),
|
||||
getLogsWithoutTimestamps: di.inject(getLogsWithoutTimestampsInjectable),
|
||||
|
||||
@@ -2,13 +2,15 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import type { IComputedValue } from "mobx";
|
||||
import type { Pod } from "../../../../common/k8s-api/endpoints";
|
||||
import logStoreInjectable from "./store.injectable";
|
||||
import type { LogTabData } from "./tab-store";
|
||||
|
||||
const reloadLogsInjectable = getInjectable({
|
||||
id: "reload-logs",
|
||||
|
||||
instantiate: (di) => {
|
||||
const logStore = di.inject(logStoreInjectable);
|
||||
|
||||
@@ -18,8 +20,6 @@ const reloadLogsInjectable = getInjectable({
|
||||
logTabData: IComputedValue<LogTabData>,
|
||||
): Promise<void> => logStore.reload(tabId, pod, logTabData);
|
||||
},
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default reloadLogsInjectable;
|
||||
@@ -2,18 +2,18 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import type { LogTabData } from "./tab-store";
|
||||
import logTabStoreInjectable from "./tab-store.injectable";
|
||||
|
||||
const setLogTabDataInjectable = getInjectable({
|
||||
id: "set-log-tab-data",
|
||||
|
||||
instantiate: (di) => {
|
||||
const logTabStore = di.inject(logTabStoreInjectable);
|
||||
|
||||
return (tabId: string, data: LogTabData): void => logTabStore.setData(tabId, data);
|
||||
},
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default setLogTabDataInjectable;
|
||||
@@ -2,17 +2,17 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import logStoreInjectable from "./store.injectable";
|
||||
|
||||
const stopLoadingLogsInjectable = getInjectable({
|
||||
id: "stop-loading-logs",
|
||||
|
||||
instantiate: (di) => {
|
||||
const logStore = di.inject(logStoreInjectable);
|
||||
|
||||
return (tabId: string): void => logStore.stopLoadingLogs(tabId);
|
||||
},
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default stopLoadingLogsInjectable;
|
||||
@@ -2,16 +2,16 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { LogStore } from "./store";
|
||||
import callForLogsInjectable from "./call-for-logs.injectable";
|
||||
|
||||
const logStoreInjectable = getInjectable({
|
||||
id: "log-store",
|
||||
|
||||
instantiate: (di) => new LogStore({
|
||||
callForLogs: di.inject(callForLogsInjectable),
|
||||
}),
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default logStoreInjectable;
|
||||
@@ -2,16 +2,16 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { LogTabStore } from "./tab-store";
|
||||
import createStorageInjectable from "../../../utils/create-storage/create-storage.injectable";
|
||||
|
||||
const logTabStoreInjectable = getInjectable({
|
||||
id: "log-tab-store",
|
||||
|
||||
instantiate: (di) => new LogTabStore({
|
||||
createStorage: di.inject(createStorageInjectable),
|
||||
}),
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default logTabStoreInjectable;
|
||||
@@ -2,11 +2,13 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import type { TabId } from "../dock/store";
|
||||
import terminalStoreInjectable from "./store.injectable";
|
||||
|
||||
const clearTerminalTabDataInjectable = getInjectable({
|
||||
id: "clear-terminal-tab-data",
|
||||
|
||||
instantiate: (di) => {
|
||||
const terminalStore = di.inject(terminalStoreInjectable);
|
||||
|
||||
@@ -14,8 +16,6 @@ const clearTerminalTabDataInjectable = getInjectable({
|
||||
terminalStore.destroy(tabId);
|
||||
};
|
||||
},
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default clearTerminalTabDataInjectable;
|
||||
@@ -2,11 +2,13 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import dockStoreInjectable from "../dock/store.injectable";
|
||||
import { DockTabCreateSpecific, TabKind } from "../dock/store";
|
||||
|
||||
const createTerminalTabInjectable = getInjectable({
|
||||
id: "create-terminal-tab",
|
||||
|
||||
instantiate: (di) => {
|
||||
const dockStore = di.inject(dockStoreInjectable);
|
||||
|
||||
@@ -17,8 +19,6 @@ const createTerminalTabInjectable = getInjectable({
|
||||
kind: TabKind.TERMINAL,
|
||||
});
|
||||
},
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default createTerminalTabInjectable;
|
||||
@@ -2,14 +2,14 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { Terminal } from "./terminal";
|
||||
import type { TabId } from "../dock/store";
|
||||
import type { TerminalApi } from "../../../api/terminal-api";
|
||||
|
||||
const createTerminalInjectable = getInjectable({
|
||||
id: "create-terminal",
|
||||
instantiate: () => (tabId: TabId, api: TerminalApi) => new Terminal(tabId, api),
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default createTerminalInjectable;
|
||||
@@ -2,19 +2,19 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import type { TerminalApi } from "../../../api/terminal-api";
|
||||
import type { TabId } from "../dock/store";
|
||||
import terminalStoreInjectable from "./store.injectable";
|
||||
|
||||
const getTerminalApiInjectable = getInjectable({
|
||||
id: "get-terminal-api",
|
||||
|
||||
instantiate: (di) => {
|
||||
const terminalStore = di.inject(terminalStoreInjectable);
|
||||
|
||||
return (tabId: TabId): TerminalApi => terminalStore.getTerminalApi(tabId);
|
||||
},
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default getTerminalApiInjectable;
|
||||
@@ -2,7 +2,7 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { when } from "mobx";
|
||||
import { TerminalApi, TerminalChannels } from "../../../api/terminal-api";
|
||||
import { noop } from "../../../utils";
|
||||
@@ -79,13 +79,13 @@ const sendCommand = ({ selectTab, createTerminalTab, getTerminalApi }: Dependenc
|
||||
};
|
||||
|
||||
const sendCommandInjectable = getInjectable({
|
||||
id: "send-command",
|
||||
|
||||
instantiate: (di) => sendCommand({
|
||||
createTerminalTab: di.inject(createTerminalTabInjectable),
|
||||
selectTab: di.inject(selectDockTabInjectable),
|
||||
getTerminalApi: di.inject(getTerminalApiInjectable),
|
||||
}),
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default sendCommandInjectable;
|
||||
@@ -2,16 +2,16 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { TerminalStore } from "./store";
|
||||
import createTerminalInjectable from "./create-terminal.injectable";
|
||||
|
||||
const terminalStoreInjectable = getInjectable({
|
||||
id: "terminal-store",
|
||||
|
||||
instantiate: (di) => new TerminalStore({
|
||||
createTerminal: di.inject(createTerminalInjectable),
|
||||
}),
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default terminalStoreInjectable;
|
||||
+3
-3
@@ -2,11 +2,13 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import type { TabId } from "../dock/store";
|
||||
import upgradeChartTabStoreInjectable from "./store.injectable";
|
||||
|
||||
const clearUpgradeChartTabDataInjectable = getInjectable({
|
||||
id: "clear-upgrade-chart-tab-data",
|
||||
|
||||
instantiate: (di) => {
|
||||
const upgradeChartTabStore = di.inject(upgradeChartTabStoreInjectable);
|
||||
|
||||
@@ -14,8 +16,6 @@ const clearUpgradeChartTabDataInjectable = getInjectable({
|
||||
upgradeChartTabStore.clearData(tabId);
|
||||
};
|
||||
},
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default clearUpgradeChartTabDataInjectable;
|
||||
@@ -2,7 +2,7 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import upgradeChartTabStoreInjectable from "./store.injectable";
|
||||
import dockStoreInjectable from "../dock/store.injectable";
|
||||
import type { HelmRelease } from "../../../../common/k8s-api/endpoints/helm-releases.api";
|
||||
@@ -45,12 +45,12 @@ const createUpgradeChartTab = ({ upgradeChartStore, dockStore }: Dependencies) =
|
||||
};
|
||||
|
||||
const createUpgradeChartTabInjectable = getInjectable({
|
||||
id: "create-upgrade-chart-tab",
|
||||
|
||||
instantiate: (di) => createUpgradeChartTab({
|
||||
upgradeChartStore: di.inject(upgradeChartTabStoreInjectable),
|
||||
dockStore: di.inject(dockStoreInjectable),
|
||||
}),
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default createUpgradeChartTabInjectable;
|
||||
@@ -2,12 +2,14 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { UpgradeChartTabStore } from "./store";
|
||||
import createDockTabStoreInjectable from "../dock-tab-store/create-dock-tab-store.injectable";
|
||||
import createStorageInjectable from "../../../utils/create-storage/create-storage.injectable";
|
||||
|
||||
const upgradeChartTabStoreInjectable = getInjectable({
|
||||
id: "upgrade-chart-tab-store",
|
||||
|
||||
instantiate: (di) => {
|
||||
const createDockTabStore = di.inject(createDockTabStoreInjectable);
|
||||
|
||||
@@ -16,8 +18,6 @@ const upgradeChartTabStoreInjectable = getInjectable({
|
||||
valuesStore: createDockTabStore<string>(),
|
||||
});
|
||||
},
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default upgradeChartTabStoreInjectable;
|
||||
Reference in new issue
Block a user