diff options
author | guochuyicmri <guochuyi@chinamobile.com> | 2019-05-30 17:17:36 +0800 |
---|---|---|
committer | guochuyicmri <guochuyi@chinamobile.com> | 2019-05-30 17:17:48 +0800 |
commit | 100d246f138bfcf2f4f06b1b3f6579f4ae8ef408 (patch) | |
tree | 1afedcf70283b40fc9beea5938ebc94098eaa07e | |
parent | 9e4a83240e81d521a909f4cf03591b1ccdc0dbdd (diff) |
Change-Id: I6e3fe779df83c31d8b9e09a4209ea8543fdf01c0
Issue-ID: USECASEUI-252
Signed-off-by: guochuyicmri <guochuyi@chinamobile.com>
2 files changed, 3 insertions, 13 deletions
diff --git a/server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceLcmController.java b/server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceLcmController.java index 68e74acf..28b4b57e 100644 --- a/server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceLcmController.java +++ b/server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceLcmController.java @@ -29,6 +29,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.annotation.EnableAspectJAutoProxy; import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; @@ -42,6 +43,7 @@ import javax.servlet.http.HttpServletRequest; @Controller @org.springframework.context.annotation.Configuration @EnableAspectJAutoProxy +@CrossOrigin(origins="*") public class ServiceLcmController { private static final Logger logger = LoggerFactory.getLogger(ServiceLcmController.class); diff --git a/server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultServiceInstanceService.java b/server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultServiceInstanceService.java index 6d4cfbb3..30f7d2fc 100644 --- a/server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultServiceInstanceService.java +++ b/server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultServiceInstanceService.java @@ -103,7 +103,6 @@ public class DefaultServiceInstanceService implements ServiceInstanceService { } private List<String> parseServiceInstance(JSONObject objects,String customerId,String serviceType) throws JsonProcessingException{ - ObjectMapper mapper = new ObjectMapper(); List<String> result = new ArrayList<>(); JSONArray serviceInstances=objects.getJSONArray("service-instance"); for(Object serviceInstance:serviceInstances){ @@ -119,18 +118,7 @@ public class DefaultServiceInstanceService implements ServiceInstanceService { object.put("operationResult",serviceInstanceOperations.getOperationResult()); object.put("operationId",serviceInstanceOperations.getOperationId()); object.put("operationType",serviceInstanceOperations.getOperationType()); - if("SOTN".equals(serviceDomain)||"CCVPN".equals(serviceDomain)||"E2E Service".equals(serviceDomain)||"Network Service".equals(serviceDomain)){ - List<String> parentIds = serviceLcmService.getServiceInstanceIdByParentId(serviceInstanceId); - List<String> parentServiceInstances = new ArrayList<>(); - if(parentIds.size()>0){ - for(String id:parentIds){ - String parentServiceInstance=this.getRelationShipData(customerId, serviceType, id); - parentServiceInstances.add(parentServiceInstance); - } - } - object.put("childServiceInstances",parentServiceInstances); - result.add(object.toString()); - } + result.add(object.toString()); } return result; } |