getRequest()->isGet()) { $this->setAutorefreshInterval(10); } $this->view->title = $this->translate('Icinga Director'); $this->singleTab($this->translate('Overview')); $dashboards = array(); foreach (array('Objects', 'Deployment', 'Data') as $name) { $dashboard = Dashboard::loadByName($name, $this->db(), $this->view); if ($dashboard->isAvailable()) { $dashboards[$name] = $dashboard; } } if (empty($dashboards)) { throw new NotFoundError('Got no "%s" dashboard for you', $name); } $this->view->dashboards = $dashboards; } }