From cc94c12e55239baba48989a12df4db2b9c4c1d23 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 11 Jul 2019 14:50:09 +0200 Subject: [PATCH] Fix show all hosts/services links in the hostgroup overview Before, the forced hostgroup_name paramemter may interfere with an existing hostgroup_name filter. --- .../views/scripts/list/hostgroups.phtml | 30 ++++++++++++------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/modules/monitoring/application/views/scripts/list/hostgroups.phtml b/modules/monitoring/application/views/scripts/list/hostgroups.phtml index a2b8a1efb..aab39f800 100644 --- a/modules/monitoring/application/views/scripts/list/hostgroups.phtml +++ b/modules/monitoring/application/views/scripts/list/hostgroups.phtml @@ -1,4 +1,5 @@ compact): ?> @@ -42,12 +43,15 @@ if (! $this->compact): ?> qlink( $hostGroup->hostgroup_alias, - $this->url('monitoring/list/hosts')->addFilter($this->filterEditor->getFilter()), - array('hostgroup_name' => $hostGroup->hostgroup_name, 'sort' => 'host_severity'), - array('title' => sprintf( + $this + ->url('monitoring/list/hosts') + ->setParams(['hostgroup_name' => $hostGroup->hostgroup_name]) + ->addFilter($this->filterEditor->getFilter()), + ['sort' => 'host_severity'], + ['title' => sprintf( $this->translate('List all hosts in the group "%s"'), $hostGroup->hostgroup_alias - )) + )] ) ?> @@ -140,12 +144,18 @@ if (! $this->compact): ?> qlink( $hostGroup->services_total, - $this->url('monitoring/list/services')->addFilter($this->filterEditor->getFilter()), - array('hostgroup_name' => $hostGroup->hostgroup_name, 'sort' => 'service_severity'), - array('title' => sprintf( - $this->translate('List all services of all hosts in host group "%s"'), - $hostGroup->hostgroup_alias - ), 'class' => 'badge') + $this + ->url('monitoring/list/services') + ->setParams(['hostgroup_name' => $hostGroup->hostgroup_name]) + ->addFilter($this->filterEditor->getFilter()), + ['sort' => 'service_severity'], + [ + 'title' => sprintf( + $this->translate('List all services of all hosts in host group "%s"'), + $hostGroup->hostgroup_alias + ), + 'class' => 'badge' + ] ) ?>