mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
26 lines
794 B
TypeScript
26 lines
794 B
TypeScript
/**
|
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
*/
|
|
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);
|
|
|
|
return (
|
|
tabId: string,
|
|
pod: IComputedValue<Pod | undefined>,
|
|
logTabData: IComputedValue<LogTabData>,
|
|
): Promise<void> => logStore.reload(tabId, pod, logTabData);
|
|
},
|
|
});
|
|
|
|
export default reloadLogsInjectable;
|