mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-28 00:04:04 +02:00
monitoring/detail: Add $activeChecksEnabled variable in the checkstatistics view script
refs #8378
This commit is contained in:
parent
7464742afe
commit
20fd99944b
@ -1,9 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
/** @var \Icinga\Module\Monitoring\Object\MonitoredObject $object */
|
/** @var \Icinga\Module\Monitoring\Object\MonitoredObject $object */
|
||||||
|
$activeChecksEnabled = (bool) $object->active_checks_enabled;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th><?= (bool) $object->active_checks_enabled ? $this->translate('Last check') : $this->translate('Last update') ?></th>
|
<th><?= $activeChecksEnabled ? $this->translate('Last check') : $this->translate('Last update') ?></th>
|
||||||
<td data-base-target="_self">
|
<td data-base-target="_self">
|
||||||
<?php if (isset($checkNowForm)) { // Form is unset if the current user lacks the respective permission
|
<?php if (isset($checkNowForm)) { // Form is unset if the current user lacks the respective permission
|
||||||
echo $checkNowForm;
|
echo $checkNowForm;
|
||||||
@ -15,9 +16,9 @@
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th><?= (bool) $object->active_checks_enabled ? $this->translate('Next check') : $this->translate('Next update') ?></th>
|
<th><?= $activeChecksEnabled ? $this->translate('Next check') : $this->translate('Next update') ?></th>
|
||||||
<td>
|
<td>
|
||||||
<?php if ((bool) $object->active_checks_enabled && $this->hasPermission('monitoring/command/schedule-check')) {
|
<?php if ($activeChecksEnabled && $this->hasPermission('monitoring/command/schedule-check')) {
|
||||||
if ($object->getType() === $object::TYPE_SERVICE) {
|
if ($object->getType() === $object::TYPE_SERVICE) {
|
||||||
echo $this->qlink(
|
echo $this->qlink(
|
||||||
$this->translate('Reschedule'),
|
$this->translate('Reschedule'),
|
||||||
@ -47,7 +48,7 @@
|
|||||||
}
|
}
|
||||||
} ?>
|
} ?>
|
||||||
<?php if ((int) $object->state !== 99) {
|
<?php if ((int) $object->state !== 99) {
|
||||||
if ((bool) $object->active_checks_enabled) {
|
if ($activeChecksEnabled) {
|
||||||
echo $this->timeUntil($object->next_check);
|
echo $this->timeUntil($object->next_check);
|
||||||
} else {
|
} else {
|
||||||
echo sprintf($this->translate('expected %s'), $this->timeUntil($object->next_update));
|
echo sprintf($this->translate('expected %s'), $this->timeUntil($object->next_update));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user