use of org.opennms.web.svclayer.model.ManageDatabaseReportCommand in project opennms by OpenNMS.
the class ManageDatabaseReportController method listReports.
@RequestMapping(method = RequestMethod.GET)
public ModelAndView listReports(@RequestParam(value = "p", required = false, defaultValue = "0") int page, ModelAndView modelAndView) {
List<ReportCatalogEntry> reportCatalog = reportStoreService.getAll();
Map<String, Object> formatMap = reportStoreService.getFormatMap();
PagedListHolder<ReportCatalogEntry> pagedListHolder = new PagedListHolder<>(reportCatalog);
pagedListHolder.setPageSize(m_pageSize);
// strip minus values
pagedListHolder.setPage(Math.max(page, 0));
modelAndView.addObject("formatMap", formatMap);
modelAndView.addObject("pagedListHolder", pagedListHolder);
modelAndView.addObject("command", new ManageDatabaseReportCommand());
modelAndView.setViewName("/report/database/manage");
return modelAndView;
}
Aggregations