diff options
author | 2018-01-31 17:19:00 +0200 | |
---|---|---|
committer | 2018-01-31 17:19:00 +0200 | |
commit | 1cfb08779ea0e00be69e072a940b3063e049fe6b (patch) | |
tree | 6602a900387c8393ed0dcd81c0539381632903c6 /vid-app-common/src/main/webapp/app/vid/scripts/services/change-management.service.js | |
parent | 2f20b001b9243e0f8b44aecc768ec265fd538732 (diff) |
org.onap migration
Change-Id: I52f0b2851f2c765752b6d21f49b32136d7d72a3d
Issue-ID: VID-86
Signed-off-by: Ofir Sonsino <os0695@att.com>
Diffstat (limited to 'vid-app-common/src/main/webapp/app/vid/scripts/services/change-management.service.js')
-rw-r--r-- | vid-app-common/src/main/webapp/app/vid/scripts/services/change-management.service.js | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/change-management.service.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/change-management.service.js index f2282d69a..fdab6564b 100644 --- a/vid-app-common/src/main/webapp/app/vid/scripts/services/change-management.service.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/change-management.service.js @@ -5,16 +5,20 @@ function changeManagementService($http, $q, COMPONENT, VIDCONFIGURATION) { this.getWorkflows = function (vnfs) { - var deferred = $q.defer(); - - $http.get(COMPONENT.GET_WORKFLOW.replace("@vnfs", vnfs)) - .success(function (response) { - deferred.resolve({data: response}); - }).error(function (data, status, headers, config) { - deferred.reject({message: data, status: status}); + var requestVnfs = _.map(vnfs, function (vnf) { + return { + UUID: vnf["modelVersionId"], + invariantUUID: vnf["invariant-id"] + }; }); - - return deferred.promise; + var requestDetails = {vnfsDetails: requestVnfs}; + return $http.post(COMPONENT.GET_WORKFLOW, requestDetails) + .success(function (response) { + return {data: response}; + }) + .catch(function (err) { + return {data: []}; + }); }; this.getMSOChangeManagements = function() { |