2013-06-14 07:51:44 -04:00
|
|
|
<?php
|
2015-02-04 04:46:36 -05:00
|
|
|
/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */
|
2013-06-14 07:51:44 -04:00
|
|
|
|
2015-08-27 07:31:36 -04:00
|
|
|
namespace Icinga\Controllers;
|
2013-06-14 07:51:44 -04:00
|
|
|
|
2014-01-24 06:20:13 -05:00
|
|
|
use Icinga\Web\Controller\ActionController;
|
2014-03-04 08:24:53 -05:00
|
|
|
use Icinga\Web\Url;
|
2013-06-14 07:51:44 -04:00
|
|
|
|
|
|
|
|
/**
|
2013-08-16 08:56:23 -04:00
|
|
|
* Application wide index controller
|
2013-06-14 07:51:44 -04:00
|
|
|
*/
|
|
|
|
|
class IndexController extends ActionController
|
|
|
|
|
{
|
|
|
|
|
/**
|
2013-08-30 09:50:49 -04:00
|
|
|
* Use a default redirection rule to welcome page
|
2013-06-14 07:51:44 -04:00
|
|
|
*/
|
|
|
|
|
public function preDispatch()
|
|
|
|
|
{
|
2013-08-30 09:50:49 -04:00
|
|
|
if ($this->getRequest()->getActionName() !== 'welcome') {
|
2015-08-27 07:32:35 -04:00
|
|
|
// @TODO(el): Avoid landing page redirects: https://dev.icinga.org/issues/9656
|
2014-10-20 07:27:33 -04:00
|
|
|
$this->redirectNow(Url::fromRequest()->setPath('dashboard'));
|
2013-06-14 07:51:44 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2013-08-16 08:56:23 -04:00
|
|
|
* Application's start page
|
2013-06-14 07:51:44 -04:00
|
|
|
*/
|
|
|
|
|
public function welcomeAction()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|