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); } ?> + 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) { } ?> + translate('Check attempts') ?> - - (translate('soft state') ?>) - - (translate('hard state') ?>) - + + attempt ?> + (state_type === 0 ? $this->translate('soft state') : $this->translate('hard state') ?>) + + check_execution_time): ?> - - translate('Check execution time') ?> - check_execution_time === null - ? '-' : round((float) $object->check_execution_time, 3) - ?>s - + + translate('Check execution time') ?> + check_execution_time, 3) ?>s + + check_latency): ?> - - translate('Check latency') ?> - check_latency ?>s - + + translate('Check latency') ?> + check_latency ?>s +