mirror of
				https://github.com/Icinga/icingaweb2.git
				synced 2025-10-31 19:34:16 +01:00 
			
		
		
		
	This reverts commit b9aee47d1f44893ef953bf9168e21f368b95ed7f. Conflicts: modules/monitoring/application/views/scripts/list/comments.phtml modules/monitoring/application/views/scripts/list/downtimes.phtml
		
			
				
	
	
		
			56 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			PHTML
		
	
	
	
	
	
			
		
		
	
	
			56 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			PHTML
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| /** @var \Icinga\Module\Monitoring\Object\MonitoredObject $object */
 | |
| 
 | |
| if (in_array((int) $object->state, array(0, 99))) {
 | |
|     // Ignore this markup if the object is in a non-problem state or pending
 | |
|     return;
 | |
| }
 | |
| 
 | |
| if ($object->acknowledged): ?>
 | |
|     <tr>
 | |
|         <th><?= $this->translate('Acknowledged') ?></th>
 | |
|         <td data-base-target="_self">
 | |
|             <?php if (isset($removeAckForm)) { // Form is unset if the current user lacks the respective permission
 | |
|                 echo $removeAckForm;
 | |
|             } else {
 | |
|                 echo '-';
 | |
|             } ?>
 | |
|         </td>
 | |
|     </tr>
 | |
| <?php else: ?>
 | |
|     <tr>
 | |
|         <th><?= $this->translate('Not acknowledged') ?></th>
 | |
|         <td>
 | |
|             <?php if ($this->hasPermission('monitoring/command/acknowledge-problem')) {
 | |
|                 if ($object->getType() === $object::TYPE_HOST) {
 | |
|                     $ackLink = $this->href(
 | |
|                         'monitoring/host/acknowledge-problem',
 | |
|                         array('host' => $object->getName())
 | |
|                     );
 | |
|                 } else {
 | |
|                     $ackLink = $this->href(
 | |
|                         'monitoring/service/acknowledge-problem',
 | |
|                         array('host' => $object->getHost()->getName(), 'service' => $object->getName())
 | |
|                     );
 | |
|                 }
 | |
|             ?>
 | |
|             <?= $this->qlink(
 | |
|                 $this->translate('Acknowledge'),
 | |
|                 $ackLink,
 | |
|                 null,
 | |
|                 array(
 | |
|                     'icon'              => 'ok',
 | |
|                     'data-base-target'  => '_self',
 | |
|                     'title'             => $this->translate(
 | |
|                         'Acknowledge this problem, suppress all future notifications for it and tag it as being handled'
 | |
|                     )
 | |
|                 )
 | |
|             ); ?>
 | |
|             <?php } else {
 | |
|                 echo '-';
 | |
|             } // endif ?>
 | |
|         </td>
 | |
|     </tr>
 | |
| <?php endif ?>
 |