2015-09-30 20:19:36 +02:00
|
|
|
<td class="state-col state-<?= $stateName; ?><?= $downtime->is_in_effect ? ' handled' : ''; ?>">
|
|
|
|
<?php if ($downtime->start <= time() && ! $downtime->is_in_effect): ?>
|
|
|
|
<strong><?= $this->translate('Ends'); ?></strong>
|
|
|
|
<p><?= $this->timeUntil($downtime->is_flexible ? $downtime->scheduled_end : $downtime->end, $this->compact) ?></p>
|
|
|
|
<?php else: ?>
|
|
|
|
<strong><?= $downtime->is_in_effect ? $this->translate('Expires') : $this->translate('Starts'); ?></strong>
|
|
|
|
<p><?= $this->timeUntil($downtime->is_in_effect ? $downtime->end : $downtime->start, $this->compact) ?></p>
|
|
|
|
<?php endif; ?>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<span class="comment-header">
|
|
|
|
<?php if ($isService): ?>
|
|
|
|
<?= $this->icon('service', $this->translate('Service')); ?> <?= $this->qlink(
|
|
|
|
$this->escape($downtime->host_display_name) . ': ' . $this->escape($downtime->service_display_name),
|
2015-10-01 14:49:48 +02:00
|
|
|
'monitoring/service/show',
|
|
|
|
array(
|
|
|
|
'host' => $downtime->host_name,
|
|
|
|
'service' => $downtime->service_description
|
|
|
|
),
|
2015-09-30 20:19:36 +02:00
|
|
|
array(
|
|
|
|
'title' => sprintf(
|
|
|
|
$this->translate('Show detailed information for this downtime scheduled for service %s on host %s'),
|
|
|
|
$downtime->service_display_name,
|
|
|
|
$downtime->host_display_name
|
2015-10-01 14:49:48 +02:00
|
|
|
)
|
2015-09-30 20:19:36 +02:00
|
|
|
)
|
|
|
|
); ?>
|
|
|
|
<?php else: ?>
|
|
|
|
<?= $this->icon('host', $this->translate('host')); ?> <?= $this->qlink(
|
|
|
|
$this->escape($downtime->host_display_name),
|
2015-10-01 14:49:48 +02:00
|
|
|
'monitoring/host/show',
|
|
|
|
array('host' => $downtime->host_name),
|
2015-09-30 20:19:36 +02:00
|
|
|
array('downtime_id' => $downtime->id),
|
|
|
|
array(
|
|
|
|
'title' => sprintf(
|
|
|
|
$this->translate('Show detailed information for this downtime scheduled for host %s'),
|
|
|
|
$downtime->host_display_name
|
2015-10-01 14:49:48 +02:00
|
|
|
)
|
2015-09-30 20:19:36 +02:00
|
|
|
)
|
|
|
|
); ?>
|
|
|
|
<?php endif ?>
|
|
|
|
|
|
|
|
<?= $this->translate('by') ?>
|
|
|
|
<?= $this->escape($downtime->author_name) ?>
|
|
|
|
|
|
|
|
<span class="pull-right">
|
|
|
|
<?php if ($downtime->is_flexible): ?>
|
|
|
|
<?= $this->icon('magic', $this->translate('This downtime is flexible')); ?>
|
|
|
|
<?php endif ?>
|
|
|
|
|
|
|
|
<?php if ($downtime->is_in_effect): ?>
|
|
|
|
<?= $this->icon('plug', $this->translate('This downtime is in effect')); ?>
|
|
|
|
<?php endif ?>
|
|
|
|
|
|
|
|
<?php if (isset($delDowntimeForm)): // Form is unset if the current user lacks the respective permission ?>
|
|
|
|
<?php
|
|
|
|
$delDowntimeForm = clone $delDowntimeForm;
|
|
|
|
$delDowntimeForm->populate(
|
|
|
|
array(
|
|
|
|
'downtime_id' => $downtime->id,
|
|
|
|
'downtime_is_service' => isset($downtime->service_description)
|
|
|
|
)
|
|
|
|
);
|
|
|
|
echo $delDowntimeForm;
|
|
|
|
?>
|
|
|
|
<?php endif ?>
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
<?php if (isset ($displayComment) && $displayComment): ?>
|
|
|
|
<p class="comment-text">
|
|
|
|
<?= $this->escape($downtime->comment) ?>
|
|
|
|
</p>
|
|
|
|
<?php endif ?>
|
|
|
|
</td>
|