icingaweb2/modules/monitoring/application/views/scripts/show/components/downtime.phtml

67 lines
2.7 KiB
PHTML
Raw Normal View History

<div>
<div class="panel-heading">
<div class="panel-hostname">
<div class="pull-right">
<?php
$scheduleDowntimeData = array(
'host' => $this->object->host_name,
'service' => $this->object->service_description
);
$scheduleDowntimeHref = $this->href('monitoring/command/scheduleDowntime', $scheduleDowntimeData);
?>
<a href="<?= $scheduleDowntimeHref; ?>" class="btn-common btn-small button" title="Schedule downtime">
<i class="icinga-icon-in-downtime"></i>
</a>
</div>
Downtimes
</div>
2013-07-22 16:03:36 +02:00
</div>
<hr class="separator" />
<div class="panel-body">
<table class="table table-condensed table-detail">
<tbody>
<?php if (empty($this->object->downtimes)): ?>
<tr>
<td>No Downtimes</td>
</tr>
2013-10-15 12:48:33 +02:00
<?php else: ?>
<?php foreach ($this->object->downtimes as $downtime): ?>
<tr>
<td>
<div class="pull-right">
<?= $this->getHelper('CommandForm')->iconSubmitForm(
'icinga-icon-remove',
'Remove Downtime',
'btn-small',
'removedowntime',
array(
'downtimeid' => $downtime->downtime_internal_downtime_id,
'host' => $downtime->host,
'service' => $downtime->service
)
); ?>
</div>
<?php if ($downtime->downtime_is_in_effect === '1'): ?>
In scheduled downtime since <?= $this->timeSince($downtime->downtime_start); ?>
<?php else: ?>
<?php if ($downtime->downtime_is_fixed): ?>
Downtime scheduled for <?= $downtime->downtime_start; ?>
<?php else: ?>
Waiting
<?php endif; ?>
<?php endif; ?>
<div class="small-row">
<?= $downtime->downtime_author; ?>: <?= $downtime->downtime_comment; ?>
</div>
</td>
</tr>
<?php endforeach; ?>
2013-10-15 12:48:33 +02:00
<?php endif; ?>
</tbody>
2013-07-22 16:03:36 +02:00
</table>
</div>
</div>