mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-09-25 18:59:04 +02:00
Always load dashlets for all of the dashboard pane & activate only the given| the first one
This commit is contained in:
parent
56bfe76a84
commit
a118831b38
@ -136,10 +136,8 @@ class Dashboard extends BaseHtmlElement implements DashboardEntry
|
|||||||
$this->tabs->add(
|
$this->tabs->add(
|
||||||
$pane->getName(),
|
$pane->getName(),
|
||||||
[
|
[
|
||||||
'title' => sprintf(
|
'active' => $pane->isActive(),
|
||||||
t('Show %s', 'dashboard.pane.tooltip'),
|
'title' => sprintf(t('Show %s', 'dashboard.pane.tooltip'), $pane->getTitle()),
|
||||||
$pane->getTitle()
|
|
||||||
),
|
|
||||||
'label' => $pane->getTitle(),
|
'label' => $pane->getTitle(),
|
||||||
'url' => clone($url),
|
'url' => clone($url),
|
||||||
'urlParams' => [$this->tabParam => $pane->getName()]
|
'urlParams' => [$this->tabParam => $pane->getName()]
|
||||||
|
@ -164,6 +164,7 @@ class DashboardHome extends BaseDashboard implements Sortable
|
|||||||
->setPriority($pane->priority);
|
->setPriority($pane->priority);
|
||||||
|
|
||||||
$this->addEntry($newPane);
|
$this->addEntry($newPane);
|
||||||
|
$newPane->loadDashboardEntries();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($name !== null) {
|
if ($name !== null) {
|
||||||
@ -171,13 +172,11 @@ class DashboardHome extends BaseDashboard implements Sortable
|
|||||||
$pane = $this->getEntry($name);
|
$pane = $this->getEntry($name);
|
||||||
|
|
||||||
$this->activatePane($pane);
|
$this->activatePane($pane);
|
||||||
$pane->loadDashboardEntries();
|
|
||||||
} else {
|
} else {
|
||||||
throw new HttpNotFoundException(t('Pane "%s" not found'), $name);
|
throw new HttpNotFoundException(t('Pane "%s" not found'), $name);
|
||||||
}
|
}
|
||||||
} elseif (($firstPane = $this->rewindEntries())) {
|
} elseif (($firstPane = $this->rewindEntries())) {
|
||||||
$this->activatePane($firstPane);
|
$this->activatePane($firstPane);
|
||||||
$firstPane->loadDashboardEntries();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user