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 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 { getChartDetails, getChartValues } from "../../../../common/k8s-api/endpoints/helm-charts.api";
|
||||
import type { HelmReleaseUpdateDetails } from "../../../../common/k8s-api/endpoints/helm-releases.api";
|
||||
import type { StorageHelper } from "../../../utils";
|
||||
import { waitUntilDefinied } from "../../../../common/utils/wait";
|
||||
|
||||
export interface IChartInstallData {
|
||||
@ -23,18 +22,14 @@ export interface IChartInstallData {
|
||||
lastVersion?: boolean;
|
||||
}
|
||||
|
||||
interface Dependencies {
|
||||
createStorage: <T>(storageKey: string, options: DockTabStorageState<T>) => StorageHelper<DockTabStorageState<T>>;
|
||||
export interface InstallChartTabStoreDependencies extends DockTabStoreDependencies {
|
||||
versionsStore: DockTabStore<string[]>;
|
||||
detailsStore: DockTabStore<HelmReleaseUpdateDetails>;
|
||||
}
|
||||
|
||||
export class InstallChartTabStore extends DockTabStore<IChartInstallData> {
|
||||
constructor(protected dependencies: Dependencies) {
|
||||
super(
|
||||
dependencies,
|
||||
{ storageKey: "install_charts" },
|
||||
);
|
||||
constructor(protected readonly dependencies: InstallChartTabStoreDependencies) {
|
||||
super(dependencies, { storageKey: "install_charts" });
|
||||
makeObservable(this);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user