43 lines
1.3 KiB
PHTML
43 lines
1.3 KiB
PHTML
<?php if (!empty($this->downtimes)): ?>
|
|
<?php
|
|
$list = array();
|
|
foreach ($this->downtimes as $downtime) {
|
|
$row = array();
|
|
if ($downtime->downtime_is_in_effect === '1') {
|
|
$row[] = 'Running<br />since '. $this->timeSince($downtime->downtime_actual_start_time);
|
|
} else {
|
|
if ($downtime->downtime_is_fixed) {
|
|
$row[] = 'Scheduled<br />for '. $downtime->downtime_scheduled_start_time;
|
|
} else {
|
|
$row[] = 'Waiting';
|
|
}
|
|
}
|
|
|
|
$row[] = sprintf(
|
|
'Triggered by %s: <em>%s</em>',
|
|
$downtime->downtime_author_name,
|
|
$downtime->downtime_comment_data
|
|
);
|
|
|
|
$row[] = '<button type="button" data-target="command" class="btn btn-warning"'
|
|
. ' data-command-id="29" data-command-info="'. $downtime->downtime_internal_downtime_id. '"'
|
|
. '><i class="icon-delete"></i> Delete'
|
|
. '</button>';
|
|
|
|
$list[] = '<td>'. implode('</td><td>', $row). '</td>';
|
|
}
|
|
?>
|
|
<div class="information-container">
|
|
<div class="head">
|
|
<span>Downtimes</span>
|
|
</div>
|
|
|
|
<div>
|
|
<table>
|
|
<tr>
|
|
<?= implode('</tr><tr>', $list); ?>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?> |