Fix service selection in event history

Add rowaction class to all service rows, to make services selectable again.
This commit is contained in:
Matthias Jentsch 2015-06-30 14:07:12 +02:00
parent 6a7e3fe440
commit 0fcb054be4
2 changed files with 11 additions and 7 deletions

View File

@ -45,10 +45,11 @@ class Zend_View_Helper_Link extends Zend_View_Helper_Abstract
* @param string $serviceLinkText Text for the service link, e.g. the service's display name
* @param string $host Hostname
* @param string $hostLinkText Text for the host link, e.g. the host's display name
* @param string $class An optional class to use for this link
*
* @return string
*/
public function service($service, $serviceLinkText, $host, $hostLinkText)
public function service($service, $serviceLinkText, $host, $hostLinkText, $class = null)
{
return sprintf(
'%s: %s',
@ -57,11 +58,14 @@ class Zend_View_Helper_Link extends Zend_View_Helper_Abstract
$serviceLinkText,
'monitoring/service/show',
array('host' => $host, 'service' => $service),
array('title' => sprintf(
$this->view->translate('Show detailed information for service %s on host %s'),
$service,
$host
))
array(
'title' => sprintf(
$this->view->translate('Show detailed information for service %s on host %s'),
$service,
$host
),
'class' => $class
)
)
);
}

View File

@ -82,7 +82,7 @@ if (count($history) === 0) {
<td>
<?php if ($isService): ?>
<?= $this->link()->service(
$event->service_description, $event->service_display_name, $event->host_name, $event->host_display_name
$event->service_description, $event->service_display_name, $event->host_name, $event->host_display_name, 'rowaction'
) ?>
<?php else: ?>
<?= $this->link()->host($event->host_name, $event->host_display_name) ?>