2014-03-08 17:02:14 +01:00
|
|
|
<?php
|
2015-03-12 13:39:17 +01:00
|
|
|
/** @var \Icinga\Module\Monitoring\Object\MonitoredObject $object */
|
2015-09-04 18:09:25 +02:00
|
|
|
$activeChecksEnabled = (bool) $object->active_checks_enabled;
|
2014-09-12 16:52:45 +02:00
|
|
|
?>
|
|
|
|
|
|
|
|
<tr>
|
2015-09-04 18:09:25 +02:00
|
|
|
<th><?= $activeChecksEnabled ? $this->translate('Last check') : $this->translate('Last update') ?></th>
|
2014-09-12 16:52:45 +02:00
|
|
|
<td data-base-target="_self">
|
2015-09-07 11:08:37 +02:00
|
|
|
<?php if (isset($checkNowForm)) { // Form is unset if the current user lacks the respective permission
|
|
|
|
echo $checkNowForm;
|
|
|
|
} ?>
|
|
|
|
<?php if ((int) $object->state !== 99) {
|
|
|
|
echo $this->timeAgo($object->last_check);
|
|
|
|
} ?>
|
2014-09-12 16:52:45 +02:00
|
|
|
</td>
|
2014-03-06 19:36:26 +01:00
|
|
|
</tr>
|
2015-09-04 15:42:02 +02:00
|
|
|
|
2014-03-06 19:36:26 +01:00
|
|
|
<tr>
|
2015-09-04 18:09:25 +02:00
|
|
|
<th><?= $activeChecksEnabled ? $this->translate('Next check') : $this->translate('Next update') ?></th>
|
2015-09-04 15:48:45 +02:00
|
|
|
<td>
|
2015-09-04 18:09:25 +02:00
|
|
|
<?php if ($activeChecksEnabled && $this->hasPermission('monitoring/command/schedule-check')) {
|
2015-09-04 15:48:45 +02:00
|
|
|
if ($object->getType() === $object::TYPE_SERVICE) {
|
|
|
|
echo $this->qlink(
|
|
|
|
$this->translate('Reschedule'),
|
|
|
|
'monitoring/service/reschedule-check',
|
|
|
|
array('host' => $object->getHost()->getName(), 'service' => $object->getName()),
|
|
|
|
array(
|
2015-09-24 23:45:20 +02:00
|
|
|
'class' => 'action-link',
|
|
|
|
'data-base-target' => '_self',
|
|
|
|
'icon' => 'reschedule',
|
|
|
|
'title' => $this->translate(
|
2015-09-04 15:48:45 +02:00
|
|
|
'Schedule the next active check at a different time than the current one'
|
|
|
|
)
|
|
|
|
)
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
echo $this->qlink(
|
|
|
|
$this->translate('Reschedule'),
|
|
|
|
'monitoring/host/reschedule-check',
|
|
|
|
array('host' => $object->getName()),
|
|
|
|
array(
|
2015-09-24 23:45:20 +02:00
|
|
|
'class' => 'action-link',
|
|
|
|
'data-base-target' => '_self',
|
|
|
|
'icon' => 'reschedule',
|
|
|
|
'title' => $this->translate(
|
2015-09-04 15:48:45 +02:00
|
|
|
'Schedule the next active check at a different time than the current one'
|
|
|
|
)
|
|
|
|
)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
} ?>
|
|
|
|
<?php if ((int) $object->state !== 99) {
|
2015-09-04 18:09:25 +02:00
|
|
|
if ($activeChecksEnabled) {
|
2015-09-04 17:14:16 +02:00
|
|
|
echo $this->timeUntil($object->next_check);
|
|
|
|
} else {
|
|
|
|
echo sprintf($this->translate('expected %s'), $this->timeUntil($object->next_update));
|
|
|
|
}
|
2015-09-04 15:48:45 +02:00
|
|
|
} ?>
|
2015-09-07 14:40:50 +02:00
|
|
|
<?php if ($object->next_update < time()) {
|
|
|
|
echo $this->icon('circle', $this->translate('Check result is late'), array('class' => 'fg-color-critical'));
|
|
|
|
} ?>
|
2015-09-04 15:48:45 +02:00
|
|
|
</td>
|
2014-03-06 19:36:26 +01:00
|
|
|
</tr>
|
2015-09-04 15:42:02 +02:00
|
|
|
|
2014-11-17 18:54:40 +01:00
|
|
|
<tr>
|
|
|
|
<th><?= $this->translate('Check attempts') ?></th>
|
2015-09-04 15:42:02 +02:00
|
|
|
<td>
|
|
|
|
<?= $object->attempt ?>
|
|
|
|
(<?= (int) $object->state_type === 0 ? $this->translate('soft state') : $this->translate('hard state') ?>)
|
|
|
|
</td>
|
2014-11-17 18:54:40 +01:00
|
|
|
</tr>
|
2015-09-04 15:42:02 +02:00
|
|
|
|
2014-03-06 19:36:26 +01:00
|
|
|
<?php if ($object->check_execution_time): ?>
|
2015-09-04 15:42:02 +02:00
|
|
|
<tr>
|
|
|
|
<th><?= $this->translate('Check execution time') ?></th>
|
|
|
|
<td><?= round((float) $object->check_execution_time, 3) ?>s</td>
|
|
|
|
</tr>
|
2014-03-06 19:36:26 +01:00
|
|
|
<?php endif ?>
|
2015-09-04 15:42:02 +02:00
|
|
|
|
2014-03-06 19:36:26 +01:00
|
|
|
<?php if ($object->check_latency): ?>
|
2015-09-04 15:42:02 +02:00
|
|
|
<tr>
|
|
|
|
<th><?= $this->translate('Check latency') ?></th>
|
|
|
|
<td><?= $object->check_latency ?>s</td>
|
|
|
|
</tr>
|
2014-03-06 19:36:26 +01:00
|
|
|
<?php endif ?>
|