diff options
author | 2020-09-08 13:10:50 +0000 | |
---|---|---|
committer | 2020-09-08 13:10:50 +0000 | |
commit | 2891777b8569fc1dc6886a47e2bc27e646bde088 (patch) | |
tree | 4ce9cda6c81346fad677e20baec0fc7da5fbcec7 /cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation | |
parent | 57c6cdf3c137da78c9d0d52a4862c1bc6445f923 (diff) | |
parent | dc16c9e10b9f7f403761fe5f767cf48c2f39d73b (diff) |
Merge "adding manual enrichment"
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation')
2 files changed, 15 insertions, 0 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.service.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.service.ts index 952fea3ca..e7ccbb39a 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.service.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.service.ts @@ -45,6 +45,10 @@ export class PackageCreationService { return this.api.post(BlueprintURLs.enrich, body, {responseType: 'text'}); } + private deployBluePrint(body: any | null, options?: any): Observable<any> { + return this.api.post(BlueprintURLs.deploy, body, {responseType: 'text'}); + } + async checkBluePrintNameAndVersion(name: string, version: string): Promise<boolean> { return await this.packagesListService.checkBluePrintIfItExists(name, version) .then(bluePrintModelsResult => bluePrintModelsResult != null && bluePrintModelsResult.length > 0); @@ -64,6 +68,11 @@ export class PackageCreationService { return this.enrichBlueprint(formData); } + deploy(blob) { + const formData = this.getFormData(blob); + return this.deployBluePrint(formData); + } + private getFormData(blob) { const formData = new FormData(); formData.append('file', blob); @@ -73,4 +82,6 @@ export class PackageCreationService { getTemplateAndMapping(variables: string[]): Observable<ResourceDictionary[]> { return this.api.post(ResourceDictionaryURLs.searchResourceDictionaryByNames, variables); } + + } diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.store.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.store.ts index f64e361d4..b60831238 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.store.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.store.ts @@ -106,6 +106,10 @@ export class PackageCreationStore extends Store<CBAPackage> { return this.packageCreationService.enrichPackage(blob); } + deployBluePrint(blob): Observable<BluePrintDetailModel> { + return this.packageCreationService.deploy(blob); + } + addTemplate(filePath: string, fileContent: string) { this.setState({ ...this.state, |