monitoring/detail: Display the comment of the ack next to the ack
refs #9674
This commit is contained in:
parent
f0e8340fbd
commit
2da49ad697
|
@ -8,14 +8,32 @@ if (in_array((int) $object->state, array(0, 99))) {
|
|||
}
|
||||
|
||||
if ($object->acknowledged): ?>
|
||||
<?php
|
||||
$acknowledgement = $object->acknowledgement;
|
||||
/** @var \Icinga\Module\Monitoring\Object\Acknowledgement $acknowledgement */
|
||||
?>
|
||||
<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 '-';
|
||||
} ?>
|
||||
<ul class="inline-comments">
|
||||
<li class="comment-item">
|
||||
<h3>
|
||||
<?= sprintf(
|
||||
$this->translate('%s acknowledged %s'),
|
||||
'<span class="author">' . $this->escape($acknowledgement->getAuthor()) . '</span>',
|
||||
$this->timeAgo($acknowledgement->getEntryTime())
|
||||
) ?>
|
||||
<?php if (isset($removeAckForm)) {
|
||||
// Form is unset if the current user lacks the respective permission
|
||||
echo $removeAckForm;
|
||||
} ?>
|
||||
</h3>
|
||||
<p>
|
||||
<span class="sr-only">(<?= $this->translate('Comment') ?>): </span>
|
||||
<?= nl2br($this->createTicketLinks($acknowledgement->getComment()), false) ?>
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<?php else: ?>
|
||||
|
|
Loading…
Reference in New Issue