1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/src/renderer/components/dock/logs/store.injectable.ts
Sebastian Malton 3862122031 Full dependency inversion of <Dock> and all current tab kinds
- Fixes pod logs not working on initial load

- Removes DockStore as a dependency of all *TabStore

- Removes all the reactions about loading new data from the stores

- Removes dependencies on selectedTabId from all *TabStore's

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2022-01-25 17:23:58 -05:00

20 lines
643 B
TypeScript

/**
* 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 { LogStore } from "./store";
import callForLogsInjectable from "./call-for-logs.injectable";
import { podsStore } from "../../+workloads-pods/pods.store";
const logStoreInjectable = getInjectable({
instantiate: (di) => new LogStore({
callForLogs: di.inject(callForLogsInjectable),
getPodById: id => podsStore.getById(id),
}),
lifecycle: lifecycleEnum.singleton,
});
export default logStoreInjectable;