1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Await logs view model to instantiate

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2023-02-16 14:52:12 +03:00
parent daf3fb92ea
commit 902bcd7b67

View File

@ -20,6 +20,7 @@ import type { SubscribeStores } from "../../../kube-watch-api/kube-watch-api";
import subscribeStoresInjectable from "../../../kube-watch-api/subscribe-stores.injectable";
import type { PodStore } from "../../+workloads-pods/store";
import podStoreInjectable from "../../+workloads-pods/store.injectable";
import { Spinner } from "../../spinner";
export interface LogsDockTabProps {
className?: string;
@ -99,11 +100,11 @@ const NonInjectedLogsDockTab = observer(({
export const LogsDockTab = withInjectables<Dependencies, LogsDockTabProps>(NonInjectedLogsDockTab, {
getProps: (di, props) => ({
getPlaceholder: () => <Spinner center data-testid="pod-logs-tab-content-spinner" />,
getProps: async (di, props) => ({
...props,
model: di.inject(logsViewModelInjectable, {
tabId: props.tab.id,
}),
model: await di.inject(logsViewModelInjectable, props.tab.id),
subscribeStores: di.inject(subscribeStoresInjectable),
podStore: di.inject(podStoreInjectable),
}),