From 1c7b398219f6fff6f25ea584687d7b7ac21a2feb Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 30 Sep 2015 12:55:21 +0200 Subject: [PATCH] Navigation: Do not provide "dashlet" as default item type Please revert this commit once we're about to finish the new implementation. refs #6084 --- library/Icinga/Web/Navigation/Navigation.php | 16 +++++++++------- library/Icinga/Web/Widget/Dashboard.php | 1 + 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/library/Icinga/Web/Navigation/Navigation.php b/library/Icinga/Web/Navigation/Navigation.php index 55101edce..47f405447 100644 --- a/library/Icinga/Web/Navigation/Navigation.php +++ b/library/Icinga/Web/Navigation/Navigation.php @@ -429,12 +429,14 @@ class Navigation implements ArrayAccess, Countable, IteratorAggregate */ public function load($type) { - // Shareables - $this->merge(Icinga::app()->getSharedNavigation($type)); - - // User Preferences $user = Auth::getInstance()->getUser(); - $this->merge($user->getNavigation($type)); + if ($type !== 'dashboard-pane') { + // Shareables + $this->merge(Icinga::app()->getSharedNavigation($type)); + + // User Preferences + $this->merge($user->getNavigation($type)); + } // Modules $moduleManager = Icinga::app()->getModuleManager(); @@ -462,11 +464,11 @@ class Navigation implements ArrayAccess, Countable, IteratorAggregate 'menu-item' => array( 'label' => t('Menu Entry'), 'config' => 'menu' - ), + )/*, // Disabled, until it is able to fully replace the old implementation 'dashlet' => array( 'label' => 'Dashlet', 'config' => 'dashboard' - ) + )*/ ); $moduleItemTypes = array(); diff --git a/library/Icinga/Web/Widget/Dashboard.php b/library/Icinga/Web/Widget/Dashboard.php index c69fb4477..4ff192122 100644 --- a/library/Icinga/Web/Widget/Dashboard.php +++ b/library/Icinga/Web/Widget/Dashboard.php @@ -85,6 +85,7 @@ class Dashboard extends AbstractWidget } $this->mergePanes($panes); + $this->loadUserDashboards(); return $this; }