diff options
3 files changed, 57 insertions, 6 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 7f544be5..9a8feb66 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 @@ -67,7 +67,9 @@ public class ServiceLcmController { @RequestMapping(value = {"/uui-lcm/services/{serviceId}/operations/{operationId}"}, method = RequestMethod.GET , produces = "application/json") public OperationProgressInformation queryOperationProgress(@PathVariable(value="serviceId") String serviceId, @PathVariable(value="operationId") String operationId){ OperationProgressInformation operationProgressInformation =serviceLcmService.queryOperationProgress(serviceId, operationId); - serviceLcmService.updateServiceInstanceStatusById(operationProgressInformation.getOperationStatus().getResult(), serviceId); + if(UuiCommonUtil.isNotNullOrEmpty(operationProgressInformation)&&UuiCommonUtil.isNotNullOrEmpty(operationProgressInformation.getOperationStatus())){ + serviceLcmService.updateServiceInstanceStatusById(operationProgressInformation.getOperationStatus().getResult(), serviceId); + } return operationProgressInformation; } diff --git a/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/so/bean/OperationProgress.java b/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/so/bean/OperationProgress.java index 12e8e116..6f47837d 100644 --- a/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/so/bean/OperationProgress.java +++ b/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/so/bean/OperationProgress.java @@ -19,8 +19,12 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @JsonIgnoreProperties(ignoreUnknown=true) public class OperationProgress { - + + private String serviceId; + private String operationId; + + private String serviceName; private String operation; @@ -38,11 +42,31 @@ public class OperationProgress { private String finishedAt; - public String getOperationId() { + + + public OperationProgress(String serviceId, String operationId, String serviceName, String operation, String result, + String reason, String userId, String operationContent, int progress, String operateAt, String finishedAt) { + this.serviceId = serviceId; + this.operationId = operationId; + this.serviceName = serviceName; + this.operation = operation; + this.result = result; + this.reason = reason; + this.userId = userId; + this.operationContent = operationContent; + this.progress = progress; + this.operateAt = operateAt; + this.finishedAt = finishedAt; + } + + public OperationProgress() { + } + + public String getOperationId() { return operationId; } - public void setOperationId(String operationId) { + public void setOperationId(String operationId) { this.operationId = operationId; } @@ -109,4 +133,21 @@ public class OperationProgress { public void setFinishedAt(String finishedAt) { this.finishedAt = finishedAt; } + + public String getServiceId() { + return serviceId; + } + + public void setServiceId(String serviceId) { + this.serviceId = serviceId; + } + + public String getServiceName() { + return serviceName; + } + + public void setServiceName(String serviceName) { + this.serviceName = serviceName; + } + } diff --git a/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/so/bean/OperationProgressInformation.java b/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/so/bean/OperationProgressInformation.java index 90d2835a..35edde56 100644 --- a/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/so/bean/OperationProgressInformation.java +++ b/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/so/bean/OperationProgressInformation.java @@ -16,13 +16,21 @@ package org.onap.usecaseui.server.service.lcm.domain.so.bean; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; @JsonIgnoreProperties(ignoreUnknown=true) public class OperationProgressInformation { - + private OperationProgress operationStatus; + + public OperationProgressInformation(@JsonProperty("operation")OperationProgress operationStatus) { + this.operationStatus = operationStatus; + } + + public OperationProgressInformation() { + } - public OperationProgress getOperationStatus() { + public OperationProgress getOperationStatus() { return operationStatus; } |