monitoring/detail: Read "Next update" instead of "Next check" if the host or service is not active checked

refs #8378
This commit is contained in:
Eric Lippmann 2015-09-04 15:48:45 +02:00
parent bef84ad394
commit a7cf3d0eb2
1 changed files with 35 additions and 35 deletions

View File

@ -15,41 +15,41 @@
</tr> </tr>
<tr> <tr>
<th><?= $this->translate('Next check') ?></th> <th><?= (bool) $object->active_checks_enabled ? $this->translate('Next check') : $this->translate('Next update') ?></th>
<td> <td>
<?php if ($this->hasPermission('monitoring/command/schedule-check')) { <?php if ($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'),
'monitoring/service/reschedule-check', 'monitoring/service/reschedule-check',
array('host' => $object->getHost()->getName(), 'service' => $object->getName()), array('host' => $object->getHost()->getName(), 'service' => $object->getName()),
array( array(
'icon' => 'reschedule', 'icon' => 'reschedule',
'data-base-target' => '_self', 'data-base-target' => '_self',
'title' => $this->translate( 'title' => $this->translate(
'Schedule the next active check at a different time than the current one' 'Schedule the next active check at a different time than the current one'
) )
) )
); );
} else { } else {
echo $this->qlink( echo $this->qlink(
$this->translate('Reschedule'), $this->translate('Reschedule'),
'monitoring/host/reschedule-check', 'monitoring/host/reschedule-check',
array('host' => $object->getName()), array('host' => $object->getName()),
array( array(
'icon' => 'reschedule', 'icon' => 'reschedule',
'data-base-target' => '_self', 'data-base-target' => '_self',
'title' => $this->translate( 'title' => $this->translate(
'Schedule the next active check at a different time than the current one' 'Schedule the next active check at a different time than the current one'
) )
) )
); );
} }
} ?> } ?>
<?php if ((int) $object->state !== 99) { <?php if ((int) $object->state !== 99) {
echo $this->timeUntil($object->next_check); echo $this->timeUntil($object->next_check);
} ?> } ?>
</td> </td>
</tr> </tr>
<tr> <tr>