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:
parent
daf3fb92ea
commit
902bcd7b67
@ -20,6 +20,7 @@ import type { SubscribeStores } from "../../../kube-watch-api/kube-watch-api";
|
|||||||
import subscribeStoresInjectable from "../../../kube-watch-api/subscribe-stores.injectable";
|
import subscribeStoresInjectable from "../../../kube-watch-api/subscribe-stores.injectable";
|
||||||
import type { PodStore } from "../../+workloads-pods/store";
|
import type { PodStore } from "../../+workloads-pods/store";
|
||||||
import podStoreInjectable from "../../+workloads-pods/store.injectable";
|
import podStoreInjectable from "../../+workloads-pods/store.injectable";
|
||||||
|
import { Spinner } from "../../spinner";
|
||||||
|
|
||||||
export interface LogsDockTabProps {
|
export interface LogsDockTabProps {
|
||||||
className?: string;
|
className?: string;
|
||||||
@ -99,11 +100,11 @@ const NonInjectedLogsDockTab = observer(({
|
|||||||
|
|
||||||
|
|
||||||
export const LogsDockTab = withInjectables<Dependencies, LogsDockTabProps>(NonInjectedLogsDockTab, {
|
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,
|
...props,
|
||||||
model: di.inject(logsViewModelInjectable, {
|
model: await di.inject(logsViewModelInjectable, props.tab.id),
|
||||||
tabId: props.tab.id,
|
|
||||||
}),
|
|
||||||
subscribeStores: di.inject(subscribeStoresInjectable),
|
subscribeStores: di.inject(subscribeStoresInjectable),
|
||||||
podStore: di.inject(podStoreInjectable),
|
podStore: di.inject(podStoreInjectable),
|
||||||
}),
|
}),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user