2014-03-08 17:02:14 +01:00
|
|
|
<?php
|
2015-03-12 13:39:17 +01:00
|
|
|
/** @var \Icinga\Module\Monitoring\Object\MonitoredObject $object */
|
2014-09-12 16:52:45 +02:00
|
|
|
?>
|
|
|
|
|
|
|
|
<tr>
|
2015-09-04 15:43:13 +02:00
|
|
|
<th><?= (bool) $object->active_checks_enabled ? $this->translate('Last check') : $this->translate('Last update') ?></th>
|
2014-09-12 16:52:45 +02:00
|
|
|
<td data-base-target="_self">
|
2015-01-22 17:13:35 +01:00
|
|
|
<?php if (isset($checkNowForm)) { // Form is unset if the current user lacks the respective permission
|
|
|
|
echo $checkNowForm;
|
|
|
|
} ?>
|
2015-09-04 15:37:07 +02:00
|
|
|
<?php if ((int) $object->state !== 99) {
|
2015-09-04 15:42:02 +02:00
|
|
|
echo $this->timeAgo($object->last_check);
|
2015-09-04 15:37:07 +02:00
|
|
|
} ?>
|
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>
|
|
|
|
<th><?= $this->translate('Next check') ?></th>
|
2014-09-12 16:52:45 +02:00
|
|
|
<td>
|
2015-01-23 10:40:48 +01:00
|
|
|
<?php if ($this->hasPermission('monitoring/command/schedule-check')) {
|
2015-09-04 15:42:02 +02:00
|
|
|
if ($object->getType() === $object::TYPE_SERVICE) {
|
2015-02-23 17:26:42 +01:00
|
|
|
echo $this->qlink(
|
2015-02-24 11:35:25 +01:00
|
|
|
$this->translate('Reschedule'),
|
2015-01-23 10:40:48 +01:00
|
|
|
'monitoring/service/reschedule-check',
|
2015-04-20 16:11:08 +02:00
|
|
|
array('host' => $object->getHost()->getName(), 'service' => $object->getName()),
|
2015-02-23 17:26:42 +01:00
|
|
|
array(
|
2015-02-24 11:35:25 +01:00
|
|
|
'icon' => 'reschedule',
|
2015-02-23 17:26:42 +01:00
|
|
|
'data-base-target' => '_self',
|
|
|
|
'title' => $this->translate(
|
|
|
|
'Schedule the next active check at a different time than the current one'
|
|
|
|
)
|
2015-02-24 11:35:25 +01:00
|
|
|
)
|
2015-01-23 10:40:48 +01:00
|
|
|
);
|
|
|
|
} else {
|
2015-02-23 17:26:42 +01:00
|
|
|
echo $this->qlink(
|
2015-02-24 11:35:25 +01:00
|
|
|
$this->translate('Reschedule'),
|
2015-01-23 10:40:48 +01:00
|
|
|
'monitoring/host/reschedule-check',
|
2015-04-20 16:11:08 +02:00
|
|
|
array('host' => $object->getName()),
|
2015-02-23 17:26:42 +01:00
|
|
|
array(
|
2015-02-24 11:35:25 +01:00
|
|
|
'icon' => 'reschedule',
|
2015-02-23 17:26:42 +01:00
|
|
|
'data-base-target' => '_self',
|
|
|
|
'title' => $this->translate(
|
|
|
|
'Schedule the next active check at a different time than the current one'
|
|
|
|
)
|
2015-02-24 11:35:25 +01:00
|
|
|
)
|
2015-01-23 10:40:48 +01:00
|
|
|
);
|
|
|
|
}
|
2015-04-10 10:27:57 +02:00
|
|
|
} ?>
|
2015-09-04 15:33:55 +02:00
|
|
|
<?php if ((int) $object->state !== 99) {
|
|
|
|
echo $this->timeUntil($object->next_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-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 ?>
|