setTitle($this->translate('Hosts')); $db = $this->getDb(); $hosts = Host::on($db)->with('state'); $summary = HoststateSummary::on($db)->with('state'); $limitControl = $this->createLimitControl(); $paginationControl = $this->createPaginationControl($hosts); $viewModeSwitcher = $this->createViewModeSwitcher(); $filterControl = $this->createFilterControl($hosts); $hostList = (new HostList($hosts)) ->setViewMode($viewModeSwitcher->getViewMode()); $this->filter($hosts); $this->filter($summary); yield $this->export($hosts, $summary); $this->addControl($paginationControl); $this->addControl($limitControl); $this->addControl($viewModeSwitcher); $this->addControl($filterControl); $this->addContent($hostList); $this->setAutorefreshInterval(10); } }