Improve service/host name layout in all views

refs #9361
This commit is contained in:
Matthias Jentsch 2015-06-17 11:33:55 +02:00
parent b3028e9988
commit 1ef643e002
6 changed files with 15 additions and 16 deletions

View File

@ -51,7 +51,8 @@ class Zend_View_Helper_Link extends Zend_View_Helper_Abstract
public function service($service, $serviceLinkText, $host, $hostLinkText)
{
return sprintf(
$this->view->translate('%s on %s', 'Service running on host'),
'%s: %s',
$this->host($host, $hostLinkText),
$this->view->qlink(
$serviceLinkText,
'monitoring/service/show',
@ -61,8 +62,7 @@ class Zend_View_Helper_Link extends Zend_View_Helper_Abstract
$service,
$host
))
),
$this->host($host, $hostLinkText)
)
);
}
}

View File

@ -37,9 +37,9 @@ if (count($comments) === 0) {
<?= $this->qlink(
sprintf(
$this->translate('%s on %s', 'Service running on host'),
$comment->service_display_name,
$comment->host_display_name
'%s: %s',
$comment->host_display_name,
$comment->service_display_name
),
'monitoring/comment/show',
array('comment_id' => $comment->id),

View File

@ -54,7 +54,7 @@ if (count($downtimes) === 0) {
}
?>
<?= $this->qlink(
sprintf($this->translate('%s on %s', 'Service running on host'), $downtime->service_display_name, $downtime->host_display_name),
sprintf('%s: %s', $downtime->host_display_name, $downtime->service_display_name),
'monitoring/downtime/show',
array('downtime_id' => $downtime->id),
array('title' => sprintf(

View File

@ -1,9 +1,9 @@
<?php if ($comment->objecttype === 'service'): ?>
<?= $this->icon('service', $this->translate('Service')); ?>
<?= sprintf(
$this->translate('%s on %s', 'Service running on host'),
$comment->service_display_name,
$comment->host_display_name
'%s: %s',
$comment->host_display_name,
$comment->service_display_name
) ?>
<?php else: ?>
<?= $this->icon('host', $this->translate('Host')); ?>

View File

@ -18,9 +18,8 @@ $i = 0;
<?= $this->iconImage()->service($service) ?>
<?= implode(' ', $this->serviceFlags($service)) ?>
<b>
<?= $this->escape($service->getName()); ?>
<?= $this->translate('on') ?>
<?= $this->escape($service->getHost()->getName()); ?><br>
<?= $this->escape($service->getHost()->getName()); ?>:
<?= $this->escape($service->getName()); ?> <br>
</b>
<?= $this->escape($service->service_output) ?>
</td>

View File

@ -143,7 +143,8 @@ $output = $this->tickets ? preg_replace_callback(
?>
<?php if ($isService): ?>
<?= sprintf(
$this->translate('%s on %s', 'Service running on host'),
'%s: %s',
$event->host_display_name,
$hostContext ? $this->qlink(
$event->service_display_name,
'monitoring/show/service',
@ -156,8 +157,7 @@ $output = $this->tickets ? preg_replace_callback(
$event->service_display_name,
$event->host_display_name
))
) : $this->escape($event->service_display_name),
$event->host_display_name
) : $this->escape($event->service_display_name)
) ?>
<?php else: ?>
<?= $this->escape($event->host_name); ?>