aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js
diff options
context:
space:
mode:
authorjimmydot <jf2512@att.com>2017-05-30 16:06:51 -0400
committerjimmydot <jf2512@att.com>2017-05-30 16:06:51 -0400
commit6c7dcba5be04a502a2d5de7e7c5f14eedf9eaa2a (patch)
tree85f583353ede474b859e46707f15cb4326ea863a /vid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js
parentef3524df38879e4f070a018beb3de494cf276fee (diff)
[VID-12] Delivery of remaining features for v1.1
Change-Id: I50305ba25aaa34ee1ca7640237f31ab824655a34 Signed-off-by: jimmydot <jf2512@att.com>
Diffstat (limited to 'vid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js')
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js29
1 files changed, 24 insertions, 5 deletions
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js
index 8132e3a33..ee99547b6 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js
@@ -82,8 +82,8 @@ var AaiService = function($http, $log, PropertyService, UtilityService, COMPONEN
angular.forEach(subscriber[FIELD.ID.SERVICE_SUBSCRIPTIONS][FIELD.ID.SERVICE_SUBSCRIPTION], function(serviceSubscription, key) {
var serviceInstanceId = [];
var serviceType = "";
- if (serviceSubscription[FIELD.ID.SERVICE_TYPE] != null) {
- serviceType = serviceSubscription[FIELD.ID.SERVICE_TYPE];
+ if (serviceSubscription[FIELD.ID.SERVICETYPE] != null) {
+ serviceType = serviceSubscription[FIELD.ID.SERVICETYPE];
} else {
serviceType = FIELD.PROMPT.NO_SERVICE_SUB;
}
@@ -115,7 +115,8 @@ var AaiService = function($http, $log, PropertyService, UtilityService, COMPONEN
serviceType : serviceType,
serviceInstanceId : subVal.serviceInstanceId,
aaiModelInvariantId : subVal.aaiModelInvariantId,
- aaiModelVersionId : subVal.aaiModelVersionId,
+ aaiModelVersionId
+ : subVal.aaiModelVersionId,
serviceInstanceName : subVal.serviceInstanceName
});
});
@@ -198,7 +199,7 @@ var AaiService = function($http, $log, PropertyService, UtilityService, COMPONEN
var serviceSubscriptions = response.data[FIELD.ID.SERVICE_SUBSCRIPTIONS][FIELD.ID.SERVICE_SUBSCRIPTION];
for (var i = 0; i < serviceSubscriptions.length; i++) {
- serviceTypes.push(serviceSubscriptions[i][FIELD.ID.SERVICE_TYPE]);
+ serviceTypes.push(serviceSubscriptions[i][FIELD.ID.SERVICETYPE]);
}
successCallbackFunction(serviceTypes);
} else {
@@ -331,7 +332,25 @@ var AaiService = function($http, $log, PropertyService, UtilityService, COMPONEN
}
})["catch"]
(UtilityService.runHttpErrorHandler);
-}
+},
+getServiceModelsByServiceType : function(namedQueryId,globalCustomerId,serviceType,successCallbackFunction) {
+ $log
+ .debug("AaiService:getServiceModelsByServiceType");
+ var url = COMPONENT.AAI_GET_SERVICES_BY_TYPE+COMPONENT.FORWARD_SLASH+namedQueryId+COMPONENT.FORWARD_SLASH+globalCustomerId+COMPONENT.FORWARD_SLASH +serviceType+COMPONENT.ASSIGN + Math.random();
+
+ $http.get(url,
+ {
+ timeout : PropertyService
+ .getServerResponseTimeoutMsec()
+ }).then(function(response) {
+ if (response.data) {
+ successCallbackFunction(response);
+ } else {
+ successCallbackFunction([]);
+ }
+ })["catch"]
+ (UtilityService.runHttpErrorHandler);
+ }
}
}