mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Replace logsViewModelInjectable lifecycle
to keyedSingleton Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
de6f339fec
commit
daf3fb92ea
@ -28,7 +28,7 @@ export interface InstantiateArgs {
|
|||||||
const logsViewModelInjectable = getInjectable({
|
const logsViewModelInjectable = getInjectable({
|
||||||
id: "logs-view-model",
|
id: "logs-view-model",
|
||||||
|
|
||||||
instantiate: (di, { tabId }: InstantiateArgs) => new LogTabViewModel(tabId, {
|
instantiate: async (di, tabId: TabId) => new LogTabViewModel(tabId, {
|
||||||
getLogs: di.inject(getLogsInjectable),
|
getLogs: di.inject(getLogsInjectable),
|
||||||
getLogsWithoutTimestamps: di.inject(getLogsWithoutTimestampsInjectable),
|
getLogsWithoutTimestamps: di.inject(getLogsWithoutTimestampsInjectable),
|
||||||
getTimestampSplitLogs: di.inject(getTimestampSplitLogsInjectable),
|
getTimestampSplitLogs: di.inject(getTimestampSplitLogsInjectable),
|
||||||
@ -45,7 +45,10 @@ const logsViewModelInjectable = getInjectable({
|
|||||||
downloadAllLogs: di.inject(downloadAllLogsInjectable),
|
downloadAllLogs: di.inject(downloadAllLogsInjectable),
|
||||||
searchStore: di.inject(searchStoreInjectable),
|
searchStore: di.inject(searchStoreInjectable),
|
||||||
}),
|
}),
|
||||||
lifecycle: lifecycleEnum.transient,
|
|
||||||
|
lifecycle: lifecycleEnum.keyedSingleton({
|
||||||
|
getInstanceKey: (di, tabId: TabId) => `log-tab-view-model-${tabId}}`,
|
||||||
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
export default logsViewModelInjectable;
|
export default logsViewModelInjectable;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user