summaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/webapp/app/vid/scripts/modals/report-modal/report-modal-request.controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'vid-app-common/src/main/webapp/app/vid/scripts/modals/report-modal/report-modal-request.controller.js')
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/modals/report-modal/report-modal-request.controller.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/report-modal/report-modal-request.controller.js b/vid-app-common/src/main/webapp/app/vid/scripts/modals/report-modal/report-modal-request.controller.js
index 6b69a08fe..48179dd02 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/report-modal/report-modal-request.controller.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/report-modal/report-modal-request.controller.js
@@ -42,10 +42,11 @@
};
vm.saveReportData = function(response) {
- vm.report =
- "Selected test API: \n" + DataService.getMsoRequestParametersTestApi()
- + "\n\n Data from GUI:\n" + errorMsg
- + "\n\n Collected data from API:\n" + JSON.stringify(response.data, null, "\t") ;
+ vm.report = "Selected test API: \n" + DataService.getMsoRequestParametersTestApi();
+ if(errorMsg !== undefined && errorMsg !== null) {
+ vm.report += "\n\n Data from GUI:\n" + errorMsg;
+ }
+ vm.report +="\n\n Collected data from API:\n" + JSON.stringify(response.data, null, "\t") ;
const blob = new Blob([ vm.report ], { type : 'text/plain' });
vm.download = ($window.URL || $window.webkitURL).createObjectURL( blob );