diff options
author | 2020-11-29 12:30:13 +0200 | |
---|---|---|
committer | 2020-11-29 12:30:13 +0200 | |
commit | 8417a125b7e770737f05102e534913c9fa76166b (patch) | |
tree | 1e17bd6f08748dbf34fb764b3bb48f2f80489bee /cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.ts | |
parent | c9abcdb52610466e0939ba6758e358949e0a38b5 (diff) |
add sucess/error toaster in Designer
Issue-ID: CCSDK-3007
Signed-off-by: Ahmedeldeeb50 <ahmed.eldeeb.ext@orange.com>
Change-Id: I055a579915ac39e17279910062f0d9330b5877c9
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.ts')
-rw-r--r-- | cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.ts index 1aa283ca3..a210e58bf 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.ts @@ -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(); |