From ff6b9bb17545dcd535322bcf0b2fa1c73338cf4b Mon Sep 17 00:00:00 2001 From: Eylon Malin Date: Wed, 18 Dec 2019 16:11:09 +0200 Subject: while ng1 view/edit - get aai service if they are not exist yet Issue-ID: VID-732 Change-Id: I6fd9866fb84eb07be7ea3c0bfc7cdfc0b3ea6084 Signed-off-by: Eylon Malin --- .../webapp/app/vid/scripts/controller/aaiSubscriberController.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js') 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 110f24ec6..2701e3e9e 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 @@ -539,6 +539,12 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER", var serviceNetworkVlans = []; var vnfNetworksAndVlans = []; + function fetchServiceIfMissing() { + if (_.isEmpty(DataService.getServiceIdList())) { + $scope.fetchServices(); + } + } + $scope.getComponentList = function (event, request) { $scope.isSpinnerVisible = true; @@ -569,6 +575,7 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER", }) .then(resolveModelDataIfMissing) .then($scope.prepareScopeWithModel) + .then(fetchServiceIfMissing) .then(function () { return AaiService.getVlansByNetworksMapping($scope.globalCustomerId, $scope.serviceType, $scope.serviceInstanceId, $scope.service.model.service.uuid); }) -- cgit 1.2.3-korg