From c810f2bfd114a6bc5546bbcd7ee8187617b65df5 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Mon, 13 Feb 2017 12:24:58 +0100 Subject: [PATCH] Servicegrid: assemble filters with the Filter class refs #2523 --- .../views/scripts/list/servicegrid.phtml | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/modules/monitoring/application/views/scripts/list/servicegrid.phtml b/modules/monitoring/application/views/scripts/list/servicegrid.phtml index 845cac745..0e50855b5 100644 --- a/modules/monitoring/application/views/scripts/list/servicegrid.phtml +++ b/modules/monitoring/application/views/scripts/list/servicegrid.phtml @@ -1,4 +1,5 @@ compact): ?>

translate('No services found matching the filter.') ?>

$_) { + $hostFilter->orFilter(Filter::where('host_name', $hostName)); +} ?> @@ -30,8 +34,10 @@ $hostFilter = '(host_name=' . implode('|host_name=', array_keys($pivotData)) . ' $serviceDisplayName): ?>
qlink( $this->ellipsis($serviceDisplayName, 18), - 'monitoring/list/services?' . $hostFilter, - array('service_description' => $serviceDescription), + Url::fromPath('monitoring/list/services')->addFilter( + Filter::matchAll($hostFilter, Filter::where('service_description', $serviceDescription)) + ), + null, array('title' => sprintf( $this->translate('List all services with the name "%s" on all reported hosts'), $serviceDisplayName @@ -47,12 +53,16 @@ $hostFilter = '(host_name=' . implode('|host_name=', array_keys($pivotData)) . ' $hostDisplayName): ?>
$_) { + $serviceFilter->orFilter(Filter::where('service_description', $serviceName)); + } echo $this->qlink( $hostDisplayName, - 'monitoring/list/services?' . $serviceFilter, - array('host_name' => $hostName), + Url::fromPath('monitoring/list/services')->addFilter( + Filter::matchAll($serviceFilter, Filter::where('host_name', $hostName)) + ), + null, array('title' => sprintf($this->translate('List all reported services on host %s'), $hostDisplayName)) ); ?>