Add check attempts information to object detail view

fixes #7686
This commit is contained in:
Alexander Fuhr 2014-11-17 18:54:40 +01:00
parent e95e5f35d8
commit cbcea2a3c3
1 changed files with 12 additions and 0 deletions

View File

@ -7,11 +7,15 @@ if ($object->getType() === $object::TYPE_HOST) {
'monitoring/host/reschedule-check',
array('host' => $object->getName())
);
$check_attempts = $object->host_current_check_attempt . '/' . $object->host_max_check_attempts;
$state_type = (int) $object->host_state_type;
} else {
$reschedule = $this->href(
'monitoring/service/reschedule-check',
array('host' => $object->getHost()->getName(), 'service' => $object->getName())
);
$check_attempts = $object->service_attempt;
$state_type = (int) $object->service_state_type;
}
?>
@ -32,6 +36,14 @@ if ($object->getType() === $object::TYPE_HOST) {
<?= $this->timeUntil($object->next_check) ?>
</td>
</tr>
<tr>
<th><?= $this->translate('Check attempts') ?></th>
<?php if ($state_type === 0): ?>
<td><?= $check_attempts ?> <?= $this->translate('(soft state)') ?></td>
<?php else: ?>
<td><?= $check_attempts ?> <?= $this->translate('(hard state)') ?></td>
<?php endif; ?>
</tr>
<?php if ($object->check_execution_time): ?>
<tr>
<th><?= $this->translate('Check execution time') ?></th>