diff --git a/ui/src/app/pages/apps-routes/app-actions/app-actions.page.ts b/ui/src/app/pages/apps-routes/app-actions/app-actions.page.ts index 68517a820..2f6571ee1 100644 --- a/ui/src/app/pages/apps-routes/app-actions/app-actions.page.ts +++ b/ui/src/app/pages/apps-routes/app-actions/app-actions.page.ts @@ -56,15 +56,7 @@ export class AppActionsPage { async handleAction (action: { key: string, value: Action }) { const status = this.pkg.installed.status - if (!status.configured) { - const alert = await this.alertCtrl.create({ - header: 'Forbidden', - message: `Service must be properly configured in order to run "${action.value.name}"`, - buttons: ['OK'], - cssClass: 'alert-error-message enter-click', - }) - await alert.present() - } else if ((action.value['allowed-statuses'] as PackageMainStatus[]).includes(status.main.status)) { + if ((action.value['allowed-statuses'] as PackageMainStatus[]).includes(status.main.status)) { if (!isEmptyObject(action.value['input-spec'])) { const modal = await this.modalCtrl.create({ component: GenericFormPage, diff --git a/ui/src/app/pages/marketplace-routes/marketplace.service.ts b/ui/src/app/pages/marketplace-routes/marketplace.service.ts index 4a5b1c0d4..0031cf29a 100644 --- a/ui/src/app/pages/marketplace-routes/marketplace.service.ts +++ b/ui/src/app/pages/marketplace-routes/marketplace.service.ts @@ -1,6 +1,7 @@ import { Injectable } from '@angular/core' import { MarketplaceData, MarketplaceEOS, MarketplacePkg } from 'src/app/services/api/api.types' import { ApiService } from 'src/app/services/api/embassy-api.service' +import { ConfigService } from 'src/app/services/config.service' import { Emver } from 'src/app/services/emver.service' import { PackageDataEntry } from 'src/app/services/patch-db/data-model' @@ -18,12 +19,15 @@ export class MarketplaceService { constructor ( private readonly api: ApiService, private readonly emver: Emver, + private readonly config: ConfigService, ) { } async load (): Promise { const [data, eos, pkgs] = await Promise.all([ this.api.getMarketplaceData({ }), - this.api.getEos({ }), + this.api.getEos({ + 'eos-version': this.config.version, + }), this.getPkgs(1, 100), ]) this.data = data @@ -35,6 +39,7 @@ export class MarketplaceService { const idAndCurrentVersions = Object.keys(localPkgs).map(key => ({ id: key, version: localPkgs[key].manifest.version })) const latestPkgs = await this.api.getMarketplacePkgs({ ids: idAndCurrentVersions, + 'eos-version': this.config.version, }) return latestPkgs.filter(latestPkg => { @@ -47,6 +52,7 @@ export class MarketplaceService { async getPkg (id: string, version?: string): Promise { const pkgs = await this.api.getMarketplacePkgs({ ids: [{ id, version: version || '*' }], + 'eos-version': this.config.version, }) const pkg = pkgs.find(pkg => pkg.manifest.id == id) @@ -65,6 +71,7 @@ export class MarketplaceService { const pkgs = await this.api.getMarketplacePkgs({ page: String(page), 'per-page': String(perPage), + 'eos-version': this.config.version, }) return pkgs diff --git a/ui/src/app/services/api/api.types.ts b/ui/src/app/services/api/api.types.ts index 30f0a0c22..b1f53d4f8 100644 --- a/ui/src/app/services/api/api.types.ts +++ b/ui/src/app/services/api/api.types.ts @@ -193,12 +193,15 @@ export module RR { export type GetMarketplaceDataReq = { } export type GetMarketplaceDataRes = MarketplaceData - export type GetMarketplaceEOSReq = { } + export type GetMarketplaceEOSReq = { + 'eos-version': string + } export type GetMarketplaceEOSRes = MarketplaceEOS export type GetMarketplacePackagesReq = { ids?: { id: string, version: string }[] // iff !id + 'eos-version': string category?: string query?: string page?: string diff --git a/ui/src/app/services/startup-alerts.service.ts b/ui/src/app/services/startup-alerts.service.ts index b8cfbd494..270b34974 100644 --- a/ui/src/app/services/startup-alerts.service.ts +++ b/ui/src/app/services/startup-alerts.service.ts @@ -115,7 +115,9 @@ export class StartupAlertsService { // ** check ** private async osUpdateCheck (): Promise { - const res = await this.api.getEos({ }) + const res = await this.api.getEos({ + 'eos-version': this.config.version, + }) if (this.emver.compare(this.config.version, res.version) === -1) { return res