From 683c41801c25daafd5c5edf10555898c038bce58 Mon Sep 17 00:00:00 2001 From: "Sonsino, Ofir (os0695)" Date: Tue, 29 May 2018 14:29:06 +0300 Subject: error message when model doesn't exist Change-Id: I86aa21b380d2c0616846d92680382518e2355b3f Issue-ID: VID-233 Signed-off-by: Sonsino, Ofir (os0695) --- .../vid/scripts/controller/ServiceModelController.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'vid-app-common/src/main/webapp/app') diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js index cbb93571..b52b463b 100755 --- a/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js @@ -111,14 +111,29 @@ $scope.createType = COMPONENT.A_LA_CARTE; $scope.deployService = function(service) { - - + + console.log("Instantiating SDC service " + service.uuid); $http.get(COMPONENT.SERVICES_PATH + service.uuid) .then(function successCallback(getServiceResponse) { var serviceModel = getServiceResponse.data; + + //VID-233 bug fix when models doesn't exists + if(typeof(serviceModel)==="string"){ //not an object + $scope.status = FIELD.STATUS.FAILED_SERVICE_MODELS_ASDC; + $scope.error = true; + $scope.isSpinnerVisible = false; + $scope.isProgressVisible = true; + return; + } else{ //clean error message + $scope.status = ""; + $scope.error = false; + $scope.isSpinnerVisible = false; + $scope.isProgressVisible = false; + } + DataService.setServiceName(serviceModel.service.name); //VOLTE services need input list generated and macro style -- cgit 1.2.3-korg