Search in sources :

Example 1 with ManageReportScheduleCommand

use of org.opennms.web.svclayer.model.ManageReportScheduleCommand in project opennms by OpenNMS.

the class ManageReportScheduleController method listTriggers.

@RequestMapping(method = RequestMethod.GET)
public ModelAndView listTriggers(@RequestParam(value = "p", required = false, defaultValue = "0") int page, ModelAndView modelAndView) {
    List<TriggerDescription> reportTriggers = m_reportSchedulerService.getTriggerDescriptions();
    PagedListHolder<TriggerDescription> pagedListHolder = new PagedListHolder<>(reportTriggers);
    pagedListHolder.setPageSize(m_pageSize);
    // strip minus values
    pagedListHolder.setPage(Math.max(page, 0));
    modelAndView.addObject("pagedListHolder", pagedListHolder);
    modelAndView.addObject("command", new ManageReportScheduleCommand());
    modelAndView.setViewName("/report/database/manageSchedule");
    return modelAndView;
}
Also used : TriggerDescription(org.opennms.web.svclayer.model.TriggerDescription) ManageReportScheduleCommand(org.opennms.web.svclayer.model.ManageReportScheduleCommand) PagedListHolder(org.springframework.beans.support.PagedListHolder) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

ManageReportScheduleCommand (org.opennms.web.svclayer.model.ManageReportScheduleCommand)1 TriggerDescription (org.opennms.web.svclayer.model.TriggerDescription)1 PagedListHolder (org.springframework.beans.support.PagedListHolder)1 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)1