From 9f39660f50004ca7c49ea171e2a6f199487cd667 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 14 Apr 2024 15:18:42 +0200 Subject: Adding upstream version 1.3.0. Signed-off-by: Daniel Baumann --- application/views/scripts/config/index.phtml | 21 +++ application/views/scripts/config/monitoring.phtml | 7 + application/views/scripts/event/index-plain.phtml | 62 ++++++++ application/views/scripts/event/index.phtml | 174 +++++++++++++++++++++ .../views/scripts/events/details-plain.phtml | 18 +++ application/views/scripts/events/details.phtml | 50 ++++++ application/views/scripts/events/index-plain.phtml | 19 +++ application/views/scripts/events/index.phtml | 93 +++++++++++ application/views/scripts/format/text.phtml | 13 ++ 9 files changed, 457 insertions(+) create mode 100644 application/views/scripts/config/index.phtml create mode 100644 application/views/scripts/config/monitoring.phtml create mode 100644 application/views/scripts/event/index-plain.phtml create mode 100644 application/views/scripts/event/index.phtml create mode 100644 application/views/scripts/events/details-plain.phtml create mode 100644 application/views/scripts/events/details.phtml create mode 100644 application/views/scripts/events/index-plain.phtml create mode 100644 application/views/scripts/events/index.phtml create mode 100644 application/views/scripts/format/text.phtml (limited to 'application/views/scripts') diff --git a/application/views/scripts/config/index.phtml b/application/views/scripts/config/index.phtml new file mode 100644 index 0000000..2c47663 --- /dev/null +++ b/application/views/scripts/config/index.phtml @@ -0,0 +1,21 @@ +
+ +
+
+

translate('Database backend') ?>

+ qlink( + $this->translate('Create a New Resource'), + 'config/createresource', + null, + array( + 'class' => 'button-link', + 'data-base-target' => '_next', + 'icon' => 'plus', + 'title' => $this->translate('Create a new resource'), + ) + ) ?> + + +

translate('Configure module') ?>

+ +
diff --git a/application/views/scripts/config/monitoring.phtml b/application/views/scripts/config/monitoring.phtml new file mode 100644 index 0000000..1f6bbde --- /dev/null +++ b/application/views/scripts/config/monitoring.phtml @@ -0,0 +1,7 @@ +
+ +
+
+

translate('Configure integration into the monitoring module') ?>

+ +
diff --git a/application/views/scripts/event/index-plain.phtml b/application/views/scripts/event/index-plain.phtml new file mode 100644 index 0000000..5b6ea8d --- /dev/null +++ b/application/views/scripts/event/index-plain.phtml @@ -0,0 +1,62 @@ +translate('Comment'), + $this->translate('Acknowledgement'), + $this->translate('Revocation'), +); + +$displayColumns = array_merge(array('program', 'message', 'facility'), $additionalColumns); +?> +translate('Timestamp') ?>: created ?> + +translate('Priority') ?>: getPriority()) ?> +ack ? sprintf(' (%s)', $this->translate('Acknowledged')) : '' ?> + +translate('Type') ?>: getType() ?> + + +columnHeader($col, null, true) ?>: offsetGet($col)) ?> + + + +hasResult()): ?> +[ translate('Comments') ?> ] + + +type] ?>: created ?> + +translate('User') ?>: user ?> + +translate('Message') ?>: message ?> + + + + + +hasResult()): ?> +[ translate('Grouped Events') ?> ] + +event($groupedEventData); +?> +translate('Timestamp') ?>: created ?> + +translate('Priority') ?>: getPriority()) ?> +ack ? sprintf(' (%s)', $this->translate('Acknowledged')) : '' ?> + +translate('Type') ?>: getType() ?> + + +columnHeader($col, null, true) ?>: offsetGet($col)) ?> + + + + + + diff --git a/application/views/scripts/event/index.phtml b/application/views/scripts/event/index.phtml new file mode 100644 index 0000000..83dcf01 --- /dev/null +++ b/application/views/scripts/event/index.phtml @@ -0,0 +1,174 @@ +icon('comment', $this->translate('Comment')), + $this->icon('ok', $this->translate('Acknowledgement')), + $this->icon('cancel', $this->translate('Revocation')) +); + +if (! $this->compact): ?> +
+ tabs ?> +
+ +
+ + + + + column('host_name', $event, array('selectable')) ?> + + + column('host_address', $event, array('selectable')) ?> + +
+
getPriority()) ?>
+
timeAgo(strtotime($event->created)) ?>
+
+ icon($event->getTypeIcon(), $event->getType()) ?> + ack) { echo $this->icon('ok', $this->translate('Acknowledged')); } ?> + group_autoclear) { echo $this->icon('reschedule', $this->translate('Auto-Clear')); } ?> +
+

translate('Details') ?>

+ + + + columnHeader($column) ?> + column($column, $event) ?> + + +
+ message): ?> +

translate('Message') ?>

+
eventMessage($event->message) ?>
+ + + + +

translate('Actions') ?>

+ + + + + + + + + + +
translate('Other events for') ?>qlink( + $this->translate('Host'), + 'eventdb/events', + array('host_name' => $event->host_name), + array( + 'icon' => 'search', + 'class' => 'action-link' + ) + ) ?> + program): ?> + qlink( + $this->translate('Program'), + 'eventdb/events', + array( + 'program' => $event->program, + ), + array( + 'icon' => 'search', + 'class' => 'action-link' + ) + ) ?> + qlink( + $this->translate('Program and Host'), + 'eventdb/events', + array( + 'host_name' => $event->host_name, + 'program' => $event->program, + ), + array( + 'icon' => 'search', + 'class' => 'action-link' + ) + ) ?> + +
translate('Monitoring') ?> + qlink( + $this->translate('Host service status'), + 'eventdb/event/host', + array('host' => $event->host_name), + array( + 'icon' => 'search', + 'class' => 'action-link' + ) + ) ?> +
+ + +

translate('Add comment / acknowledge') ?>

+ group_autoclear): ?> +
+ translate('This event is set to auto-clear.') ?> + translate('Please only acknowledge manually, if you know what that means.') ?> +
+ +
+ + +

translate('Comments') ?>

+ hasResult()): ?> +

translate('No comments recorded for this event yet.') ?>

+ + + + + + + + + + + + +
timeAgo(strtotime($comment->created)) ?>type] ?>escape($comment->user) ?>escape($comment->message) ?>
+ + + hasResult()): ?> +

translate('Grouped Events') ?>

+ + + event($groupedEventData); + ?> + + + + column('host_name', $groupedEvent) ?> + column('program', $groupedEvent) ?> + column('message', $groupedEvent) ?> + + + +
+
getPriority()) ?>
+
timeAgo(strtotime($groupedEvent->created)) ?>
+
+ icon($groupedEvent->getTypeIcon(), $groupedEvent->getType()) ?> + ack) { echo $this->icon('ok', $this->translate('Acknowledged')); } ?> + group_autoclear) { $autoClear = true; echo $this->icon('reschedule', $this->translate('Auto-Clear')); } ?> +
+ + +
+ diff --git a/application/views/scripts/events/details-plain.phtml b/application/views/scripts/events/details-plain.phtml new file mode 100644 index 0000000..d5eb724 --- /dev/null +++ b/application/views/scripts/events/details-plain.phtml @@ -0,0 +1,18 @@ +event($eventData); + $url = $this->url('eventdb/event', array('id' => $event->id)); +?> +translate('Timestamp') ?>: created ?> + +translate('Priority') ?>: getPriority()) ?> +ack ? sprintf(' (%s)', $this->translate('Acknowledged')) : '' ?> + +translate('Type') ?>: getType() ?> + + +columnHeader($col, null, true) ?>: offsetGet($col)) ?> + + + + 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 @@ +compact): +?> +
+ tabs ?> +
+ +
+ + event($eventData); + $url = $this->url('eventdb/event', array('id' => $event->id)); + ?> + + + + column('host_name', $event) ?> + column('program', $event) ?> + column('message', $event) ?> + + +
+
getPriority()) ?>
+
timeAgo(strtotime($event->created)) ?>
+
+ icon($event->getTypeIcon(), $event->getType()) ?> + ack) { echo $this->icon('ok', $this->translate('Acknowledged')); } ?> + group_autoclear) { $autoClear = true; echo $this->icon('reschedule', $this->translate('Auto-Clear')); } ?> +
+ + + + +

translate('Add comment / acknowledge') ?>

+ +
+ translate('At least one event is set to auto-clear.') ?> + translate('Please only acknowledge manually, if you know what that means.') ?> +
+ +
+ +
diff --git a/application/views/scripts/events/index-plain.phtml b/application/views/scripts/events/index-plain.phtml new file mode 100644 index 0000000..55f4c2e --- /dev/null +++ b/application/views/scripts/events/index-plain.phtml @@ -0,0 +1,19 @@ +hasResult()): ?> +translate('No events recorded yet.') ?> +event($eventData); ?> +translate('Timestamp') ?>: created ?> + +translate('Priority') ?>: getPriority()) ?> +ack ? sprintf(' (%s)', $this->translate('Acknowledged')) : '' ?> + +translate('Type') ?>: getType() ?> + + +columnHeader($col, null, true) ?>: offsetGet($col)) ?> + + + + diff --git a/application/views/scripts/events/index.phtml b/application/views/scripts/events/index.phtml new file mode 100644 index 0000000..f1e4da7 --- /dev/null +++ b/application/views/scripts/events/index.phtml @@ -0,0 +1,93 @@ +compact): ?> +
+ tabs ?> + translate( + 'Press and hold the Ctrl key while clicking on rows to select multiple rows or press and hold the Shift key to' + . ' select a range of rows', + 'Multi-selection help' + ); + ?> +
+ translate('%s row(s) selected', 'Multi-selection count'), + '0' + ) ?> +
+ paginator ?> +
+ limiter ?> + sortBox ?> +
+ filterEditor ?> +
+ severityFilterForm ?> + ackFilterForm ?> +
+
+ +
+hasResult()): ?> +

translate('No events recorded yet.') ?>

+
+ + + compact): ?> + + + + + + columnHeader($displayColumn) ?> + + + + + + event($eventData); + $created = $event->created; + $createdTs = strtotime($created); + $url = $this->url('eventdb/event', array('id' => $event->id)); + $classes = array('priority-col', $event->getPriority()); + if ($event->ack) { + $classes[] = 'ack'; + } + ?> + + + + + column($displayColumn, $event) ?> + + + + +
+
getPriority()) ?>
+ +
+ icon($event->getTypeIcon(), $event->getType()) ?> + ack) { echo $this->icon('ok', $this->translate('Acknowledged')); } ?> + group_autoclear) { echo $this->icon('reschedule', $this->translate('Auto-Clear')); } ?> +
+compact && $events->hasMore()): ?> + qlink( + $this->translate('Show More'), + $this->url()->without(array('view', 'limit')), + null, + array( + 'data-base-target' => '_next', + 'class' => 'action-link' + ) + ) ?> + + diff --git a/application/views/scripts/format/text.phtml b/application/views/scripts/format/text.phtml new file mode 100644 index 0000000..647914b --- /dev/null +++ b/application/views/scripts/format/text.phtml @@ -0,0 +1,13 @@ +compact): ?> +
tabs ?>
+ +
+ +
partial($partial . '.phtml', null, $this) ?>
+ +
+ +
-- cgit v1.2.3