add sucess/error toaster in Designer 94/115494/1
authorAhmedeldeeb50 <ahmed.eldeeb.ext@orange.com>
Sun, 29 Nov 2020 10:30:13 +0000 (12:30 +0200)
committerAhmedeldeeb50 <ahmed.eldeeb.ext@orange.com>
Sun, 29 Nov 2020 10:30:13 +0000 (12:30 +0200)
Issue-ID: CCSDK-3007

Signed-off-by: Ahmedeldeeb50 <ahmed.eldeeb.ext@orange.com>
Change-Id: I055a579915ac39e17279910062f0d9330b5877c9

cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.css
cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.ts

index 1aa283c..a210e58 100644 (file)
@@ -131,8 +131,10 @@ export class DesignerComponent implements OnInit, OnDestroy {
                 const formData = new FormData();
                 formData.append('file', blob);
                 this.designerService.publishBlueprint(formData).subscribe(res => {
+                    this.toastService.success('Package Deployed Successfuly');
                     console.log('Package Deployed...');
                 }, error => {
+                    this.toastService.error(error.message, 'Package error');
                     console.log(error);
                 }, () => {
                     //  this.deployBluePrint = false;
@@ -495,13 +497,15 @@ export class DesignerComponent implements OnInit, OnDestroy {
                     const blobInfo = new Blob([response], { type: 'application/octet-stream' });
                     this.packageCreationStore.clear();
                     this.packageCreationExtractionService.extractBlobToStore(blobInfo);
-                    this.toastService.info('enriched successfully ');
+                    this.toastService.success('Enriched successfully ');
                 }, err => {
+                    console.log(err);
+                    this.toastService.error(err.message, 'Enrich Failed');
                 }, () => {
                     this.ngxService.stop();
                 });
             }, error => {
-                this.toastService.error('error happened when enrich ' + error.message);
+                this.toastService.error(error.mesasge, 'error happened ');
                 console.error('Error -' + error.message);
             }, () => {
                 this.ngxService.stop();