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