fixing from & quantity values for export-to-csv functionality

This commit is contained in:
Ioannis Diplas 2019-08-30 09:02:38 +00:00
parent ec3bfd1eaf
commit c94259da40
1 changed files with 3 additions and 1 deletions

View File

@ -88,6 +88,8 @@ public class PiWikController {
@RequestMapping(value = "/getPiwikSitesForRepos/csv" , method = RequestMethod.GET,produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
@ResponseBody
public FileSystemResource getPiwikSitesForReposToCsv(
@RequestParam(value = "from",required=false,defaultValue = "0") int from,
@RequestParam(value = "quantity",required=false,defaultValue = "10000") int quantity,
@RequestParam(value = "order",required=false,defaultValue = "DSC") OrderByType orderType,
@RequestParam(value = "orderField", required = false, defaultValue = "REPOSITORY_NAME") OrderByField orderField,
@RequestParam(value = "searchField", required = false, defaultValue = "") String searchField,
@ -96,7 +98,7 @@ public class PiWikController {
) throws IOException {
Path p = Files.createTempFile("exportingCsv-", new Date().toString());
List<PiwikInfo> returning = piWikService.getPiwikSitesForRepos(orderField,orderType,0,100000,searchField);
List<PiwikInfo> returning = piWikService.getPiwikSitesForRepos(orderField,orderType,0,10000,searchField);
try (PrintWriter writer = new PrintWriter(p.toFile())) {
StringBuilder sb = new StringBuilder();