mirror of
				https://github.com/Icinga/icingaweb2.git
				synced 2025-10-31 03:14:31 +01:00 
			
		
		
		
	Conflicts: modules/monitoring/application/views/scripts/list/comments.phtml modules/monitoring/application/views/scripts/list/hostgroups.phtml modules/monitoring/application/views/scripts/process/info.phtml modules/monitoring/application/views/scripts/show/components/downtime.phtml modules/monitoring/application/views/scripts/show/components/notifications.phtml modules/monitoring/public/css/module.less
		
			
				
	
	
		
			83 lines
		
	
	
		
			2.9 KiB
		
	
	
	
		
			PHTML
		
	
	
	
	
	
			
		
		
	
	
			83 lines
		
	
	
		
			2.9 KiB
		
	
	
	
		
			PHTML
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| /** @var \Icinga\Module\Monitoring\Object\MonitoredObject $object */
 | |
| 
 | |
| if ($object->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;
 | |
| }
 | |
| 
 | |
| ?>
 | |
| 
 | |
| <tr>
 | |
|     <th><?= $this->translate('Last check') ?></th>
 | |
|     <td data-base-target="_self">
 | |
|         <?php if (isset($checkNowForm)) { // Form is unset if the current user lacks the respective permission
 | |
|             echo $checkNowForm;
 | |
|         } ?>
 | |
|         <?= $this->timeAgo($object->last_check) ?>
 | |
|     </td>
 | |
| </tr>
 | |
| <tr>
 | |
|   <th><?= $this->translate('Next check') ?></th>
 | |
|   <td>
 | |
|       <?php if ($this->hasPermission('monitoring/command/schedule-check')) {
 | |
|           if ($isService) {
 | |
|               echo $this->qlink(
 | |
|                   $this->translate('Reschedule'),
 | |
|                   'monitoring/service/reschedule-check',
 | |
|                   array('host' => $object->getHost()->getName(), 'service' => $object->getName()),
 | |
|                   array(
 | |
|                       'icon'                => 'reschedule',
 | |
|                       'data-base-target'    => '_self',
 | |
|                       'title'               => $this->translate(
 | |
|                           'Schedule the next active check at a different time than the current one'
 | |
|                       )
 | |
|                   )
 | |
|               );
 | |
|           } else {
 | |
|               echo $this->qlink(
 | |
|                   $this->translate('Reschedule'),
 | |
|                   'monitoring/host/reschedule-check',
 | |
|                   array('host' => $object->getName()),
 | |
|                   array(
 | |
|                       'icon'                => 'reschedule',
 | |
|                       'data-base-target'    => '_self',
 | |
|                       'title'               => $this->translate(
 | |
|                           'Schedule the next active check at a different time than the current one'
 | |
|                       )
 | |
|                   )
 | |
|               );
 | |
|           }
 | |
|       } ?>
 | |
|       <?= $this->timeUntil($object->next_check) ?>
 | |
|   </td>
 | |
| </tr>
 | |
| <tr>
 | |
|     <th><?= $this->translate('Check attempts') ?></th>
 | |
|     <?php if ($stateType === 0): ?>
 | |
|         <td><?= $checkAttempts ?> (<?= $this->translate('soft state') ?>)</td>
 | |
|     <?php else: ?>
 | |
|         <td><?= $checkAttempts ?> (<?= $this->translate('hard state') ?>)</td>
 | |
|     <?php endif; ?>
 | |
| </tr>
 | |
| <?php if ($object->check_execution_time): ?>
 | |
|     <tr>
 | |
|         <th><?= $this->translate('Check execution time') ?></th>
 | |
|         <td><?= $object->check_execution_time === null
 | |
|             ? '-' : round((float) $object->check_execution_time, 3)
 | |
|         ?>s</td>
 | |
|     </tr>
 | |
| <?php endif ?>
 | |
| <?php if ($object->check_latency): ?>
 | |
|     <tr>
 | |
|         <th><?= $this->translate('Check latency') ?></th>
 | |
|         <td><?= $object->check_latency ?>s</td>
 | |
|     </tr>
 | |
| <?php endif ?>
 |