public function indexAction() { $this->view->version = Version::get(); $this->view->modules = Icinga::app()->getModuleManager()->getLoadedModules(); $this->view->tabs = $this->getTabs()->add('about', array('label' => $this->translate('About'), 'title' => $this->translate('About Icinga Web 2'), 'url' => 'about'))->activate('about'); }
public function indexAction() { $this->view->version = Version::get(); }
public function moduleAction() { $this->assertPermission('config/modules'); $app = Icinga::app(); $manager = $app->getModuleManager(); $name = $this->getParam('name'); if ($manager->hasInstalled($name)) { $this->view->moduleData = $manager->select()->from('modules')->where('name', $name)->fetchRow(); if ($manager->hasLoaded($name)) { $module = $manager->getModule($name); } else { $module = new Module($app, $name, $manager->getModuleDir($name)); } $this->view->module = $module; $this->view->tabs = $module->getConfigTabs()->activate('info'); $this->view->moduleGitCommitId = Version::getGitHead($module->getBaseDir()); } else { $this->view->module = false; $this->view->tabs = null; } }