Skip to content

Commit

Permalink
Allow creating same dashlets from different modules
Browse files Browse the repository at this point in the history
  • Loading branch information
yhabteab committed Jun 10, 2022
1 parent f5c8fc9 commit c27a471
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion application/forms/Dashboard/SetupNewDashboardForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ protected function dumpArbitaryDashlets(bool $strict = true): void
if (! $strict && $title && $url) {
$dashlet
->setUrl($url)
->setName($title)
->setName($title . '(' . $module . ')')
->setTitle($title);
}

Expand Down
2 changes: 2 additions & 0 deletions library/Icinga/Web/Dashboard/Pane.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ public function manageEntry($entryOrEntries, BaseDashboard $origin = null, bool
'module_dashlet_id' => $systemUuid
]);
}

$this->addEntry($dashlet);
} elseif (! $this->hasEntry($dashlet->getName()) || ! $moveDashlet) {
$filterCondition = [
'id = ?' => $dashlet->getUuid(),
Expand Down

0 comments on commit c27a471

Please sign in to comment.