2013-07-23 14:03:32 +02:00
|
|
|
<?php if (!empty($this->downtimes)): ?>
|
2013-07-22 16:03:36 +02:00
|
|
|
<?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. '"'
|
2013-08-23 10:58:58 +02:00
|
|
|
. '>{{REMOVE_ICON}} Remove'
|
2013-07-22 16:03:36 +02:00
|
|
|
. '</button>';
|
|
|
|
|
|
|
|
$list[] = '<td>'. implode('</td><td>', $row). '</td>';
|
|
|
|
}
|
|
|
|
?>
|
2013-10-07 16:46:20 +02:00
|
|
|
<?php endif; ?>
|
2013-10-14 18:17:58 +02:00
|
|
|
<div>
|
2013-08-22 17:17:58 +02:00
|
|
|
<div class="panel-heading">
|
2013-10-14 18:17:58 +02:00
|
|
|
<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>
|
2013-10-14 18:17:58 +02:00
|
|
|
<hr class="separator" />
|
2013-08-22 17:17:58 +02:00
|
|
|
<div class="panel-body">
|
2013-10-14 18:17:58 +02:00
|
|
|
<table class="table table-condensed table-detail">
|
|
|
|
<tbody>
|
|
|
|
<?php if (empty($this->object->downtimes)): ?>
|
|
|
|
<tr>
|
|
|
|
<td>No Downtimes</td>
|
|
|
|
</tr>
|
|
|
|
<?php endif; ?>
|
|
|
|
<?php foreach ($this->object->downtimes as $downtime): ?>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<div class="pull-right">
|
|
|
|
<form action="<?= $this->href('monitoring/command/removeDowntime'); ?>" data-icinga-component="app/ajaxPostSubmitForm">
|
|
|
|
<button type="submit" class="button btn-common btn-small" name="btn_submit" value="1">
|
|
|
|
<i class="icinga-icon-remove"></i>
|
|
|
|
</button>
|
|
|
|
<input type="hidden" name="host" value="<?= $downtime->host_name; ?>" />
|
|
|
|
<input type="hidden" name="service" value="<?= $downtime->service_description; ?>" />
|
|
|
|
<input type="hidden" name="downtimeid" value="<?= $downtime->downtime_internal_downtime_id; ?>" />
|
|
|
|
<input type="hidden" name="CSRFToken" value="" />
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<?php if ($downtime->downtime_is_in_effect === '1'): ?>
|
|
|
|
Running since <?= $this->timeSince($downtime->downtime_actual_start_time); ?>
|
|
|
|
<?php else: ?>
|
|
|
|
<?php if ($downtime->downtime_is_fixed): ?>
|
|
|
|
Scheduled for <?= $downtime->downtime_scheduled_start_time; ?>
|
|
|
|
<?php else: ?>
|
|
|
|
Waiting
|
|
|
|
<?php endif; ?>
|
|
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
Triggered by <?= $downtime->downtime_author_name; ?>
|
|
|
|
|
|
|
|
<div class="small-row">
|
|
|
|
<?= $downtime->downtime_comment_data; ?>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</tbody>
|
2013-07-22 16:03:36 +02:00
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|