summaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/webapp/app/vid/scripts/modals/report-modal/report-modal.controller.js
diff options
context:
space:
mode:
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.js14
1 files changed, 11 insertions, 3 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 6ec5c4154..eff029175 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
@@ -21,24 +21,32 @@
(function () {
'use strict';
- appDS2.controller("reportModalController", ["$uibModalInstance", "$scope", "$window", "ReportService", "errorMsg", reportModalController]);
+ appDS2.controller("reportModalController", ["$uibModalInstance", "$scope", "$window", "DataService", "ReportService", "errorMsg", reportModalController]);
- function reportModalController($uibModalInstance, $scope, $window, ReportService, errorMsg) {
+ function reportModalController($uibModalInstance, $scope, $window, DataService, ReportService, errorMsg) {
const vm = this;
const init = function() {
vm.timestamp = ReportService.getReportTimeStamp();
vm.downloadEnable = false;
+ $scope.isSpinnerVisible = true;
+
ReportService.getReportData({}).then(
response => {
+ $scope.isSpinnerVisible = false;
vm.saveReportData(response);
}, response => {
+ $scope.isSpinnerVisible = false;
vm.printReportFail(response);
});
};
vm.saveReportData = function(response) {
- vm.report = errorMsg + "\n\n Collected data from API:\n" + JSON.stringify(response.data, null, "\t") ;
+ 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") ;
+
const blob = new Blob([ vm.report ], { type : 'text/plain' });
vm.download = ($window.URL || $window.webkitURL).createObjectURL( blob );