Fix that selecting a x-axis link in the service grid produces an invalid filter

I've just fixed this quick and dirty as implementing the complete x IN y
syntax requires too much effort as currently available.

refs #7169
This commit is contained in:
Johannes Meyer 2014-11-20 14:26:24 +01:00
parent 99ad72a0da
commit 5f37739227

View File

@ -11,7 +11,7 @@
<?php <?php
$hasHeader = false; $hasHeader = false;
$pivotData = $this->pivot->toArray(); $pivotData = $this->pivot->toArray();
$hostFilter = '(' . implode('|', array_keys($pivotData)) . ')'; $hostFilter = '(host_name=' . implode('|host_name=', array_keys($pivotData)) . ')';
?> ?>
<?php if (count($pivotData) === 0): ?> <?php if (count($pivotData) === 0): ?>
@ -37,10 +37,9 @@ $hostFilter = '(' . implode('|', array_keys($pivotData)) . ')';
<a href="<?= $this->href( <a href="<?= $this->href(
'monitoring/list/services', 'monitoring/list/services',
array( array(
'service_description' => $service_description, 'service_description' => $service_description
'host_name' => $hostFilter
) )
); ?>"> ) . '&' . $hostFilter; ?>">
<abbr title="<?= $service_description; ?>"> <abbr title="<?= $service_description; ?>">
<?= strlen($service_description) > 18 ? substr($service_description, 0, 18) . '...' : $service_description; ?> <?= strlen($service_description) > 18 ? substr($service_description, 0, 18) . '...' : $service_description; ?>
</abbr> </abbr>