Make it easier to distinguish host and service downtimes

Added an icon to the left of a host's or service's label and an additional
textual indicator.

refs #8008
This commit is contained in:
Johannes Meyer 2014-12-22 14:44:09 +01:00
parent 086334c861
commit c5915f24cc
1 changed files with 14 additions and 6 deletions

View File

@ -53,7 +53,7 @@ use Icinga\Module\Monitoring\Object\Service;
</td>
<td>
<?php if (isset($downtime->service)): ?>
<a href="<?= $this->href('monitoring/service/show', array(
<?= $this->icon('service'); ?> <a href="<?= $this->href('monitoring/service/show', array(
'host' => $downtime->host,
'service' => $downtime->service
)); ?>">
@ -63,7 +63,7 @@ use Icinga\Module\Monitoring\Object\Service;
<?= $this->translate('on'); ?> <?= $downtime->host; ?>
</small>
<?php else: ?>
<a href="<?= $this->href('monitoring/host/show', array(
<?= $this->icon('host'); ?> <a href="<?= $this->href('monitoring/host/show', array(
'host' => $downtime->host
)); ?>">
<?= $downtime->host; ?>
@ -76,7 +76,9 @@ use Icinga\Module\Monitoring\Object\Service;
<?php if ($downtime->is_flexible): ?>
<?php if ($downtime->is_in_effect): ?>
<?= sprintf(
$this->translate('This flexible downtime was started on %s at %s and lasts for %s until %s at %s.'),
isset($downtime->service)
? $this->translate('This flexible service downtime was started on %s at %s and lasts for %s until %s at %s.')
: $this->translate('This flexible host downtime was started on %s at %s and lasts for %s until %s at %s.'),
date('d.m.y', $downtime->start),
date('H:i', $downtime->start),
$this->format()->duration($downtime->duration),
@ -85,7 +87,9 @@ use Icinga\Module\Monitoring\Object\Service;
); ?>
<?php else: ?>
<?= sprintf(
$this->translate('This flexible downtime has been scheduled to start between %s - %s and to last for %s.'),
isset($downtime->service)
? $this->translate('This flexible service downtime has been scheduled to start between %s - %s and to last for %s.')
: $this->translate('This flexible host downtime has been scheduled to start between %s - %s and to last for %s.'),
date('d.m.y H:i', $downtime->scheduled_start),
date('d.m.y H:i', $downtime->scheduled_end),
$this->format()->duration($downtime->duration)
@ -94,7 +98,9 @@ use Icinga\Module\Monitoring\Object\Service;
<?php else: ?>
<?php if ($downtime->is_in_effect): ?>
<?= sprintf(
$this->translate('This fixed downtime was started on %s at %s and expires on %s at %s.'),
isset($downtime->service)
? $this->translate('This fixed service downtime was started on %s at %s and expires on %s at %s.')
: $this->translate('This fixed host downtime was started on %s at %s and expires on %s at %s.'),
date('d.m.y', $downtime->start),
date('H:i', $downtime->start),
date('d.m.y', $downtime->end),
@ -102,7 +108,9 @@ use Icinga\Module\Monitoring\Object\Service;
); ?>
<?php else: ?>
<?= sprintf(
$this->translate('This fixed downtime has been scheduled to start on %s at %s and to end on %s at %s.'),
isset($downtime->service)
? $this->translate('This fixed service downtime has been scheduled to start on %s at %s and to end on %s at %s.')
: $this->translate('This fixed host downtime has been scheduled to start on %s at %s and to end on %s at %s.'),
date('d.m.y', $downtime->scheduled_start),
date('H:i', $downtime->scheduled_start),
date('d.m.y', $downtime->scheduled_end),