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:
parent
c849ab432b
commit
5382dc0290
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user