Skip to content

Commit

Permalink
Dashboard: Don't merge already existing dashlets
Browse files Browse the repository at this point in the history
fixes #5203
  • Loading branch information
nilmerg committed Aug 13, 2024
1 parent d06ce98 commit 81a3be7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions library/Icinga/Web/Widget/Dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,17 @@ protected function loadUserDashboardsFromFile($file, Navigation $dashboardNaviga
if ($dashboardPane !== null) {
$key = $dashboardPane->getLabel();
}
$pane = null;
if ($this->hasPane($key)) {
$panes[$key] = $this->getPane($key);
$pane = $this->getPane($key);
} else {
$panes[$key] = new Pane($key);
$pane = new Pane($key);
$panes[$key] = $pane;
$panes[$key]->setTitle($part->title);
}
$panes[$key]->setUserWidget();
$pane->setUserWidget();
if ((bool) $part->get('disabled', false) === true) {
$panes[$key]->setDisabled();
$pane->setDisabled();
}
} else {
list($paneName, $dashletName) = explode('.', $key, 2);
Expand Down

0 comments on commit 81a3be7

Please sign in to comment.