From c71f3cd75d140b45b2ed1d5725058e1e549050fc Mon Sep 17 00:00:00 2001 From: Yonas Habteab Date: Fri, 11 Mar 2022 16:45:07 +0100 Subject: [PATCH] Make use of the new controller by default --- application/forms/Authentication/LoginForm.php | 3 ++- application/layouts/scripts/body.phtml | 3 ++- application/views/scripts/layout/menu.phtml | 2 +- library/Icinga/Web/Menu.php | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/application/forms/Authentication/LoginForm.php b/application/forms/Authentication/LoginForm.php index 87b32ab3c..fa316450d 100644 --- a/application/forms/Authentication/LoginForm.php +++ b/application/forms/Authentication/LoginForm.php @@ -12,6 +12,7 @@ use Icinga\Authentication\User\ExternalBackend; use Icinga\Common\Database; use Icinga\Exception\Http\HttpBadRequestException; use Icinga\User; +use Icinga\Web\Dashboard\Dashboard; use Icinga\Web\Form; use Icinga\Web\RememberMe; use Icinga\Web\Url; @@ -28,7 +29,7 @@ class LoginForm extends Form /** * Redirect URL */ - const REDIRECT_URL = 'dashboard'; + const REDIRECT_URL = Dashboard::BASE_ROUTE; public static $defaultElementDecorators = [ ['ViewHelper', ['separator' => '']], diff --git a/application/layouts/scripts/body.phtml b/application/layouts/scripts/body.phtml index 87b570bfe..fea90ee7b 100644 --- a/application/layouts/scripts/body.phtml +++ b/application/layouts/scripts/body.phtml @@ -1,5 +1,6 @@ layout()->inlineLayout) {
qlink( '', - Auth::getInstance()->isAuthenticated() ? 'dashboard' : '', + Auth::getInstance()->isAuthenticated() ? Dashboard::BASE_ROUTE : '', null, array( 'aria-hidden' => 'true', diff --git a/application/views/scripts/layout/menu.phtml b/application/views/scripts/layout/menu.phtml index dfb544d63..fd7ba20f7 100644 --- a/application/views/scripts/layout/menu.phtml +++ b/application/views/scripts/layout/menu.phtml @@ -6,7 +6,7 @@ use Icinga\Web\Widget\SearchDashboard; $searchDashboard = new SearchDashboard(); $searchDashboard->setUser($this->Auth()->getUser()); -if ($searchDashboard->search('dummy')->getPane('search')->hasDashlets()): ?> +if ($searchDashboard->search('dummy')->getActiveHome()->getPane('search')->hasDashlets()): ?>