fixing from & quantity values for export-to-csv functionality
This commit is contained in:
parent
ec3bfd1eaf
commit
c94259da40
|
@ -88,6 +88,8 @@ public class PiWikController {
|
||||||
@RequestMapping(value = "/getPiwikSitesForRepos/csv" , method = RequestMethod.GET,produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
|
@RequestMapping(value = "/getPiwikSitesForRepos/csv" , method = RequestMethod.GET,produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public FileSystemResource getPiwikSitesForReposToCsv(
|
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 = "order",required=false,defaultValue = "DSC") OrderByType orderType,
|
||||||
@RequestParam(value = "orderField", required = false, defaultValue = "REPOSITORY_NAME") OrderByField orderField,
|
@RequestParam(value = "orderField", required = false, defaultValue = "REPOSITORY_NAME") OrderByField orderField,
|
||||||
@RequestParam(value = "searchField", required = false, defaultValue = "") String searchField,
|
@RequestParam(value = "searchField", required = false, defaultValue = "") String searchField,
|
||||||
|
@ -96,7 +98,7 @@ public class PiWikController {
|
||||||
) throws IOException {
|
) throws IOException {
|
||||||
|
|
||||||
Path p = Files.createTempFile("exportingCsv-", new Date().toString());
|
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())) {
|
try (PrintWriter writer = new PrintWriter(p.toFile())) {
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
Loading…
Reference in New Issue