setTitle($this->translate('Notifications')); $db = $this->getDb(); $notifications = NotificationHistory::on($db)->with([ 'host', 'host.state', 'service', 'service.host', 'service.host.state', 'service.state' ]); $limitControl = $this->createLimitControl(); $paginationControl = $this->createPaginationControl($notifications); $filterControl = $this->createFilterControl($notifications); $this->filter($notifications); yield $this->export($notifications); $this->addControl($paginationControl); $this->addControl($limitControl); $this->addControl($filterControl); $this->addContent(new NotificationList($notifications)); $this->setAutorefreshInterval(10); } }