diff --git a/library/Icinga/Application/Modules/Module.php b/library/Icinga/Application/Modules/Module.php index 450de7ded..735738089 100644 --- a/library/Icinga/Application/Modules/Module.php +++ b/library/Icinga/Application/Modules/Module.php @@ -314,9 +314,12 @@ class Module $navigation = new Navigation(); foreach ($panes as $pane) { /** @var DashboardContainer $pane */ - $dashlets = array(); + $dashlets = []; foreach ($pane->getDashlets() as $dashletName => $dashletUrl) { - $dashlets[$this->translate($dashletName)] = $dashletUrl; + $dashlets[$dashletName] = [ + 'label' => $this->translate($dashletName), + 'url' => $dashletUrl + ]; } $navigation->addItem( @@ -326,7 +329,7 @@ class Module array( 'label' => $this->translate($pane->getName()), 'type' => 'dashboard-pane', - 'dashlets' => $dashlets + 'children' => $dashlets ) ) ); diff --git a/library/Icinga/Web/Navigation/DashboardPane.php b/library/Icinga/Web/Navigation/DashboardPane.php index f87259b03..71b3215cf 100644 --- a/library/Icinga/Web/Navigation/DashboardPane.php +++ b/library/Icinga/Web/Navigation/DashboardPane.php @@ -62,19 +62,6 @@ class DashboardPane extends NavigationItem $this->setUrl(Url::fromPath('dashboard', array('pane' => $this->getName()))); } - /** - * {@inheritdoc} - */ - public function merge(NavigationItem $item) - { - parent::merge($item); - - $this->setDashlets(array_merge( - $this->getDashlets(false), - $item->getDashlets(false) - )); - } - /** * Set disabled state for pane * diff --git a/library/Icinga/Web/Widget/Dashboard.php b/library/Icinga/Web/Widget/Dashboard.php index d6d8fc92e..cf3b0c59d 100644 --- a/library/Icinga/Web/Widget/Dashboard.php +++ b/library/Icinga/Web/Widget/Dashboard.php @@ -77,8 +77,8 @@ class Dashboard extends AbstractWidget foreach ($navigation as $dashboardPane) { /** @var DashboardPane $dashboardPane */ $pane = new Pane($dashboardPane->getLabel()); - foreach ($dashboardPane->getDashlets(false) as $title => $url) { - $pane->addDashlet($title, $url); + foreach ($dashboardPane->getChildren() as $dashlet) { + $pane->addDashlet($dashlet->getLabel(), $dashlet->getUrl()); } $panes[] = $pane;