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 ++++++++++++++++++ .../views/scripts/show/components/actions.phtml | 43 ++++++++ .../scripts/show/components/checksource.phtml | 6 ++ .../scripts/show/components/checkstatistics.phtml | 85 ++++++++++++++++ .../scripts/show/components/checktimeperiod.phtml | 21 ++++ .../views/scripts/show/components/command.phtml | 52 ++++++++++ .../views/scripts/show/components/comments.phtml | 86 ++++++++++++++++ .../views/scripts/show/components/contacts.phtml | 38 +++++++ .../views/scripts/show/components/downtime.phtml | 109 +++++++++++++++++++++ .../views/scripts/show/components/extensions.phtml | 4 + .../views/scripts/show/components/flags.phtml | 4 + .../views/scripts/show/components/flapping.phtml | 14 +++ .../views/scripts/show/components/grapher.phtml | 6 ++ .../views/scripts/show/components/hostgroups.phtml | 19 ++++ .../views/scripts/show/components/notes.phtml | 48 +++++++++ .../scripts/show/components/notifications.phtml | 68 +++++++++++++ .../views/scripts/show/components/output.phtml | 5 + .../views/scripts/show/components/perfdata.phtml | 4 + .../views/scripts/show/components/reachable.phtml | 15 +++ .../scripts/show/components/servicegroups.phtml | 20 ++++ .../views/scripts/show/components/status.phtml | 0 .../application/views/scripts/show/contact.phtml | 70 +++++++++++++ 22 files changed, 811 insertions(+) create mode 100644 modules/monitoring/application/views/scripts/show/components/acknowledgement.phtml create mode 100644 modules/monitoring/application/views/scripts/show/components/actions.phtml create mode 100644 modules/monitoring/application/views/scripts/show/components/checksource.phtml create mode 100644 modules/monitoring/application/views/scripts/show/components/checkstatistics.phtml create mode 100644 modules/monitoring/application/views/scripts/show/components/checktimeperiod.phtml create mode 100644 modules/monitoring/application/views/scripts/show/components/command.phtml create mode 100644 modules/monitoring/application/views/scripts/show/components/comments.phtml create mode 100644 modules/monitoring/application/views/scripts/show/components/contacts.phtml create mode 100644 modules/monitoring/application/views/scripts/show/components/downtime.phtml create mode 100644 modules/monitoring/application/views/scripts/show/components/extensions.phtml create mode 100644 modules/monitoring/application/views/scripts/show/components/flags.phtml create mode 100644 modules/monitoring/application/views/scripts/show/components/flapping.phtml create mode 100644 modules/monitoring/application/views/scripts/show/components/grapher.phtml create mode 100644 modules/monitoring/application/views/scripts/show/components/hostgroups.phtml create mode 100644 modules/monitoring/application/views/scripts/show/components/notes.phtml create mode 100644 modules/monitoring/application/views/scripts/show/components/notifications.phtml create mode 100644 modules/monitoring/application/views/scripts/show/components/output.phtml create mode 100644 modules/monitoring/application/views/scripts/show/components/perfdata.phtml create mode 100644 modules/monitoring/application/views/scripts/show/components/reachable.phtml create mode 100644 modules/monitoring/application/views/scripts/show/components/servicegroups.phtml create mode 100644 modules/monitoring/application/views/scripts/show/components/status.phtml create mode 100644 modules/monitoring/application/views/scripts/show/contact.phtml (limited to 'modules/monitoring/application/views/scripts/show') 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' + ) + ) + ) ?> + + + + diff --git a/modules/monitoring/application/views/scripts/show/components/actions.phtml b/modules/monitoring/application/views/scripts/show/components/actions.phtml new file mode 100644 index 0000000..938ab2a --- /dev/null +++ b/modules/monitoring/application/views/scripts/show/components/actions.phtml @@ -0,0 +1,43 @@ +load($object->getType() . '-action'); +foreach ($navigation as $item) { + $item->setObject($object); +} + +foreach ($object->getActionUrls() as $i => $link) { + $navigation->addItem( + + // add warning to links that open in new tabs to improve accessibility, as recommended by WCAG20 G201 + $this->icon( + 'forward', + $this->translate('Link opens in new window'), + array('aria-label' => $this->translate('Link opens in new window')) + ) . ' Action ' . ($i + 1), + array( + 'url' => $link, + 'target' => '_blank', + 'renderer' => array( + 'NavigationItemRenderer', + 'escape_label' => false + ) + ) + ); +} + +if (isset($this->actions)) { + $navigation->merge($this->actions); +} + +if ($navigation->isEmpty() || ! $navigation->hasRenderableItems()) { + return; +} + +?> + + translate('Actions'); ?> + getRenderer()->setElementTag('td')->setCssClass('actions go-ahead'); ?> + diff --git a/modules/monitoring/application/views/scripts/show/components/checksource.phtml b/modules/monitoring/application/views/scripts/show/components/checksource.phtml new file mode 100644 index 0000000..ac9799f --- /dev/null +++ b/modules/monitoring/application/views/scripts/show/components/checksource.phtml @@ -0,0 +1,6 @@ +check_source !== null): ?> + + translate('Check Source') ?> + escape($object->check_source) ?> + + diff --git a/modules/monitoring/application/views/scripts/show/components/checkstatistics.phtml b/modules/monitoring/application/views/scripts/show/components/checkstatistics.phtml new file mode 100644 index 0000000..e37e30a --- /dev/null +++ b/modules/monitoring/application/views/scripts/show/components/checkstatistics.phtml @@ -0,0 +1,85 @@ +active_checks_enabled; +?> + + + translate('Last check') : $this->translate('Last update') ?> + +state !== 99): ?> + timeAgo($object->last_check) ?> + next_update < time()): ?> + icon('circle', $this->translate('Check result is late'), array('class' => 'icon-stateful state-critical')) ?> + + + + + + + + translate('Next check') : $this->translate('Next update') ?> + + state !== 99) { + if ($activeChecksEnabled) { + echo $this->timeUntil($object->next_check); + } else { + echo sprintf($this->translate('expected %s'), $this->timeUntil($object->next_update)); + } + } ?> + hasPermission('monitoring/command/schedule-check')) { + if ($object->getType() === $object::TYPE_SERVICE) { + echo $this->qlink( + $this->translate('Reschedule'), + 'monitoring/service/reschedule-check', + array('host' => $object->getHost()->getName(), 'service' => $object->getName()), + array( + 'class' => 'action-link', + 'data-base-target' => '_self', + 'icon' => 'calendar-empty', + 'title' => $this->translate( + 'Schedule the next active check at a different time than the current one' + ) + ) + ); + } else { + echo $this->qlink( + $this->translate('Reschedule'), + 'monitoring/host/reschedule-check', + array('host' => $object->getName()), + array( + 'class' => 'action-link', + 'data-base-target' => '_self', + 'icon' => 'calendar-empty', + 'title' => $this->translate( + 'Schedule the next active check at a different time than the current one' + ) + ) + ); + } + } ?> + + + + + translate('Check attempts') ?> + + attempt ?> + (state_type === 0 ? $this->translate('soft state') : $this->translate('hard state') ?>) + + + +check_execution_time): ?> + + translate('Check execution time') ?> + check_execution_time, 3) ?>s + + + +check_latency): ?> + + translate('Check latency') ?> + check_latency ?>s + + diff --git a/modules/monitoring/application/views/scripts/show/components/checktimeperiod.phtml b/modules/monitoring/application/views/scripts/show/components/checktimeperiod.phtml new file mode 100644 index 0000000..34c4eb9 --- /dev/null +++ b/modules/monitoring/application/views/scripts/show/components/checktimeperiod.phtml @@ -0,0 +1,21 @@ +service_check_timeperiod)): ?> + + + translate('Check Timeperiod') ?> + + service_check_timeperiod ?> + + + + + +host_check_timeperiod)): ?> + + + translate('Check Timeperiod') ?> + + host_check_timeperiod ?> + + + + diff --git a/modules/monitoring/application/views/scripts/show/components/command.phtml b/modules/monitoring/application/views/scripts/show/components/command.phtml new file mode 100644 index 0000000..9b51458 --- /dev/null +++ b/modules/monitoring/application/views/scripts/show/components/command.phtml @@ -0,0 +1,52 @@ +check_command); +$command = array_shift($parts); + +if ($showInstance): ?> + + translate('Instance') ?> + escape($object->instance_name) ?> + + + + translate('Command') ?> + + escape($command) ?> + hasPermission('monitoring/command/process-check-result') && $object->passive_checks_enabled) { + $title = sprintf( + $this->translate('Submit a one time or so called passive result for the %s check'), $command + ); + if ($object->getType() === $object::TYPE_HOST) { + echo $this->qlink( + $this->translate('Process check result'), + 'monitoring/host/process-check-result', + array('host' => $object->getName()), + array( + 'class' => 'action-link', + 'data-base-target' => '_self', + 'icon' => 'edit', + 'title' => $title + ) + ); + } else { + echo $this->qlink( + $this->translate('Process check result'), + 'monitoring/service/process-check-result', + array('host' => $object->getHost()->getName(), 'service' => $object->getName()), + array( + 'class' => 'action-link', + 'data-base-target' => '_self', + 'icon' => 'edit', + 'title' => $title + ) + ); + } + } ?> + + + +\n %s\n %s\n\n"; +for ($i = 0; $i < count($parts); $i++) { + printf($row, '$ARG' . ($i + 1) . '$', $this->escape($parts[$i])); +} diff --git a/modules/monitoring/application/views/scripts/show/components/comments.phtml b/modules/monitoring/application/views/scripts/show/components/comments.phtml new file mode 100644 index 0000000..fd980ee --- /dev/null +++ b/modules/monitoring/application/views/scripts/show/components/comments.phtml @@ -0,0 +1,86 @@ +hasPermission('monitoring/command/comment/add')) { + /** @var \Icinga\Module\Monitoring\Object\MonitoredObject $object */ + if ($object->getType() === $object::TYPE_HOST) { + $addLink = $this->qlink( + $this->translate('Add comment'), + 'monitoring/host/add-comment', + array('host' => $object->getName()), + array( + 'class' => 'action-link', + 'data-base-target' => '_self', + 'icon' => 'comment-empty', + 'title' => $this->translate('Add a new comment to this host') + ) + ); + } else { + $addLink = $this->qlink( + $this->translate('Add comment'), + 'monitoring/service/add-comment', + array('host' => $object->getHost()->getName(), 'service' => $object->getName()), + array( + 'class' => 'action-link', + 'data-base-target' => '_self', + 'icon' => 'comment-empty', + 'title' => $this->translate('Add a new comment to this service') + ) + ); + } +} +if (empty($object->comments) && ! $addLink) { + return; +} +?> + + translate('Comments'); + if (! empty($object->comments) && $addLink) { + echo '
' . $addLink; + } + ?> + + comments)): + echo $addLink; + else: ?> +
+ comments as $comment): ?> +
+ + escape($comment->author) ?> + + translate('commented') ?> + timeAgo($comment->timestamp) ?> + expiration): ?> + + translate('Expires %s'), + $this->timeUntil($comment->expiration) + ) ?> + + + + persistent ? $this->icon('attach', 'This comment is persistent.') : '' ?> + setAttrib('class', $deleteButton->getAttrib('class') . ' remove-action'); + $deleteButton->populate( + array( + 'comment_id' => $comment->id, + 'comment_is_service' => isset($comment->service_description), + 'comment_name' => $comment->name + ) + ); + echo $deleteButton; + } ?> +
+
+ nl2br($this->createTicketLinks($this->markdownLine($comment->comment, [ 'class' => 'caption']))) ?> +
+ +
+ + + diff --git a/modules/monitoring/application/views/scripts/show/components/contacts.phtml b/modules/monitoring/application/views/scripts/show/components/contacts.phtml new file mode 100644 index 0000000..5661c1a --- /dev/null +++ b/modules/monitoring/application/views/scripts/show/components/contacts.phtml @@ -0,0 +1,38 @@ +contacts->hasResult()) { + + $list = array(); + foreach ($object->contacts as $contact) { + $list[] = $this->qlink( + $contact->contact_alias, + 'monitoring/show/contact', + array('contact_name' => $contact->contact_name), + array('title' => sprintf($this->translate('Show detailed information about %s'), $contact->contact_alias)) + ); + } + + printf( + "%s%s\n", + $this->translate('Contacts'), + implode(', ', $list) + ); +} + +if ($object->contactgroups->hasResult()) { + $list = array(); + foreach ($object->contactgroups as $contactgroup) { + $list[] = $this->qlink( + $contactgroup->contactgroup_alias, + 'monitoring/list/contactgroups', + array('contactgroup_name' => $contactgroup->contactgroup_name), + array('title' => sprintf($this->translate('List contacts in contact-group "%s"'), $contactgroup->contactgroup_alias)) + ); + } + + printf( + "%s%s\n", + $this->translate('Contactgroups'), + implode(', ', $list) + ); +} diff --git a/modules/monitoring/application/views/scripts/show/components/downtime.phtml b/modules/monitoring/application/views/scripts/show/components/downtime.phtml new file mode 100644 index 0000000..618d4d9 --- /dev/null +++ b/modules/monitoring/application/views/scripts/show/components/downtime.phtml @@ -0,0 +1,109 @@ +hasPermission('monitoring/command/downtime/schedule')) { + /** @var \Icinga\Module\Monitoring\Object\MonitoredObject $object */ + if ($object->getType() === $object::TYPE_HOST) { + $addLink = $this->qlink( + $this->translate('Schedule downtime'), + 'monitoring/host/schedule-downtime', + array('host' => $object->getName()), + array( + 'class' => 'action-link', + 'data-base-target' => '_self', + 'icon' => 'plug', + 'title' => $this->translate( + 'Schedule a downtime to suppress all problem notifications within a specific period of time' + ) + ) + ); + } else { + $addLink = $this->qlink( + $this->translate('Schedule downtime'), + 'monitoring/service/schedule-downtime', + array('host' => $object->getHost()->getName(), 'service' => $object->getName()), + array( + 'class' => 'action-link', + 'data-base-target' => '_self', + 'icon' => 'plug', + 'title' => $this->translate( + 'Schedule a downtime to suppress all problem notifications within a specific period of time' + ) + ) + ); + } +} +if (empty($object->downtimes) && ! $addLink) { + return; +} +?> + + translate('Downtimes'); + if (! empty($object->downtimes) && $addLink) { + echo '
' . $addLink; + } + ?> + + downtimes)): + echo $addLink; + else: ?> +
+ downtimes as $downtime): + if ((bool) $downtime->is_in_effect) { + $state = sprintf( + $this->translate('expires %s', 'Last format parameter represents the downtime expire time'), + $this->timeUntil($downtime->end, false, true) + ); + } else { + if ($downtime->start <= time()) { + $state = sprintf( + $this->translate('ends %s', 'Last format parameter represents the end time'), + $this->timeUntil($downtime->is_flexible ? $downtime->scheduled_end : $downtime->end, false, true) + ); + } else { + $state = sprintf( + $this->translate('scheduled %s', 'Last format parameter represents the time scheduled'), + $this->timeUntil($downtime->start, false, true) + ) . ' ' . sprintf( + $this->translate('expires %s', 'Last format parameter represents the downtime expire time'), + $this->timeUntil($downtime->is_flexible ? $downtime->scheduled_end : $downtime->end, false, true) + ); + } + } + ?> +
+ escape(sprintf( + $downtime->is_flexible + ? $this->translate('Flexible downtime by %s') + : $this->translate('Fixed downtime by %s'), + $downtime->author_name + )) ?> + + + + translate('created') ?> + timeAgo($downtime->entry_time) ?> + + setAttrib('class', $deleteButton->getAttrib('class') . ' remove-action'); + $deleteButton->populate( + array( + 'downtime_id' => $downtime->id, + 'downtime_is_service' => $object->getType() === $object::TYPE_SERVICE, + 'downtime_name' => $downtime->name + ) + ); + echo $deleteButton; + } ?> +
+
+ nl2br($this->createTicketLinks($this->markdown($downtime->comment))) ?> +
+ +
+ + + diff --git a/modules/monitoring/application/views/scripts/show/components/extensions.phtml b/modules/monitoring/application/views/scripts/show/components/extensions.phtml new file mode 100644 index 0000000..263b7e4 --- /dev/null +++ b/modules/monitoring/application/views/scripts/show/components/extensions.phtml @@ -0,0 +1,4 @@ + +

translate('Feature Commands') ?>

+ + diff --git a/modules/monitoring/application/views/scripts/show/components/flapping.phtml b/modules/monitoring/application/views/scripts/show/components/flapping.phtml new file mode 100644 index 0000000..f09b107 --- /dev/null +++ b/modules/monitoring/application/views/scripts/show/components/flapping.phtml @@ -0,0 +1,14 @@ +is_flapping) { + printf( + "%s%s %s\n", + 'Flapping', + $this->icon('flapping', 'Flapping'), + sprintf( + 'Currently flapping with a %.2f%% state change rate', + $object->percent_state_change + ) + ); +} + diff --git a/modules/monitoring/application/views/scripts/show/components/grapher.phtml b/modules/monitoring/application/views/scripts/show/components/grapher.phtml new file mode 100644 index 0000000..0b49e63 --- /dev/null +++ b/modules/monitoring/application/views/scripts/show/components/grapher.phtml @@ -0,0 +1,6 @@ +getPreviewHtml($object); + } +} ?> + diff --git a/modules/monitoring/application/views/scripts/show/components/hostgroups.phtml b/modules/monitoring/application/views/scripts/show/components/hostgroups.phtml new file mode 100644 index 0000000..377b56f --- /dev/null +++ b/modules/monitoring/application/views/scripts/show/components/hostgroups.phtml @@ -0,0 +1,19 @@ +hostgroups)) return; + +$list = array(); +foreach ($object->hostgroups as $name => $alias) { + $list[] = $this->qlink( + $alias, + 'monitoring/list/hosts', + array('hostgroup_name' => $name), + array('title' => sprintf($this->translate('List all hosts in the group "%s"'), $alias)) + ); +} +printf( + "%s%s\n", + $this->translate('Hostgroups'), + implode(', ', $list) +); + diff --git a/modules/monitoring/application/views/scripts/show/components/notes.phtml b/modules/monitoring/application/views/scripts/show/components/notes.phtml new file mode 100644 index 0000000..c868c95 --- /dev/null +++ b/modules/monitoring/application/views/scripts/show/components/notes.phtml @@ -0,0 +1,48 @@ +notes); + +$links = $object->getNotesUrls(); +if (! empty($links)) { + foreach ($links as $link) { + $navigation->addItem( + // add warning to links that open in new tabs to improve accessibility, as recommended by WCAG20 G201 + $this->icon( + 'forward', + $this->translate('Link opens in new window'), + array('aria-label' => $this->translate('Link opens in new window')) + ) . ' ' . $this->escape($link), + array( + 'url' => $link, + 'target' => '_blank', + 'renderer' => array( + 'NavigationItemRenderer', + 'escape_label' => false + ) + ) + ); + } +} + +if (($navigation->isEmpty() || ! $navigation->hasRenderableItems()) && $notes === '') { + return; +} +?> + + translate('Notes') ?> + + getRenderer() ?> + + markdown($notes, [ + 'id' => $object->type . '-notes', + 'class' => 'collapsible', + 'data-visible-height' => 200 + ]) ?> + + + \ No newline at end of file diff --git a/modules/monitoring/application/views/scripts/show/components/notifications.phtml b/modules/monitoring/application/views/scripts/show/components/notifications.phtml new file mode 100644 index 0000000..3e8c665 --- /dev/null +++ b/modules/monitoring/application/views/scripts/show/components/notifications.phtml @@ -0,0 +1,68 @@ + + translate('Notifications') ?> + + hasPermission('monitoring/command/send-custom-notification')) { + if ($object->getType() === $object::TYPE_HOST) { + /** @var \Icinga\Module\Monitoring\Object\Host $object */ + echo $this->qlink( + $this->translate('Send notification'), + 'monitoring/host/send-custom-notification', + array('host' => $object->getName()), + array( + 'class' => 'action-link', + 'data-base-target' => '_self', + 'icon' => 'bell', + 'title' => $this->translate( + 'Send a custom notification to contacts responsible for this host' + ) + ) + ); + } else { + /** @var \Icinga\Module\Monitoring\Object\Service $object */ + echo $this->qlink( + $this->translate('Send notification'), + 'monitoring/service/send-custom-notification', + array('host' => $object->getHost()->getName(), 'service' => $object->getName()), + array( + 'class' => 'action-link', + 'data-base-target' => '_self', + 'icon' => 'bell', + 'title' => $this->translate( + 'Send a custom notification to contacts responsible for this service' + ) + ) + ); + } + if (! in_array((int) $object->state, array(0, 99))) { + echo '
'; + } + } elseif (in_array((int) $object->state, array(0, 99))) { + echo '-'; + } + // We are not interested in notifications for OK or pending objects + if (! in_array((int) $object->state, array(0, 99))) { + if ($object->current_notification_number > 0) { + if ((int) $object->current_notification_number === 1) { + $msg = sprintf( + $this->translate('A notification has been sent for this issue %s.'), + $this->timeAgo($object->last_notification) + ); + } else { + $msg = sprintf( + $this->translate('%d notifications have been sent for this issue.'), + $object->current_notification_number + ) . '
' . sprintf( + $this->translate('The last one was sent %s.'), + $this->timeAgo($object->last_notification) + ); + } + } else { + $msg = $this->translate('No notification has been sent for this issue.'); + } + echo $msg; + } + ?> + + diff --git a/modules/monitoring/application/views/scripts/show/components/output.phtml b/modules/monitoring/application/views/scripts/show/components/output.phtml new file mode 100644 index 0000000..34d8268 --- /dev/null +++ b/modules/monitoring/application/views/scripts/show/components/output.phtml @@ -0,0 +1,5 @@ +

translate('Plugin Output') ?>

+
+ pluginOutput($object->output, false, $object->check_command) ?> + pluginOutput($object->long_output, false, $object->check_command) ?> +
diff --git a/modules/monitoring/application/views/scripts/show/components/perfdata.phtml b/modules/monitoring/application/views/scripts/show/components/perfdata.phtml new file mode 100644 index 0000000..78ea6d2 --- /dev/null +++ b/modules/monitoring/application/views/scripts/show/components/perfdata.phtml @@ -0,0 +1,4 @@ +perfdata): ?> +

translate('Performance data') ?>

+
perfdata($object->perfdata) ?>
+ diff --git a/modules/monitoring/application/views/scripts/show/components/reachable.phtml b/modules/monitoring/application/views/scripts/show/components/reachable.phtml new file mode 100644 index 0000000..8d55e84 --- /dev/null +++ b/modules/monitoring/application/views/scripts/show/components/reachable.phtml @@ -0,0 +1,15 @@ +is_reachable !== null): ?> + + + translate('Reachable') ?> + + + is_reachable ? $this->translate('yes') : $this->translate('no') ?> + is_reachable) { + echo $this->icon('circle', $this->translate('Is reachable'), array('class' => 'icon-stateful state-ok')); + } else { + echo $this->icon('circle', $this->translate('Not reachable'), array('class' => 'icon-stateful state-critical')); + } ?> + + + diff --git a/modules/monitoring/application/views/scripts/show/components/servicegroups.phtml b/modules/monitoring/application/views/scripts/show/components/servicegroups.phtml new file mode 100644 index 0000000..09ff248 --- /dev/null +++ b/modules/monitoring/application/views/scripts/show/components/servicegroups.phtml @@ -0,0 +1,20 @@ +servicegroups)) return; + +$list = array(); +foreach ($object->servicegroups as $name => $alias) { + $list[] = $this->qlink( + $alias, + 'monitoring/list/services', + array('servicegroup_name' => $name), + array('title' => sprintf($this->translate('List all services in the group "%s"'), $alias)) + ); +} + +printf( + "%s%s\n", + $this->translate('Servicegroups'), + implode(', ', $list) +); + diff --git a/modules/monitoring/application/views/scripts/show/components/status.phtml b/modules/monitoring/application/views/scripts/show/components/status.phtml new file mode 100644 index 0000000..e69de29 diff --git a/modules/monitoring/application/views/scripts/show/contact.phtml b/modules/monitoring/application/views/scripts/show/contact.phtml new file mode 100644 index 0000000..aa448ae --- /dev/null +++ b/modules/monitoring/application/views/scripts/show/contact.phtml @@ -0,0 +1,70 @@ +getHelper('ContactFlags') ?> +
+ compact): ?> + tabs; ?> + +

translate('Contact details') ?>

+
+ + + translate('No such contact') ?>: +
+ + + + + + + + +contact_email): ?> + + + + + +contact_pager): ?> + + + + + + + + + + + + + + +
escape($contact->contact_alias) ?> (contact_name ?>)
translate('Email') ?> + + escape($contact->contact_email); ?> + +
translate('Pager') ?>escape($contact->contact_pager) ?>
translate('Hosts') ?>escape($contactHelper->contactFlags($contact, 'host')) ?>
+ escape($contact->contact_notify_host_timeperiod) ?>
translate('Services') ?>escape($contactHelper->contactFlags($contact, 'service')) ?>
+ escape($contact->contact_notify_service_timeperiod) ?>
+ +

translate('Commands') ?>:

+ + +

translate('Notifications sent to this contact') ?>

+ limiter; ?> + paginator; ?> + + + +partial('list/notifications.phtml', array( + 'notifications' => $notifications, + 'compact' => true +)); ?> + +
translate('No notifications have been sent for this contact') ?>
+ -- cgit v1.2.3