2015-04-27 17:53:17 +02:00
|
|
|
<div class="controls">
|
|
|
|
<?php if (! $this->compact): ?>
|
|
|
|
<?= $this->tabs; ?>
|
|
|
|
<?php endif ?>
|
2015-04-23 11:31:53 +02:00
|
|
|
|
|
|
|
<table class="action">
|
|
|
|
<tr class="state <?= $stateName; ?><?= $downtime->is_in_effect ? ' handled' : ''; ?>">
|
|
|
|
<td class="state">
|
|
|
|
<strong><?= $downtime->is_in_effect ? $this->translate('Expires') : $this->translate('Starts'); ?></strong>
|
|
|
|
<br>
|
|
|
|
<?=
|
|
|
|
$this->dateTimeRenderer(
|
|
|
|
($downtime->is_in_effect ? $downtime->end : $downtime->start),
|
|
|
|
true
|
|
|
|
)->render(
|
|
|
|
$this->translate('on %s', 'datetime'),
|
|
|
|
$this->translate('at %s', 'time'),
|
|
|
|
$this->translate('in %s', 'timespan')
|
|
|
|
);
|
|
|
|
?>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<small>
|
|
|
|
<?php if ($downtime->is_flexible): ?>
|
|
|
|
<?php if ($downtime->is_in_effect): ?>
|
|
|
|
<?= sprintf(
|
|
|
|
$this->isService
|
|
|
|
? $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),
|
|
|
|
date('d.m.y', $downtime->end),
|
|
|
|
date('H:i', $downtime->end)
|
|
|
|
); ?>
|
|
|
|
<?php else: ?>
|
|
|
|
<?= sprintf(
|
|
|
|
$this->isService
|
|
|
|
? $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)
|
|
|
|
); ?>
|
|
|
|
<?php endif ?>
|
|
|
|
<?php else: ?>
|
|
|
|
<?php if ($downtime->is_in_effect): ?>
|
|
|
|
<?= sprintf(
|
|
|
|
$this->isService
|
|
|
|
? $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),
|
|
|
|
date('H:i', $downtime->end)
|
|
|
|
); ?>
|
|
|
|
<?php else: ?>
|
|
|
|
<?= sprintf(
|
|
|
|
$this->isService
|
|
|
|
? $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),
|
|
|
|
date('H:i', $downtime->scheduled_end)
|
|
|
|
); ?>
|
|
|
|
<?php endif ?>
|
|
|
|
<?php endif ?>
|
|
|
|
</small>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2015-04-21 14:49:27 +02:00
|
|
|
</div>
|
|
|
|
|
2015-04-21 17:24:17 +02:00
|
|
|
<div class="content">
|
2015-04-23 16:55:59 +02:00
|
|
|
<h3><?= $this->translate('Downtime detail information') ?></h3>
|
2015-04-23 11:31:53 +02:00
|
|
|
<table class="avp">
|
2015-04-21 14:49:27 +02:00
|
|
|
<tbody>
|
2015-04-23 16:55:59 +02:00
|
|
|
<tr>
|
|
|
|
<th>
|
|
|
|
<?= $this->isService ? $this->translate('Service') : $this->translate('Host') ?>
|
|
|
|
</th>
|
|
|
|
<td data-base-target="_next">
|
|
|
|
<?php if ($this->isService): ?>
|
|
|
|
<?php
|
|
|
|
$link = $this->link()->service(
|
|
|
|
$downtime->service_description,
|
|
|
|
$downtime->service_display_name,
|
|
|
|
$downtime->host_name,
|
|
|
|
$downtime->host_display_name
|
|
|
|
);
|
|
|
|
$icon = $this->icon('service', $this->translate('Service'));
|
|
|
|
?>
|
|
|
|
<?php else: ?>
|
|
|
|
<?php
|
|
|
|
$icon = $this->icon('host', $this->translate('Host'));
|
|
|
|
$link = $this->link()->host($downtime->host_name, $downtime->host_display_name)
|
|
|
|
?>
|
|
|
|
<?php endif ?>
|
|
|
|
<?= $icon ?>
|
|
|
|
<?= $link ?>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2015-04-21 17:25:43 +02:00
|
|
|
<tr title="<?= $this->translate('The name of the person who scheduled this downtime'); ?>">
|
2015-04-21 14:49:27 +02:00
|
|
|
<th><?= $this->translate('Author') ?></th>
|
2015-04-23 16:55:59 +02:00
|
|
|
<td><?= $this->icon('user', $this->translate('User')) ?> <?= $this->escape($this->downtime->author_name) ?></td>
|
2015-04-21 14:49:27 +02:00
|
|
|
</tr>
|
2015-04-21 17:25:43 +02:00
|
|
|
<tr title="<?= $this->translate('A comment, as entered by the author, associated with the scheduled downtime'); ?>">
|
|
|
|
<th><?= $this->translate('Comment') ?></th>
|
2015-04-23 16:55:59 +02:00
|
|
|
<td><?= $this->icon('comment', $this->translate('Comment')) ?> <?= $this->escape($this->downtime->comment) ?></td>
|
2015-04-21 14:49:27 +02:00
|
|
|
</tr>
|
2015-04-21 17:25:43 +02:00
|
|
|
<tr title="<?= $this->translate('Date and time this downtime was entered'); ?>">
|
|
|
|
<th><?= $this->translate('Entry Time') ?></th>
|
|
|
|
<td> <?= date('d.m.y H:i' ,$this->escape($this->downtime->entry_time)) ?></td>
|
2015-04-21 14:49:27 +02:00
|
|
|
</tr>
|
2015-04-21 17:25:43 +02:00
|
|
|
<tr class="newsection">
|
|
|
|
<th><?= $this->escape(
|
|
|
|
$this->downtime->is_flexible ?
|
|
|
|
$this->translate('Flexible') : $this->translate('Fixed')
|
|
|
|
); ?></th>
|
2015-04-21 14:49:27 +02:00
|
|
|
<td>
|
|
|
|
<?= $this->escape(
|
|
|
|
$this->downtime->is_flexible ?
|
2015-04-21 17:25:43 +02:00
|
|
|
$this->translate('Flexible downtimes have a hard start and end time,'
|
|
|
|
. ' but also an additional restriction on the duration in which '
|
|
|
|
. ' the host or service may actually be down.') :
|
|
|
|
$this->translate('Fixed downtimes have a static start and end time.')
|
|
|
|
); ?>
|
2015-04-21 14:49:27 +02:00
|
|
|
</td>
|
|
|
|
</tr>
|
2015-04-21 17:25:43 +02:00
|
|
|
<tr title="<?= $this->translate('The date/time the scheduled downtime is'
|
|
|
|
. ' supposed to start. If this is a flexible (non-fixed) downtime, '
|
|
|
|
. 'this refers to the earliest possible time that the downtime'
|
|
|
|
. ' can start'); ?>">
|
|
|
|
<th><?= $this->translate('Scheduled start') ?></th>
|
|
|
|
<td><?= date('d.m.y H:i', $this->downtime->scheduled_start) ?></td>
|
|
|
|
</tr>
|
|
|
|
<tr title="<?= $this->translate('The date/time the scheduled downtime is '
|
|
|
|
. 'supposed to end. If this is a flexible (non-fixed) downtime, '
|
|
|
|
. 'this refers to the last possible time that the downtime can '
|
|
|
|
. 'start'); ?>">
|
|
|
|
<th><?= $this->translate('Scheduled end') ?></th>
|
|
|
|
<td><?= date('d.m.y H:i', $this->downtime->scheduled_end) ?></td>
|
|
|
|
</tr>
|
|
|
|
<?php if ($this->downtime->is_flexible): ?>
|
|
|
|
<tr title="<?= $this->translate('Indicates the number of seconds that the '
|
|
|
|
. 'scheduled downtime should last. This is usually only needed if'
|
|
|
|
. ' this is a flexible downtime, which can start at a variable '
|
|
|
|
. 'time, but lasts for the specified duration'); ?>">
|
|
|
|
<th tit><?= $this->translate('Duration') ?></th>
|
|
|
|
<td><?= $this->format()->duration($this->escape($this->downtime->duration)); ?></td>
|
|
|
|
</tr>
|
|
|
|
<tr title="<?= $this->translate('he date/time the scheduled downtime was'
|
|
|
|
. ' actually started'); ?>">
|
|
|
|
<th><?= $this->translate('Actual start time') ?></th>
|
|
|
|
<td><?= date('d.m.y H:i', $downtime->start); ?></td>
|
|
|
|
</tr>
|
|
|
|
<tr title="<?= $this->translate('The date/time the scheduled downtime '
|
|
|
|
. 'actually ended'); ?>">
|
|
|
|
<th><?= $this->translate('Actual end time') ?></th>
|
|
|
|
<td><?= date('d.m.y H:i', $downtime->end); ?></td>
|
|
|
|
</tr>
|
|
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
<tr class="newsection">
|
|
|
|
<th><?= $this->translate('In effect') ?></th>
|
2015-04-21 14:49:27 +02:00
|
|
|
<td>
|
|
|
|
<?= $this->escape(
|
|
|
|
$this->downtime->is_in_effect ?
|
|
|
|
$this->translate('Yes') : $this->translate('No')
|
|
|
|
);
|
|
|
|
?>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2015-04-21 17:24:17 +02:00
|
|
|
|
2015-04-21 14:49:27 +02:00
|
|
|
<?php if (isset($delDowntimeForm)): // Form is unset if the current user lacks the respective permission ?>
|
|
|
|
<tr class="newsection">
|
|
|
|
<th><?= $this->translate('Commands') ?></th>
|
|
|
|
<td>
|
2015-04-21 17:24:17 +02:00
|
|
|
<?= $delDowntimeForm;?>
|
2015-04-21 14:49:27 +02:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<?php endif ?>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|