summaryrefslogtreecommitdiffstats
path: root/cds-ui/client
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2019-08-22 22:06:39 +0000
committerGerrit Code Review <gerrit@onap.org>2019-08-22 22:06:39 +0000
commit42847234a611cbfa367f7d011c9d397cb7906482 (patch)
tree017f72e97cf9c9dbda22f644f05181de6222835b /cds-ui/client
parent5db41e667a9bb495af0213712c273dc526e83a26 (diff)
parent184d038eddd39ae0a8f43f40cec8c93223445322 (diff)
Merge "Notification service for downloaded CB"
Diffstat (limited to 'cds-ui/client')
-rw-r--r--cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.ts13
-rw-r--r--cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.service.ts8
2 files changed, 6 insertions, 15 deletions
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.ts b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.ts
index 7b2eaeb17..cfd83f7c5 100644
--- a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.ts
+++ b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.ts
@@ -331,18 +331,7 @@ export class EditorComponent implements OnInit {
download() {
console.log(this.artifactName);
// status = this.editorService.downloadCBA("/download-blueprint/" + this.artifactName + "/" + this.artifactVersion);
- status = this.editorService.downloadCBA("/"+this.artifactName + "/" + this.artifactVersion);
- window.alert(status);
- // .subscribe(response => {
- // console.log(response);
- // var blob = new Blob([response], { type: 'application/zip' });
- // const fileName = 'CBA';
- // saveAs(blob, fileName);
- // },
- // error => {
- // console.log(error);
- // }
- // );
+ this.editorService.downloadCBA("/"+this.artifactName + "/" + this.artifactVersion);
}
setEditorMode() {
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";