From 8ca6cc32b2c789a3149861159ad258f2cb9491e3 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 14:39:39 +0200 Subject: Adding upstream version 2.11.4. Signed-off-by: Daniel Baumann --- .../scripts/show/components/acknowledgement.phtml | 94 ++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 modules/monitoring/application/views/scripts/show/components/acknowledgement.phtml (limited to 'modules/monitoring/application/views/scripts/show/components/acknowledgement.phtml') diff --git a/modules/monitoring/application/views/scripts/show/components/acknowledgement.phtml b/modules/monitoring/application/views/scripts/show/components/acknowledgement.phtml new file mode 100644 index 0000000..fd7f6bb --- /dev/null +++ b/modules/monitoring/application/views/scripts/show/components/acknowledgement.phtml @@ -0,0 +1,94 @@ +state, array(0, 99))) { + // Ignore this markup if the object is in a non-problem state or pending + return; +} + +if ($object->acknowledged): +$acknowledgement = $object->acknowledgement; +/** @var \Icinga\Module\Monitoring\Object\Acknowledgement $acknowledgement */ +?> + + translate('Acknowledged') ?> + + +
+
+ escape($acknowledgement->getAuthor()) ?> + + translate('acknowledged') ?> + timeAgo($acknowledgement->getEntryTime()) ?> + expires()): ?> + + translate('Expires %s'), + $this->timeUntil($acknowledgement->getExpirationTime()) + ) ?> + + + getSticky()): ?> + icon('pin', sprintf( + $this->translate( + 'Acknowledgement remains until the %1$s recovers even if the %1$s changes state' + ), + $object->getType(true) + )) ?> + + setAttrib('class', $removeAckForm->getAttrib('class') . ' remove-action'); + echo $removeAckForm; + } ?> +
+
+ nl2br($this->createTicketLinks($this->markdown($acknowledgement->getComment()))) ?> +
+
+ + + + + + + + translate('Not acknowledged') ?> + + hasPermission('monitoring/command/acknowledge-problem')) { + if ($object->getType() === $object::TYPE_HOST) { + $ackLink = $this->href( + 'monitoring/host/acknowledge-problem', + array('host' => $object->getName()), + null, + array('class' => 'action-link') + ); + } else { + $ackLink = $this->href( + 'monitoring/service/acknowledge-problem', + array('host' => $object->getHost()->getName(), 'service' => $object->getName()), + null, + array('class' => 'action-link') + ); + } + ?> + qlink( + $this->translate('Acknowledge'), + $ackLink, + null, + array( + 'class' => 'action-link', + 'data-base-target' => '_self', + 'icon' => 'edit', + 'title' => $this->translate( + 'Acknowledge this problem, suppress all future notifications for it and tag it as being handled' + ) + ) + ) ?> + + + + -- cgit v1.2.3