diff --git a/application/controllers/DowntimesController.php b/application/controllers/DowntimesController.php new file mode 100644 index 00000000..1c7f81d1 --- /dev/null +++ b/application/controllers/DowntimesController.php @@ -0,0 +1,40 @@ +setTitle($this->translate('Downtimes')); + + $db = $this->getDb(); + + $downtimes = Downtime::on($db)->with([ + 'host', + 'host.state', + 'service', + 'service.host', + 'service.host.state', + 'service.state' + ]); + + $limitControl = $this->createLimitControl(); + $paginationControl = $this->createPaginationControl($downtimes); + $filterControl = $this->createFilterControl($downtimes); + + $this->filter($downtimes); + + yield $this->export($downtimes); + + $this->addControl($paginationControl); + $this->addControl($limitControl); + $this->addControl($filterControl); + + $this->addContent(new DowntimeList($downtimes)); + } +}