diff options
author | Bartosz Gardziejewski <bartosz.gardziejewski@nokia.com> | 2019-07-19 15:29:11 +0200 |
---|---|---|
committer | Bartosz Gardziejewski <bartosz.gardziejewski@nokia.com> | 2019-07-19 15:30:21 +0200 |
commit | 8cc08f1d0796da5f759a3b90bc08427e9598ef74 (patch) | |
tree | 3e7cb305c931cad2df39849a4a092ed69345d97f /vid-app-common/src/main/webapp/app/vid/scripts/modals/report-modal/report-modal.controller.js | |
parent | e751654a743922fc2a2d23b27553ad451dba6643 (diff) |
fixing bugs connected with undefined parameters
Issue-ID: VID-488
Change-Id: I0099ec50d775bbae6bdbfa40de85decd839f21b3
Signed-off-by: Bartosz Gardziejewski <bartosz.gardziejewski@nokia.com>
Diffstat (limited to 'vid-app-common/src/main/webapp/app/vid/scripts/modals/report-modal/report-modal.controller.js')
-rw-r--r-- | vid-app-common/src/main/webapp/app/vid/scripts/modals/report-modal/report-modal.controller.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/report-modal/report-modal.controller.js b/vid-app-common/src/main/webapp/app/vid/scripts/modals/report-modal/report-modal.controller.js index eff029175..215439634 100644 --- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/report-modal/report-modal.controller.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/report-modal/report-modal.controller.js @@ -42,11 +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 ); |