diff --git a/library/Icinga/Web/Dashboard/Dashboard.php b/library/Icinga/Web/Dashboard/Dashboard.php index ba9229f3a..95f47987e 100644 --- a/library/Icinga/Web/Dashboard/Dashboard.php +++ b/library/Icinga/Web/Dashboard/Dashboard.php @@ -136,10 +136,8 @@ class Dashboard extends BaseHtmlElement implements DashboardEntry $this->tabs->add( $pane->getName(), [ - 'title' => sprintf( - t('Show %s', 'dashboard.pane.tooltip'), - $pane->getTitle() - ), + 'active' => $pane->isActive(), + 'title' => sprintf(t('Show %s', 'dashboard.pane.tooltip'), $pane->getTitle()), 'label' => $pane->getTitle(), 'url' => clone($url), 'urlParams' => [$this->tabParam => $pane->getName()] diff --git a/library/Icinga/Web/Dashboard/DashboardHome.php b/library/Icinga/Web/Dashboard/DashboardHome.php index 8db816cc3..8c5b786d7 100644 --- a/library/Icinga/Web/Dashboard/DashboardHome.php +++ b/library/Icinga/Web/Dashboard/DashboardHome.php @@ -164,6 +164,7 @@ class DashboardHome extends BaseDashboard implements Sortable ->setPriority($pane->priority); $this->addEntry($newPane); + $newPane->loadDashboardEntries(); } if ($name !== null) { @@ -171,13 +172,11 @@ class DashboardHome extends BaseDashboard implements Sortable $pane = $this->getEntry($name); $this->activatePane($pane); - $pane->loadDashboardEntries(); } else { throw new HttpNotFoundException(t('Pane "%s" not found'), $name); } } elseif (($firstPane = $this->rewindEntries())) { $this->activatePane($firstPane); - $firstPane->loadDashboardEntries(); } return $this;