diff options
author | 2019-08-22 22:13:07 +0530 | |
---|---|---|
committer | 2019-08-22 22:13:16 +0530 | |
commit | 184d038eddd39ae0a8f43f40cec8c93223445322 (patch) | |
tree | 0075a30f4e4923e1b317b9caa1335252cd0b4246 /cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.service.ts | |
parent | b496e93839fba89a8ea2ab026954a6f6359bc4c2 (diff) |
Notification service for downloaded CB
Replaced window alert with notification service
Change-Id: I1e2ba50eea8360dff2747c14c857af8c59763f02
Issue-ID: CCSDK-1275
Signed-off-by: Ezhilarasi <ezhrajam@in.ibm.com>
Diffstat (limited to 'cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.service.ts')
-rw-r--r-- | cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.service.ts | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.service.ts b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.service.ts index 025fc95d4..f1d1d148c 100644 --- a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.service.ts +++ b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.service.ts @@ -1,7 +1,7 @@ /* ============LICENSE_START========================================== =================================================================== -Copyright (C) 2018 IBM Intellectual Property. All rights reserved. +Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved. =================================================================== Unless otherwise specified, all software contained herein is licensed @@ -26,10 +26,12 @@ import { Observable, observable } from 'rxjs'; import { ApiService } from '../../../../common/core/services/api.service'; import { saveAs } from 'file-saver'; import { BlueprintURLs } from '../../../../common/constants/app-constants'; +import { NotificationHandlerService } from 'src/app/common/core/services/notification-handler.service'; @Injectable() export class EditorService { - constructor(private _http: HttpClient, private api: ApiService) { + constructor(private _http: HttpClient, private api: ApiService, + private alertService: NotificationHandlerService,) { } enrich(body: FormData): Observable<any> { @@ -40,7 +42,7 @@ export class EditorService { .subscribe(response => { let blob = new Blob([response], { 'type': "application/octet-stream" }); saveAs(blob, "CBA.zip"); - window.alert('Blueprint download successfull' ); + this.alertService.success('Blueprint downloaded successfully' ); }); return "Download Success"; |