mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
- Pod logs are now independent of the namespace select filter - The logs list now shows a spinner while loading Signed-off-by: Sebastian Malton <sebastian@malton.name>
27 lines
794 B
TypeScript
27 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, lifecycleEnum } from "@ogre-tools/injectable";
|
|
import { bind } from "../../../utils";
|
|
import type { TabId } from "../dock/store";
|
|
import type { LogStore } from "./store";
|
|
import logStoreInjectable from "./store.injectable";
|
|
|
|
interface Dependencies {
|
|
logStore: LogStore;
|
|
}
|
|
|
|
function areLogsPresent({ logStore }: Dependencies, tabId: TabId) {
|
|
return logStore.areLogsPresent(tabId);
|
|
}
|
|
|
|
const areLogsPresentInjectable = getInjectable({
|
|
instantiate: (di) => bind(areLogsPresent, null, {
|
|
logStore: di.inject(logStoreInjectable),
|
|
}),
|
|
lifecycle: lifecycleEnum.singleton,
|
|
});
|
|
|
|
export default areLogsPresentInjectable;
|