summaryrefslogtreecommitdiffstats
path: root/vid-app-common
diff options
context:
space:
mode:
authorWojciech Sliwka <wojciech.sliwka@nokia.com>2019-07-22 05:30:54 +0000
committerGerrit Code Review <gerrit@onap.org>2019-07-22 05:30:54 +0000
commit7777af2d57f3461b06f8c787cfb6e33c3b01e8a6 (patch)
tree0996932d0d2a46b7aeebe2b97076fcb06d356482 /vid-app-common
parent2161e5d01e6ff0e1460d268371c97792331b0974 (diff)
parent8cc08f1d0796da5f759a3b90bc08427e9598ef74 (diff)
Merge "fixing bugs connected with undefined parameters"
Diffstat (limited to 'vid-app-common')
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js9
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/controller/msoCommitController.js12
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/modals/report-modal/report-modal-request.controller.js9
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/modals/report-modal/report-modal.controller.js10
4 files changed, 28 insertions, 12 deletions
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js
index ed03e3aec..072adf305 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js
@@ -25,6 +25,13 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER",
function (COMPONENT, FIELD, PARAMETER, DataService, PropertyService, $scope, $http, $timeout, $location, $log, $route, $uibModal, VIDCONFIGURATION, UtilityService, vidService, AaiService, MsoService, OwningEntityService, AsdcService, featureFlags, $q, _) {
$scope.showReportWindow = function() {
+ let GuiMessage;
+
+ if ($scope.errorMsg !== undefined && $scope.errorMsg !== null) {
+ GuiMessage = $scope.errorMsg;
+ } else {
+ GuiMessage = $scope.status;
+ }
const modalWindow = $uibModal.open({
templateUrl: 'app/vid/scripts/modals/report-modal/report-modal.html',
@@ -32,7 +39,7 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER",
controllerAs: 'vm',
resolve: {
errorMsg: function () {
- return $scope.errorMsg;
+ return GuiMessage;
}
}
});
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/msoCommitController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/msoCommitController.js
index e4c75fbe7..c841f14ee 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/controller/msoCommitController.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/msoCommitController.js
@@ -74,8 +74,16 @@ var msoCommitController = function(COMPONENT, FIELD, $scope, $http, $timeout, $w
$scope.showReportWindow = function() {
let requestInfo = {};
- requestInfo.requestId = _this.requestId;
- requestInfo.serviceUuid = $scope.service.model.service.uuid;
+ if(_this.requestId !== undefined) {
+ requestInfo.requestId = _this.requestId;
+ } else {
+ requestInfo.requestId = null;
+ }
+ if($scope.service !== undefined) {
+ requestInfo.serviceUuid = $scope.service.model.service.uuid;
+ } else {
+ requestInfo.serviceUuid = null;
+ }
const modalWindow = $uibModal.open({
templateUrl: 'app/vid/scripts/modals/report-modal/report-modal.html',
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 );
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 );