aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSonsino, Ofir (os0695) <os0695@intl.att.com>2018-05-29 14:29:06 +0300
committerSonsino, Ofir (os0695) <os0695@intl.att.com>2018-05-29 14:29:06 +0300
commit683c41801c25daafd5c5edf10555898c038bce58 (patch)
tree9a9bf6ea2e7573d27ebd80c363f91231e93476b6
parente33819db51041c6b75b56ee3a8cfcaa849344989 (diff)
error message when model doesn't exist
Change-Id: I86aa21b380d2c0616846d92680382518e2355b3f Issue-ID: VID-233 Signed-off-by: Sonsino, Ofir (os0695) <os0695@intl.att.com>
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js19
1 files changed, 17 insertions, 2 deletions
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