Fix show all hosts/services links in the hostgroup overview

Before, the forced hostgroup_name paramemter may interfere with an
existing hostgroup_name filter.
This commit is contained in:
Eric Lippmann 2019-07-11 14:50:09 +02:00 committed by Johannes Meyer
parent 9a75e101ee
commit cc94c12e55

View File

@ -1,4 +1,5 @@
<?php <?php
use Icinga\Module\Monitoring\Web\Widget\StateBadges; use Icinga\Module\Monitoring\Web\Widget\StateBadges;
if (! $this->compact): ?> if (! $this->compact): ?>
@ -42,12 +43,15 @@ if (! $this->compact): ?>
<th> <th>
<?= $this->qlink( <?= $this->qlink(
$hostGroup->hostgroup_alias, $hostGroup->hostgroup_alias,
$this->url('monitoring/list/hosts')->addFilter($this->filterEditor->getFilter()), $this
array('hostgroup_name' => $hostGroup->hostgroup_name, 'sort' => 'host_severity'), ->url('monitoring/list/hosts')
array('title' => sprintf( ->setParams(['hostgroup_name' => $hostGroup->hostgroup_name])
->addFilter($this->filterEditor->getFilter()),
['sort' => 'host_severity'],
['title' => sprintf(
$this->translate('List all hosts in the group "%s"'), $this->translate('List all hosts in the group "%s"'),
$hostGroup->hostgroup_alias $hostGroup->hostgroup_alias
)) )]
) ?> ) ?>
</th> </th>
<td> <td>
@ -140,12 +144,18 @@ if (! $this->compact): ?>
<td class="count-col"> <td class="count-col">
<?= $this->qlink( <?= $this->qlink(
$hostGroup->services_total, $hostGroup->services_total,
$this->url('monitoring/list/services')->addFilter($this->filterEditor->getFilter()), $this
array('hostgroup_name' => $hostGroup->hostgroup_name, 'sort' => 'service_severity'), ->url('monitoring/list/services')
array('title' => sprintf( ->setParams(['hostgroup_name' => $hostGroup->hostgroup_name])
$this->translate('List all services of all hosts in host group "%s"'), ->addFilter($this->filterEditor->getFilter()),
$hostGroup->hostgroup_alias ['sort' => 'service_severity'],
), 'class' => 'badge') [
'title' => sprintf(
$this->translate('List all services of all hosts in host group "%s"'),
$hostGroup->hostgroup_alias
),
'class' => 'badge'
]
) ?> ) ?>
</td> </td>
<td> <td>