diff --git a/library/Icinga/Web/Controller/ActionController.php b/library/Icinga/Web/Controller/ActionController.php index 7593db752..2cee1e9d3 100644 --- a/library/Icinga/Web/Controller/ActionController.php +++ b/library/Icinga/Web/Controller/ActionController.php @@ -134,6 +134,7 @@ class ActionController extends Zend_Controller_Action if ($this->requiresConfig() === false) { if ($this->requiresLogin() === false) { $this->view->tabs = new Tabs(); + $this->moduleInit(); $this->init(); } else { $url = $this->getRequestUrl(); @@ -148,6 +149,10 @@ class ActionController extends Zend_Controller_Action } } + protected function moduleInit() + { + } + protected function getWindowId() { if ($this->windowId === null) { diff --git a/modules/monitoring/library/Monitoring/Controller.php b/modules/monitoring/library/Monitoring/Controller.php index a5d17b89e..666101263 100644 --- a/modules/monitoring/library/Monitoring/Controller.php +++ b/modules/monitoring/library/Monitoring/Controller.php @@ -37,6 +37,13 @@ use Icinga\File\Csv; */ class Controller extends ActionController { + /** + * The backend used for this controller + * + * @var Backend + */ + protected $backend; + /** * Compact layout name * @@ -47,6 +54,11 @@ class Controller extends ActionController */ protected $compactView; + protected function moduleInit() + { + $this->backend = Backend::createBackend($this->_getParam('backend')); + } + protected function handleFormatRequest($query) { if ($this->compactView !== null && ($this->_getParam('view', false) === 'compact')) {