From 81a3be74f35e106b7e7c200d37f000d0b4e8b114 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 13 Aug 2024 11:37:12 +0200 Subject: [PATCH] Dashboard: Don't merge already existing dashlets fixes #5203 --- library/Icinga/Web/Widget/Dashboard.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/library/Icinga/Web/Widget/Dashboard.php b/library/Icinga/Web/Widget/Dashboard.php index 5a8796d27..4aa84c7ca 100644 --- a/library/Icinga/Web/Widget/Dashboard.php +++ b/library/Icinga/Web/Widget/Dashboard.php @@ -147,15 +147,17 @@ class Dashboard extends AbstractWidget 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);