From a661be230e19c64310de293ca6a2e47ab469db9a Mon Sep 17 00:00:00 2001 From: Ahmedeldeeb50 Date: Wed, 18 Nov 2020 10:51:58 +0200 Subject: Stop loader and disaply errors when deploying a package Issue-ID: CCSDK-2323 Signed-off-by: Ahmedeldeeb50 Change-Id: Id8cafa540da9d165992463c74c523085cc26125d --- .../configuration-dashboard.component.ts | 10 ++++++++++ .../functions-attribute.component.ts | 2 +- .../designer/source-view/source-view.component.html | 5 ++--- .../designer/source-view/source-view.component.ts | 19 ++++++++++++------- 4 files changed, 25 insertions(+), 11 deletions(-) (limited to 'cds-ui/designer-client/src/app/modules') diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts index 766c50a98..96e54d953 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts @@ -264,6 +264,10 @@ export class ConfigurationDashboardComponent extends ComponentCanDeactivate impl this.packageCreationExtractionService.extractBlobToStore(this.currentBlob); this.isSaveEnabled = true; this.toastService.info('enriched successfully '); + }, err => { + this.handleError(err); + }, () => { + this.ngxService.stop(); }); }, error => { this.toastService.error('error happened when enrich ' + error.message); @@ -282,6 +286,10 @@ export class ConfigurationDashboardComponent extends ComponentCanDeactivate impl const id = response.toString().split('id')[1].split(':')[1].split('"')[1]; this.isSaveEnabled = false; this.router.navigate(['/packages/package/' + id]); + }, err => { + this.handleError(err); + }, () => { + this.ngxService.stop(); }); }, error => { this.handleError(error); @@ -324,6 +332,8 @@ export class ConfigurationDashboardComponent extends ComponentCanDeactivate impl } this.toastService.error('error happened when deploying ' + errorMessage); console.log('Error -' + errorMessage); + this.ngxService.stop(); + this.toastService.error('error happened when deploying' + error.message); return throwError(errorMessage); } } diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.ts index 871236768..3890a980d 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.ts @@ -187,7 +187,7 @@ export class FunctionsAttributeComponent implements OnInit, OnDestroy { if (value.isTemplate) { this.nodeTemplates.artifacts[key + '-template'] = { - type: 'artifact-template-resource', + type: 'artifact-template-velocity', file: 'Templates/' + key + '-template.vtl' }; } diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/source-view/source-view.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/source-view/source-view.component.html index eedbe9f85..322acb92f 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/source-view/source-view.component.html +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/source-view/source-view.component.html @@ -9,7 +9,7 @@