Refactor helm-release.api to use free functions instead of an object (#2264)

- Rename functions to be more descriptive

- Change all functions to be Promise based

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-04-20 10:51:45 -04:00
1 parent f17ce17fe9
commit a2be178191
5 files changed
+65 -67

No files matched your search

@@ -1,7 +1,7 @@
import { action, autorun, IReactionDisposer, reaction } from "mobx";
import { dockStore, IDockTab, TabId, TabKind } from "./dock.store";
import { DockTabStore } from "./dock-tab.store";
import { HelmRelease, helmReleasesApi } from "../../api/endpoints/helm-releases.api";
import { getReleaseValues, HelmRelease } from "../../api/endpoints/helm-releases.api";
import { releaseStore } from "../+apps-releases/release.store";
export interface IChartUpgradeData {
@@ -89,7 +89,7 @@ export class UpgradeChartStore extends DockTabStore<IChartUpgradeData> {
async loadValues(tabId: TabId) {
this.values.clearData(tabId); // reset
const { releaseName, releaseNamespace } = this.getData(tabId);
const values = await helmReleasesApi.getValues(releaseName, releaseNamespace);
const values = await getReleaseValues(releaseName, releaseNamespace);
this.values.setData(tabId, values);
}