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

fix install-chart/store.ts

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2022-04-12 14:39:26 -04:00
parent c849ab432b
commit 5382dc0290

View File

@ -5,11 +5,10 @@
import { action, makeObservable } from "mobx"; import { action, makeObservable } from "mobx";
import type { TabId } from "../dock/store"; import type { TabId } from "../dock/store";
import type { DockTabStorageState } from "../dock-tab-store/dock-tab.store"; import type { DockTabStoreDependencies } from "../dock-tab-store/dock-tab.store";
import { DockTabStore } from "../dock-tab-store/dock-tab.store"; import { DockTabStore } from "../dock-tab-store/dock-tab.store";
import { getChartDetails, getChartValues } from "../../../../common/k8s-api/endpoints/helm-charts.api"; import { getChartDetails, getChartValues } from "../../../../common/k8s-api/endpoints/helm-charts.api";
import type { HelmReleaseUpdateDetails } from "../../../../common/k8s-api/endpoints/helm-releases.api"; import type { HelmReleaseUpdateDetails } from "../../../../common/k8s-api/endpoints/helm-releases.api";
import type { StorageHelper } from "../../../utils";
import { waitUntilDefinied } from "../../../../common/utils/wait"; import { waitUntilDefinied } from "../../../../common/utils/wait";
export interface IChartInstallData { export interface IChartInstallData {
@ -23,18 +22,14 @@ export interface IChartInstallData {
lastVersion?: boolean; lastVersion?: boolean;
} }
interface Dependencies { export interface InstallChartTabStoreDependencies extends DockTabStoreDependencies {
createStorage: <T>(storageKey: string, options: DockTabStorageState<T>) => StorageHelper<DockTabStorageState<T>>;
versionsStore: DockTabStore<string[]>; versionsStore: DockTabStore<string[]>;
detailsStore: DockTabStore<HelmReleaseUpdateDetails>; detailsStore: DockTabStore<HelmReleaseUpdateDetails>;
} }
export class InstallChartTabStore extends DockTabStore<IChartInstallData> { export class InstallChartTabStore extends DockTabStore<IChartInstallData> {
constructor(protected dependencies: Dependencies) { constructor(protected readonly dependencies: InstallChartTabStoreDependencies) {
super( super(dependencies, { storageKey: "install_charts" });
dependencies,
{ storageKey: "install_charts" },
);
makeObservable(this); makeObservable(this);
} }