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

View File

@ -82,7 +82,7 @@ if (count($history) === 0) {
<td> <td>
<?php if ($isService): ?> <?php if ($isService): ?>
<?= $this->link()->service( <?= $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: ?> <?php else: ?>
<?= $this->link()->host($event->host_name, $event->host_display_name) ?> <?= $this->link()->host($event->host_name, $event->host_display_name) ?>