monitoring: Clone the filter for the grid links
Before, it was impossible to change an existing filter via the filter editor in the host and service group views because of an exception about wrong IDs. The filter editor sets the IDs correctly. But since we're adding the filter again to another URL, FilterChain::addFilter() overrides the IDs because it is not working with a clone.
This commit is contained in:
parent
d2a2eae600
commit
a94e8fb211
|
@ -8,7 +8,7 @@ if (! $this->compact): ?>
|
|||
<div class="sort-controls-container">
|
||||
<?= $this->limiter ?>
|
||||
<?= $this->sortBox ?>
|
||||
<a href="<?= $this->href('monitoring/list/hostgroup-grid')->addFilter($this->filterEditor->getFilter()) ?>" class="grid-toggle-link"
|
||||
<a href="<?= $this->href('monitoring/list/hostgroup-grid')->addFilter(clone $this->filterEditor->getFilter()) ?>" class="grid-toggle-link"
|
||||
title="<?= $this->translate('Toogle grid view mode') ?>">
|
||||
<?= $this->icon('th-list', null, ['class' => '-active']) ?>
|
||||
<?= $this->icon('th-thumb-empty', null, ['class' => '-inactive']) ?>
|
||||
|
|
|
@ -7,7 +7,7 @@ if (! $this->compact): ?>
|
|||
<div class="sort-controls-container">
|
||||
<?= $this->limiter ?>
|
||||
<?= $this->sortBox ?>
|
||||
<a href="<?= $this->href('monitoring/list/servicegroup-grid')->addFilter($this->filterEditor->getFilter()) ?>" class="grid-toggle-link"
|
||||
<a href="<?= $this->href('monitoring/list/servicegroup-grid')->addFilter(clone $this->filterEditor->getFilter()) ?>" class="grid-toggle-link"
|
||||
title="<?= $this->translate('Toogle grid view mode') ?>">
|
||||
<?= $this->icon('th-list', null, ['class' => '-active']) ?>
|
||||
<?= $this->icon('th-thumb-empty', null, ['class' => '-inactive']) ?>
|
||||
|
|
Loading…
Reference in New Issue