aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xserver/src/main/java/org/onap/usecaseui/server/controller/PerformanceController.java10
-rwxr-xr-xserver/src/test/java/org/onap/usecaseui/server/controller/PerformanceControllerTest.java4
2 files changed, 7 insertions, 7 deletions
diff --git a/server/src/main/java/org/onap/usecaseui/server/controller/PerformanceController.java b/server/src/main/java/org/onap/usecaseui/server/controller/PerformanceController.java
index 251f3597..d113f164 100755
--- a/server/src/main/java/org/onap/usecaseui/server/controller/PerformanceController.java
+++ b/server/src/main/java/org/onap/usecaseui/server/controller/PerformanceController.java
@@ -73,16 +73,16 @@ public class PerformanceController {
private ObjectMapper omPerformance = new ObjectMapper();
@RequestMapping(value = {"/performance/{currentPage}/{pageSize}","/performance/{currentPage}/{pageSize}/{sourceName}/{startTime}/{endTime}"},method = RequestMethod.GET, produces = "application/json")
- public String getPerformanceData(@PathVariable int currentPage,
- @PathVariable int pageSize,
+ public String getPerformanceData(@PathVariable String currentPage,
+ @PathVariable String pageSize,
@PathVariable(required = false) String sourceName,
@PathVariable(required = false) String startTime,@PathVariable(required = false) String endTime) throws JsonProcessingException, ParseException {
Page<PerformanceHeader> pa = new Page<PerformanceHeader>();
PerformanceHeader performanceHeader = new PerformanceHeader();
performanceHeader.setSourceName(sourceName);
- performanceHeader.setStartEpochMicrosec(UuiCommonUtil.isNotNullOrEmpty(startTime)?null:new SimpleDateFormat(Constant.DATE_FORMAT).parse(startTime).getTime()+"");
- performanceHeader.setLastEpochMicroSec(UuiCommonUtil.isNotNullOrEmpty(endTime)?null:new SimpleDateFormat(Constant.DATE_FORMAT).parse(endTime).getTime()+"");
- pa = performanceHeaderService.queryPerformanceHeader(performanceHeader,currentPage,pageSize);
+ performanceHeader.setStartEpochMicrosec(!UuiCommonUtil.isNotNullOrEmpty(startTime)?null:new SimpleDateFormat(Constant.DATE_FORMAT).parse(startTime).getTime()+"");
+ performanceHeader.setLastEpochMicroSec(!UuiCommonUtil.isNotNullOrEmpty(endTime)?null:new SimpleDateFormat(Constant.DATE_FORMAT).parse(endTime).getTime()+"");
+ pa = performanceHeaderService.queryPerformanceHeader(performanceHeader,Integer.parseInt(currentPage),Integer.parseInt(pageSize));
try {
Map<String,Object> map = new HashMap<>();
map.put("performances",pa.getList());
diff --git a/server/src/test/java/org/onap/usecaseui/server/controller/PerformanceControllerTest.java b/server/src/test/java/org/onap/usecaseui/server/controller/PerformanceControllerTest.java
index 3034ed37..1e4ec915 100755
--- a/server/src/test/java/org/onap/usecaseui/server/controller/PerformanceControllerTest.java
+++ b/server/src/test/java/org/onap/usecaseui/server/controller/PerformanceControllerTest.java
@@ -63,8 +63,8 @@ public class PerformanceControllerTest {
PerformanceHeader header = new PerformanceHeader();
- controller.getPerformanceData(currentPage,pageSize,sourceName,startTime,endTime);
- controller.getPerformanceData(currentPage,pageSize,null,null,null);
+ controller.getPerformanceData(currentPage+"",pageSize+"",sourceName,startTime,endTime);
+ controller.getPerformanceData(currentPage+"",pageSize+"",null,null,null);
verify(phs,times(1)).queryPerformanceHeader(header,currentPage,pageSize);
}