diff --git a/modules/monitoring/application/views/scripts/show/components/checkstatistics.phtml b/modules/monitoring/application/views/scripts/show/components/checkstatistics.phtml
index aeafd42be..228983d1f 100644
--- a/modules/monitoring/application/views/scripts/show/components/checkstatistics.phtml
+++ b/modules/monitoring/application/views/scripts/show/components/checkstatistics.phtml
@@ -1,17 +1,5 @@
getType() === $object::TYPE_HOST) {
- $isService = false;
- $checkAttempts = $object->host_current_check_attempt . '/' . $object->host_max_check_attempts;
- $stateType = (int) $object->host_state_type;
-} else {
- $isService = true;
- $checkAttempts = $object->service_attempt;
- $stateType = (int) $object->service_state_type;
-}
-
?>
@@ -21,15 +9,16 @@ if ($object->getType() === $object::TYPE_HOST) {
echo $checkNowForm;
} ?>
state !== 99) {
- echo $this->timeUntil($object->last_check);
+ echo $this->timeAgo($object->last_check);
} ?>
+
= $this->translate('Next check') ?> |
hasPermission('monitoring/command/schedule-check')) {
- if ($isService) {
+ if ($object->getType() === $object::TYPE_SERVICE) {
echo $this->qlink(
$this->translate('Reschedule'),
'monitoring/service/reschedule-check',
@@ -62,25 +51,25 @@ if ($object->getType() === $object::TYPE_HOST) {
} ?>
|
+
= $this->translate('Check attempts') ?> |
-
- = $checkAttempts ?> (= $this->translate('soft state') ?>) |
-
- = $checkAttempts ?> (= $this->translate('hard state') ?>) |
-
+
+ = $object->attempt ?>
+ (= (int) $object->state_type === 0 ? $this->translate('soft state') : $this->translate('hard state') ?>)
+ |
+
check_execution_time): ?>
-
- = $this->translate('Check execution time') ?> |
- = $object->check_execution_time === null
- ? '-' : round((float) $object->check_execution_time, 3)
- ?>s |
-
+
+ = $this->translate('Check execution time') ?> |
+ = round((float) $object->check_execution_time, 3) ?>s |
+
+
check_latency): ?>
-
- = $this->translate('Check latency') ?> |
- = $object->check_latency ?>s |
-
+
+ = $this->translate('Check latency') ?> |
+ = $object->check_latency ?>s |
+