summaryrefslogtreecommitdiffstats
path: root/application/views/scripts/events/details.phtml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 12:43:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 12:43:29 +0000
commita9b77c01caef9ae7a2c84e2333d28ceb028cf4d3 (patch)
tree4a77cd3e323c37b0e5b3d7578b9718cdf1a89262 /application/views/scripts/events/details.phtml
parentInitial commit. (diff)
downloadicingaweb2-module-eventdb-a9b77c01caef9ae7a2c84e2333d28ceb028cf4d3.tar.xz
icingaweb2-module-eventdb-a9b77c01caef9ae7a2c84e2333d28ceb028cf4d3.zip
Adding upstream version 1.3.0.upstream/1.3.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--application/views/scripts/events/details.phtml50
1 files changed, 50 insertions, 0 deletions
diff --git a/application/views/scripts/events/details.phtml b/application/views/scripts/events/details.phtml
new file mode 100644
index 0000000..ee9f3cd
--- /dev/null
+++ b/application/views/scripts/events/details.phtml
@@ -0,0 +1,50 @@
+<?php
+/** @var array $events */
+
+if (! $this->compact):
+?>
+<div class="controls">
+ <?= $this->tabs ?>
+</div>
+<?php endif ?>
+<div class="content">
+ <table class="common-table event-summary-table table-row-selectable" data-base-target="_next">
+ <?php $autoClear = false; foreach($events as $eventData):
+ /** @var \Icinga\Module\Eventdb\Event $event */
+ $event = $this->event($eventData);
+ $url = $this->url('eventdb/event', array('id' => $event->id));
+ ?>
+ <tr href="<?= $url ?>">
+ <td class="priority-col <?= $event->getPriority() ?> <?= $event->ack ? 'ack' : '' ?>">
+ <div class="priority-label"><?= strtoupper($event->getPriority()) ?></div>
+ <div class="event-meta"><span class="timeago" title="<?= $event->created ?>"><?= $this->timeAgo(strtotime($event->created)) ?></span></div>
+ </td>
+ <td class="icon-col">
+ <?= $this->icon($event->getTypeIcon(), $event->getType()) ?>
+ <?php if ($event->ack) { echo $this->icon('ok', $this->translate('Acknowledged')); } ?>
+ <?php if ($event->group_autoclear) { $autoClear = true; echo $this->icon('reschedule', $this->translate('Auto-Clear')); } ?>
+ </td>
+ <?= $this->column('host_name', $event) ?>
+ <?= $this->column('program', $event) ?>
+ <?= $this->column('message', $event) ?>
+ </tr>
+ <?php endforeach; ?>
+ </table>
+
+ <?php
+ foreach ($extensionsHtml as $extensionHtml) {
+ echo $extensionHtml;
+ }
+ ?>
+
+ <?php if (isset($commentForm)): ?>
+ <h3><?= $this->translate('Add comment / acknowledge') ?></h3>
+ <?php if ($autoClear): ?>
+ <div class="warning">
+ <?= $this->translate('At least one event is set to auto-clear.') ?>
+ <?= $this->translate('Please only acknowledge manually, if you know what that means.') ?>
+ </div>
+ <?php endif; ?>
+ <div class="comment-form"><?= $commentForm ?></div>
+ <?php endif ?>
+</div>