Merge pull request #3749 from Icinga/fix/filter-not-preserved-when-navigating-away-from-the-host-servicegrid-3664

Fix that the filter is not preserved when navigating away from the host-/servicegrid
This commit is contained in:
Johannes Meyer 2019-04-16 14:21:27 +02:00 committed by GitHub
commit ed23d12c4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 20 deletions

View File

@ -3,7 +3,7 @@
<?= $this->tabs ?> <?= $this->tabs ?>
<div class="sort-controls-container"> <div class="sort-controls-container">
<?= $this->sortBox ?> <?= $this->sortBox ?>
<a href="<?= $this->href('monitoring/list/hostgroups') ?>" class="grid-toggle-link" <a href="<?= $this->href('monitoring/list/hostgroups')->addFilter($this->filterEditor->getFilter()) ?>" class="grid-toggle-link"
title="<?= $this->translate('Toogle grid view mode') ?>"> title="<?= $this->translate('Toogle grid view mode') ?>">
<?= $this->icon('th-list', null, ['class' => '-inactive']) ?> <?= $this->icon('th-list', null, ['class' => '-inactive']) ?>
<?= $this->icon('th-thumb-empty', null, ['class' => '-active']) ?> <?= $this->icon('th-thumb-empty', null, ['class' => '-active']) ?>
@ -24,7 +24,7 @@ if (! $hostGroups->hasResult()): ?>
<?php if ($hostGroup->hosts_down_unhandled > 0): ?> <?php if ($hostGroup->hosts_down_unhandled > 0): ?>
<?= $this->qlink( <?= $this->qlink(
$hostGroup->hosts_down_unhandled, $hostGroup->hosts_down_unhandled,
'monitoring/list/hosts', $this->url('monitoring/list/hosts')->addFilter($this->filterEditor->getFilter()),
[ [
'hostgroup_name' => $hostGroup->hostgroup_name, 'hostgroup_name' => $hostGroup->hostgroup_name,
'host_handled' => 0, 'host_handled' => 0,
@ -46,7 +46,7 @@ if (! $hostGroups->hasResult()): ?>
<?php elseif ($hostGroup->hosts_unreachable_unhandled > 0): ?> <?php elseif ($hostGroup->hosts_unreachable_unhandled > 0): ?>
<?= $this->qlink( <?= $this->qlink(
$hostGroup->hosts_unreachable_unhandled, $hostGroup->hosts_unreachable_unhandled,
'monitoring/list/hosts', $this->url('monitoring/list/hosts')->addFilter($this->filterEditor->getFilter()),
[ [
'hostgroup_name' => $hostGroup->hostgroup_name, 'hostgroup_name' => $hostGroup->hostgroup_name,
'host_handled' => 0, 'host_handled' => 0,
@ -68,7 +68,7 @@ if (! $hostGroups->hasResult()): ?>
<?php elseif ($hostGroup->hosts_down_handled > 0): ?> <?php elseif ($hostGroup->hosts_down_handled > 0): ?>
<?= $this->qlink( <?= $this->qlink(
$hostGroup->hosts_down_handled, $hostGroup->hosts_down_handled,
'monitoring/list/hosts', $this->url('monitoring/list/hosts')->addFilter($this->filterEditor->getFilter()),
[ [
'hostgroup_name' => $hostGroup->hostgroup_name, 'hostgroup_name' => $hostGroup->hostgroup_name,
'host_handled' => 1, 'host_handled' => 1,
@ -90,7 +90,7 @@ if (! $hostGroups->hasResult()): ?>
<?php elseif ($hostGroup->hosts_unreachable_handled > 0): ?> <?php elseif ($hostGroup->hosts_unreachable_handled > 0): ?>
<?= $this->qlink( <?= $this->qlink(
$hostGroup->hosts_unreachable_handled, $hostGroup->hosts_unreachable_handled,
'monitoring/list/hosts', $this->url('monitoring/list/hosts')->addFilter($this->filterEditor->getFilter()),
[ [
'hostgroup_name' => $hostGroup->hostgroup_name, 'hostgroup_name' => $hostGroup->hostgroup_name,
'host_handled' => 0, 'host_handled' => 0,
@ -112,7 +112,7 @@ if (! $hostGroups->hasResult()): ?>
<?php elseif ($hostGroup->hosts_pending > 0): ?> <?php elseif ($hostGroup->hosts_pending > 0): ?>
<?= $this->qlink( <?= $this->qlink(
$hostGroup->hosts_pending, $hostGroup->hosts_pending,
'monitoring/list/hosts', $this->url('monitoring/list/hosts')->addFilter($this->filterEditor->getFilter()),
[ [
'hostgroup_name' => $hostGroup->hostgroup_name, 'hostgroup_name' => $hostGroup->hostgroup_name,
'host_state' => 99 'host_state' => 99
@ -133,7 +133,7 @@ if (! $hostGroups->hasResult()): ?>
<?php elseif ($hostGroup->hosts_up > 0): ?> <?php elseif ($hostGroup->hosts_up > 0): ?>
<?= $this->qlink( <?= $this->qlink(
$hostGroup->hosts_up, $hostGroup->hosts_up,
'monitoring/list/hosts', $this->url('monitoring/list/hosts')->addFilter($this->filterEditor->getFilter()),
[ [
'hostgroup_name' => $hostGroup->hostgroup_name, 'hostgroup_name' => $hostGroup->hostgroup_name,
'host_state' => 0 'host_state' => 0
@ -158,7 +158,7 @@ if (! $hostGroups->hasResult()): ?>
<?php endif ?> <?php endif ?>
<?= $this->qlink( <?= $this->qlink(
$hostGroup->hostgroup_alias, $hostGroup->hostgroup_alias,
'monitoring/list/hosts', $this->url('monitoring/list/hosts')->addFilter($this->filterEditor->getFilter()),
['hostgroup_name' => $hostGroup->hostgroup_name], ['hostgroup_name' => $hostGroup->hostgroup_name],
[ [
'title' => sprintf( 'title' => sprintf(

View File

@ -8,7 +8,7 @@ if (! $this->compact): ?>
<div class="sort-controls-container"> <div class="sort-controls-container">
<?= $this->limiter ?> <?= $this->limiter ?>
<?= $this->sortBox ?> <?= $this->sortBox ?>
<a href="<?= $this->href('monitoring/list/hostgroup-grid') ?>" class="grid-toggle-link" <a href="<?= $this->href('monitoring/list/hostgroup-grid')->addFilter($this->filterEditor->getFilter()) ?>" class="grid-toggle-link"
title="<?= $this->translate('Toogle grid view mode') ?>"> title="<?= $this->translate('Toogle grid view mode') ?>">
<?= $this->icon('th-list', null, ['class' => '-active']) ?> <?= $this->icon('th-list', null, ['class' => '-active']) ?>
<?= $this->icon('th-thumb-empty', null, ['class' => '-inactive']) ?> <?= $this->icon('th-thumb-empty', null, ['class' => '-inactive']) ?>

View File

@ -3,7 +3,7 @@
<?= $this->tabs ?> <?= $this->tabs ?>
<div class="sort-controls-container"> <div class="sort-controls-container">
<?= $this->sortBox ?> <?= $this->sortBox ?>
<a href="<?= $this->href('monitoring/list/servicegroups') ?>" class="grid-toggle-link" <a href="<?= $this->href('monitoring/list/servicegroups')->addFilter($this->filterEditor->getFilter()) ?>" class="grid-toggle-link"
title="<?= $this->translate('Toogle grid view mode') ?>"> title="<?= $this->translate('Toogle grid view mode') ?>">
<?= $this->icon('th-list', null, ['class' => '-inactive']) ?> <?= $this->icon('th-list', null, ['class' => '-inactive']) ?>
<?= $this->icon('th-thumb-empty', null, ['class' => '-active']) ?> <?= $this->icon('th-thumb-empty', null, ['class' => '-active']) ?>
@ -24,7 +24,7 @@ if (! $serviceGroups->hasResult()): ?>
<?php if ($serviceGroup->services_critical_unhandled > 0): ?> <?php if ($serviceGroup->services_critical_unhandled > 0): ?>
<?= $this->qlink( <?= $this->qlink(
$serviceGroup->services_critical_unhandled, $serviceGroup->services_critical_unhandled,
'monitoring/list/servicegrid', $this->url('monitoring/list/servicegrid')->addFilter($this->filterEditor->getFilter()),
[ [
'servicegroup_name' => $serviceGroup->servicegroup_name, 'servicegroup_name' => $serviceGroup->servicegroup_name,
'service_handled' => 0, 'service_handled' => 0,
@ -46,7 +46,7 @@ if (! $serviceGroups->hasResult()): ?>
<?php elseif ($serviceGroup->services_warning_unhandled > 0): ?> <?php elseif ($serviceGroup->services_warning_unhandled > 0): ?>
<?= $this->qlink( <?= $this->qlink(
$serviceGroup->services_warning_unhandled, $serviceGroup->services_warning_unhandled,
'monitoring/list/servicegrid', $this->url('monitoring/list/servicegrid')->addFilter($this->filterEditor->getFilter()),
[ [
'servicegroup_name' => $serviceGroup->servicegroup_name, 'servicegroup_name' => $serviceGroup->servicegroup_name,
'service_handled' => 0, 'service_handled' => 0,
@ -68,7 +68,7 @@ if (! $serviceGroups->hasResult()): ?>
<?php elseif ($serviceGroup->services_unknown_unhandled > 0): ?> <?php elseif ($serviceGroup->services_unknown_unhandled > 0): ?>
<?= $this->qlink( <?= $this->qlink(
$serviceGroup->services_unknown_unhandled, $serviceGroup->services_unknown_unhandled,
'monitoring/list/servicegrid', $this->url('monitoring/list/servicegrid')->addFilter($this->filterEditor->getFilter()),
[ [
'servicegroup_name' => $serviceGroup->servicegroup_name, 'servicegroup_name' => $serviceGroup->servicegroup_name,
'service_handled' => 0, 'service_handled' => 0,
@ -90,7 +90,7 @@ if (! $serviceGroups->hasResult()): ?>
<?php elseif ($serviceGroup->services_critical_handled > 0): ?> <?php elseif ($serviceGroup->services_critical_handled > 0): ?>
<?= $this->qlink( <?= $this->qlink(
$serviceGroup->services_critical_handled, $serviceGroup->services_critical_handled,
'monitoring/list/servicegrid', $this->url('monitoring/list/servicegrid')->addFilter($this->filterEditor->getFilter()),
[ [
'servicegroup_name' => $serviceGroup->servicegroup_name, 'servicegroup_name' => $serviceGroup->servicegroup_name,
'service_handled' => 1, 'service_handled' => 1,
@ -112,7 +112,7 @@ if (! $serviceGroups->hasResult()): ?>
<?php elseif ($serviceGroup->services_warning_handled > 0): ?> <?php elseif ($serviceGroup->services_warning_handled > 0): ?>
<?= $this->qlink( <?= $this->qlink(
$serviceGroup->services_warning_handled, $serviceGroup->services_warning_handled,
'monitoring/list/servicegrid', $this->url('monitoring/list/servicegrid')->addFilter($this->filterEditor->getFilter()),
[ [
'servicegroup_name' => $serviceGroup->servicegroup_name, 'servicegroup_name' => $serviceGroup->servicegroup_name,
'service_handled' => 1, 'service_handled' => 1,
@ -134,7 +134,7 @@ if (! $serviceGroups->hasResult()): ?>
<?php elseif ($serviceGroup->services_unknown_handled > 0): ?> <?php elseif ($serviceGroup->services_unknown_handled > 0): ?>
<?= $this->qlink( <?= $this->qlink(
$serviceGroup->services_unknown_handled, $serviceGroup->services_unknown_handled,
'monitoring/list/servicegrid', $this->url('monitoring/list/servicegrid')->addFilter($this->filterEditor->getFilter()),
[ [
'servicegroup_name' => $serviceGroup->servicegroup_name, 'servicegroup_name' => $serviceGroup->servicegroup_name,
'service_handled' => 1, 'service_handled' => 1,
@ -156,7 +156,7 @@ if (! $serviceGroups->hasResult()): ?>
<?php elseif ($serviceGroup->services_pending > 0): ?> <?php elseif ($serviceGroup->services_pending > 0): ?>
<?= $this->qlink( <?= $this->qlink(
$serviceGroup->services_pending, $serviceGroup->services_pending,
'monitoring/list/servicegrid', $this->url('monitoring/list/servicegrid')->addFilter($this->filterEditor->getFilter()),
[ [
'servicegroup_name' => $serviceGroup->servicegroup_name, 'servicegroup_name' => $serviceGroup->servicegroup_name,
'service_state' => 99 'service_state' => 99
@ -177,7 +177,7 @@ if (! $serviceGroups->hasResult()): ?>
<?php elseif ($serviceGroup->services_ok > 0): ?> <?php elseif ($serviceGroup->services_ok > 0): ?>
<?= $this->qlink( <?= $this->qlink(
$serviceGroup->services_ok, $serviceGroup->services_ok,
'monitoring/list/servicegrid', $this->url('monitoring/list/servicegrid')->addFilter($this->filterEditor->getFilter()),
[ [
'servicegroup_name' => $serviceGroup->servicegroup_name, 'servicegroup_name' => $serviceGroup->servicegroup_name,
'service_state' => 0 'service_state' => 0
@ -202,7 +202,7 @@ if (! $serviceGroups->hasResult()): ?>
<?php endif ?> <?php endif ?>
<?= $this->qlink( <?= $this->qlink(
$serviceGroup->servicegroup_alias, $serviceGroup->servicegroup_alias,
'monitoring/list/servicegrid', $this->url('monitoring/list/servicegrid')->addFilter($this->filterEditor->getFilter()),
['servicegroup_name' => $serviceGroup->servicegroup_name], ['servicegroup_name' => $serviceGroup->servicegroup_name],
[ [
'title' => sprintf( 'title' => sprintf(

View File

@ -7,7 +7,7 @@ if (! $this->compact): ?>
<div class="sort-controls-container"> <div class="sort-controls-container">
<?= $this->limiter ?> <?= $this->limiter ?>
<?= $this->sortBox ?> <?= $this->sortBox ?>
<a href="<?= $this->href('monitoring/list/servicegroup-grid') ?>" class="grid-toggle-link" <a href="<?= $this->href('monitoring/list/servicegroup-grid')->addFilter($this->filterEditor->getFilter()) ?>" class="grid-toggle-link"
title="<?= $this->translate('Toogle grid view mode') ?>"> title="<?= $this->translate('Toogle grid view mode') ?>">
<?= $this->icon('th-list', null, ['class' => '-active']) ?> <?= $this->icon('th-list', null, ['class' => '-active']) ?>
<?= $this->icon('th-thumb-empty', null, ['class' => '-inactive']) ?> <?= $this->icon('th-thumb-empty', null, ['class' => '-inactive']) ?>