icingaweb2-module-director/application/controllers/WelcomeController.php
Thomas Gelf 816f8b8a72 Welcome: new controller showing initial help...
...especially in case your config is still missing.
2015-06-29 16:01:10 +02:00

20 lines
680 B
PHP

<?php
use Icinga\Module\Director\ActionController;
class Director_WelcomeController extends ActionController
{
public function indexAction()
{
$this->getTabs()->add('welcome', array(
'url' => $this->getRequest()->getUrl(),
'label' => $this->translate('Welcome')
))->activate('welcome');
if (! $this->Config()->get('db', 'resource')) {
$this->view->errorMessage = sprintf(
$this->translate('No database resource has been configured yet. Please %s to complete your config'),
$this->view->qlink($this->translate('click here'), 'director/settings')
);
}
}
}