summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceLcmController.java2
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultServiceInstanceService.java14
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;
}