mirror of
				https://github.com/Icinga/icingaweb2.git
				synced 2025-10-31 03:14:31 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			54 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			PHTML
		
	
	
	
	
	
			
		
		
	
	
			54 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			PHTML
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| $parts = explode('!', $object->check_command);
 | |
| $command = array_shift($parts);
 | |
| 
 | |
| ?>
 | |
| 
 | |
| <?php if ($showInstance): ?>
 | |
| <tr class="newsection">
 | |
|     <th><?= $this->translate('Instance'); ?></th>
 | |
|     <td><?= $this->escape($object->instance_name); ?></td>
 | |
| </tr>
 | |
| <?php endif ?>
 | |
| <tr class="newsection">
 | |
|     <th><?= $this->translate('Command'); ?></th>
 | |
|     <td>
 | |
|         <?= $this->escape($command); ?>
 | |
|         <?php if ($this->hasPermission('monitoring/command/schedule-check') && $object->passive_checks_enabled) {
 | |
|             $title = sprintf($this->translate('Submit a one time or so called passive result for the %s check'), $command);
 | |
|             if ($object->getType() === $object::TYPE_HOST) {
 | |
|                 echo $this->qlink(
 | |
|                     $this->translate('Process check result'),
 | |
|                     'monitoring/host/process-check-result',
 | |
|                     array('host' => $object->getName()),
 | |
|                     array(
 | |
|                         'icon'              => 'reply',
 | |
|                         'data-base-target'  => '_self',
 | |
|                         'title'             => $title
 | |
|                     )
 | |
|                 );
 | |
|             } else {
 | |
|                 echo $this->qlink(
 | |
|                     $this->translate('Process check result'),
 | |
|                     'monitoring/service/process-check-result',
 | |
|                     array('host' => $object->getHost()->getName(), 'service' => $object->getName()),
 | |
|                     array(
 | |
|                         'icon'              => 'reply',
 | |
|                         'data-base-target'  => '_self',
 | |
|                         'title'             => $title
 | |
|                     )
 | |
|                 );
 | |
|             }
 | |
|         } ?>
 | |
|     </td>
 | |
| </tr>
 | |
| 
 | |
| <?php
 | |
| 
 | |
| $row = "<tr>\n  <th>%s</th>\n  <td>%s</td>\n</tr>\n";
 | |
| for ($i = 0; $i < count($parts); $i++) {
 | |
|     printf($row, '$ARG' . ($i + 1) . '$', $this->escape($parts[$i]));
 | |
| }
 | |
| 
 |