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 --- .../partials/command/object-command-form.phtml | 18 ++ .../partials/command/objects-command-form.phtml | 15 ++ .../partials/comment/comment-description.phtml | 24 ++ .../scripts/partials/comment/comment-detail.phtml | 82 +++++++ .../scripts/partials/comment/comment-header.phtml | 10 + .../scripts/partials/comment/comments-header.phtml | 32 +++ .../partials/downtime/downtime-header.phtml | 101 ++++++++ .../partials/downtime/downtimes-header.phtml | 40 +++ .../views/scripts/partials/event-history.phtml | 267 +++++++++++++++++++++ .../scripts/partials/host/objects-header.phtml | 41 ++++ .../scripts/partials/object/detail-content.phtml | 53 ++++ .../scripts/partials/object/host-header.phtml | 51 ++++ .../scripts/partials/object/quick-actions.phtml | 144 +++++++++++ .../scripts/partials/object/service-header.phtml | 72 ++++++ .../scripts/partials/service/objects-header.phtml | 45 ++++ .../views/scripts/partials/show-more.phtml | 15 ++ 16 files changed, 1010 insertions(+) create mode 100644 modules/monitoring/application/views/scripts/partials/command/object-command-form.phtml create mode 100644 modules/monitoring/application/views/scripts/partials/command/objects-command-form.phtml create mode 100644 modules/monitoring/application/views/scripts/partials/comment/comment-description.phtml create mode 100644 modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml create mode 100644 modules/monitoring/application/views/scripts/partials/comment/comment-header.phtml create mode 100644 modules/monitoring/application/views/scripts/partials/comment/comments-header.phtml create mode 100644 modules/monitoring/application/views/scripts/partials/downtime/downtime-header.phtml create mode 100644 modules/monitoring/application/views/scripts/partials/downtime/downtimes-header.phtml create mode 100644 modules/monitoring/application/views/scripts/partials/event-history.phtml create mode 100644 modules/monitoring/application/views/scripts/partials/host/objects-header.phtml create mode 100644 modules/monitoring/application/views/scripts/partials/object/detail-content.phtml create mode 100644 modules/monitoring/application/views/scripts/partials/object/host-header.phtml create mode 100644 modules/monitoring/application/views/scripts/partials/object/quick-actions.phtml create mode 100644 modules/monitoring/application/views/scripts/partials/object/service-header.phtml create mode 100644 modules/monitoring/application/views/scripts/partials/service/objects-header.phtml create mode 100644 modules/monitoring/application/views/scripts/partials/show-more.phtml (limited to 'modules/monitoring/application/views/scripts/partials') diff --git a/modules/monitoring/application/views/scripts/partials/command/object-command-form.phtml b/modules/monitoring/application/views/scripts/partials/command/object-command-form.phtml new file mode 100644 index 0000000..b4e5a9c --- /dev/null +++ b/modules/monitoring/application/views/scripts/partials/command/object-command-form.phtml @@ -0,0 +1,18 @@ + +
+compact): ?> + tabs ?> + +getType() === $object::TYPE_HOST) { + echo $this->render('partials/object/host-header.phtml'); + $this->baseFilter = Filter::where('host', $object->host_name); + $this->stats = $object->stats; + echo $this->render('list/components/servicesummary.phtml'); +} else { + echo $this->render('partials/object/service-header.phtml'); +} ?> +render('partials/object/quick-actions.phtml') ?> +
+
+ +
diff --git a/modules/monitoring/application/views/scripts/partials/command/objects-command-form.phtml b/modules/monitoring/application/views/scripts/partials/command/objects-command-form.phtml new file mode 100644 index 0000000..8d241ee --- /dev/null +++ b/modules/monitoring/application/views/scripts/partials/command/objects-command-form.phtml @@ -0,0 +1,15 @@ +
+compact): ?> + + + + render('list/components/servicesummary.phtml') ?> + render('partials/service/objects-header.phtml') ?> + + render('list/components/hostssummary.phtml') ?> + render('partials/host/objects-header.phtml') ?> + +
+
+ +
diff --git a/modules/monitoring/application/views/scripts/partials/comment/comment-description.phtml b/modules/monitoring/application/views/scripts/partials/comment/comment-description.phtml new file mode 100644 index 0000000..f35680c --- /dev/null +++ b/modules/monitoring/application/views/scripts/partials/comment/comment-description.phtml @@ -0,0 +1,24 @@ +type) { + case 'flapping': + $icon = 'flapping'; + $title = $this->translate('Flapping'); + $tooltip = $this->translate('Comment was caused by a flapping host or service'); + break; + case 'comment': + $icon = 'user'; + $title = $this->translate('User Comment'); + $tooltip = $this->translate('Comment was created by an user'); + break; + case 'downtime': + $icon = 'plug'; + $title = $this->translate('Downtime'); + $tooltip = $this->translate('Comment was caused by a downtime'); + break; + case 'ack': + $icon = 'ok'; + $title = $this->translate('Acknowledgement'); + $tooltip = $this->translate('Comment was caused by an acknowledgement'); + break; +} +echo $this->icon($icon, $tooltip, array('class' => 'large-icon')); diff --git a/modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml b/modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml new file mode 100644 index 0000000..c603d3c --- /dev/null +++ b/modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml @@ -0,0 +1,82 @@ +
+objecttype === 'service') { + echo ''; + echo sprintf( + $this->translate('%s on %s', 'service on host'), + $this->qlink( + $comment->service_display_name, + 'monitoring/service/show', + [ + 'host' => $comment->host_name, + 'service' => $comment->service_description + ], + [ + 'title' => sprintf( + $this->translate('Show detailed information for service %s on host %s'), + $comment->service_display_name, + $comment->host_display_name + ) + ] + ), + $this->qlink( + $comment->host_display_name, + 'monitoring/host/show', + ['host' => $comment->host_name], + [ + 'title' => sprintf( + $this->translate('Show detailed information for host %s'), + $comment->host_display_name + ) + ] + ) + ); + echo ''; +} else { + echo $this->qlink( + $comment->host_display_name, + 'monitoring/host/show', + array('host' => $comment->host_name), + array( + 'title' => sprintf( + $this->translate('Show detailed information for this comment about host %s'), + $comment->host_display_name + ) + ) + ); +} ?> + + translate('by') ?> + escape($comment->author) ?> + timeAgo($comment->timestamp) ?> + + + persistent ? $this->icon('attach', 'This comment is persistent') : '' ?> + expiration ? $this->icon('clock', sprintf( + $this->translate('This comment expires on %s at %s'), + $this->formatDate($comment->expiration), + $this->formatTime($comment->expiration) + )) : '' ?> + setAttrib('class', $deleteButton->getAttrib('class') . ' remove-action dont-print'); + $deleteButton->populate( + array( + 'comment_id' => $comment->id, + 'comment_is_service' => isset($comment->service_description), + 'comment_name' => $comment->name + ) + ); + $deleteButton->getElement('btn_submit') + ->setAttrib('aria-label', $this->translate('Delete comment')) + ->setAttrib('id', $buttonId) + ->setAttrib('aria-describedby', $buttonId . ' ' . $textId); + echo $deleteButton; + } ?> + +
+nl2br($this->markdownLine($comment->comment, isset($textId) ? ['id' => $textId, 'class' => 'caption'] : [ 'class' => 'caption'])) ?> diff --git a/modules/monitoring/application/views/scripts/partials/comment/comment-header.phtml b/modules/monitoring/application/views/scripts/partials/comment/comment-header.phtml new file mode 100644 index 0000000..4472479 --- /dev/null +++ b/modules/monitoring/application/views/scripts/partials/comment/comment-header.phtml @@ -0,0 +1,10 @@ + + + + + +
+ render('partials/comment/comment-description.phtml') ?> + + render('partials/comment/comment-detail.phtml') ?> +
diff --git a/modules/monitoring/application/views/scripts/partials/comment/comments-header.phtml b/modules/monitoring/application/views/scripts/partials/comment/comments-header.phtml new file mode 100644 index 0000000..c4c92da --- /dev/null +++ b/modules/monitoring/application/views/scripts/partials/comment/comments-header.phtml @@ -0,0 +1,32 @@ + + + $comment): + if ($i === 5) { + break; + } + ?> + + + + + + +
+ partial('partials/comment/comment-description.phtml', array('comment' => $comment)) ?> + + partial('partials/comment/comment-detail.phtml', array('comment' => $comment)) ?> +
+count() > 5): ?> +

+ qlink( + sprintf($this->translate('List all %d comments'), $comments->count()), + $listAllLink, + null, + array( + 'data-base-target' => '_next', + 'icon' => 'down-open' + ) + ) ?> +

+ diff --git a/modules/monitoring/application/views/scripts/partials/downtime/downtime-header.phtml b/modules/monitoring/application/views/scripts/partials/downtime/downtime-header.phtml new file mode 100644 index 0000000..dae6caa --- /dev/null +++ b/modules/monitoring/application/views/scripts/partials/downtime/downtime-header.phtml @@ -0,0 +1,101 @@ + + start <= time() && ! $downtime->is_in_effect): ?> +
translate('ENDS', 'Downtime status'); ?>
+
timeUntil($downtime->is_flexible ? $downtime->scheduled_end : $downtime->end, $this->compact, true) ?>
+ +
is_in_effect ? $this->translate('EXPIRES', 'Downtime status') : $this->translate('STARTS', 'Downtime status'); ?>
+
timeUntil($downtime->is_in_effect ? $downtime->end : $downtime->start, $this->compact, true) ?>
+ + + +
+ '; + echo sprintf( + $this->translate('%s on %s', 'service on host'), + $this->qlink( + $downtime->service_display_name, + 'monitoring/service/show', + [ + 'host' => $downtime->host_name, + 'service' => $downtime->service_description + ], + [ + 'title' => sprintf( + $this->translate('Show detailed information for service %s on host %s'), + $downtime->service_display_name, + $downtime->host_display_name + ) + ] + ), + $this->qlink( + $downtime->host_display_name, + 'monitoring/host/show', + ['host' => $downtime->host_name], + [ + 'title' => sprintf( + $this->translate('Show detailed information for host %s'), + $downtime->host_display_name + ) + ] + ) + ); + echo ''; + } else { + echo $this->qlink( + $downtime->host_display_name, + 'monitoring/host/show', + array('host' => $downtime->host_name, 'downtime_id' => $downtime->id), + array( + 'title' => sprintf( + $this->translate('Show detailed information for this downtime scheduled for host %s'), + $downtime->host_display_name + ) + ) + ); + } ?> + + escape(sprintf( + $downtime->is_flexible + ? $this->translate('Flexible downtime by %s') + : $this->translate('Fixed downtime by %s'), + $downtime->author_name + )) ?> + + is_in_effect && $downtime->start >= time()): ?> + translate('expires %s'), $this->timeUntil($downtime->is_flexible ? $downtime->scheduled_end : $downtime->end, false, true)) ?> + + + is_flexible): ?> + icon('magic', $this->translate('This downtime is flexible')); ?> + + + is_in_effect): ?> + icon('plug', $this->translate('This downtime is in effect')); ?> + + + setAttrib('class', $deleteButton->getAttrib('class') . ' remove-action dont-print'); + $deleteButton->populate( + array( + 'downtime_id' => $downtime->id, + 'downtime_is_service' => isset($downtime->service_description), + 'downtime_name' => $downtime->name + ) + ); + $deleteButton->getElement('btn_submit') + ->setAttrib('aria-label', $this->translate('Delete downtime')) + ->setAttrib('id', $buttonId) + ->setAttrib('aria-describedby', $buttonId . ' ' . $textId); + echo $deleteButton; + } ?> + +
+ nl2br($this->markdown($downtime->comment, isset($textId) ? ['id' => $textId] : null)) ?> + diff --git a/modules/monitoring/application/views/scripts/partials/downtime/downtimes-header.phtml b/modules/monitoring/application/views/scripts/partials/downtime/downtimes-header.phtml new file mode 100644 index 0000000..e2582c1 --- /dev/null +++ b/modules/monitoring/application/views/scripts/partials/downtime/downtimes-header.phtml @@ -0,0 +1,40 @@ + + + + downtimes as $i => $downtime): + if ($i > 5) { + break; + } + if ($downtime->objecttype === 'service') { + $this->isService = true; + $this->stateName = Service::getStateText($downtime->service_state); + } else { + $this->isService = false; + $this->stateName = Host::getStateText($downtime->host_state); + } + $this->downtime = $downtime; + $this->displayComment = false; + ?> + + render('partials/downtime/downtime-header.phtml') ?> + + + +
+count() > 5): ?> +

+ qlink( + sprintf($this->translate('List all %d downtimes'), $downtimes->count()), + $listAllLink, + null, + array( + 'data-base-target' => '_next', + 'icon' => 'down-open' + ) + ) ?> +

+ diff --git a/modules/monitoring/application/views/scripts/partials/event-history.phtml b/modules/monitoring/application/views/scripts/partials/event-history.phtml new file mode 100644 index 0000000..b81c95d --- /dev/null +++ b/modules/monitoring/application/views/scripts/partials/event-history.phtml @@ -0,0 +1,267 @@ +qlink( + $contact, + 'monitoring/show/contact', + array('contact_name' => $contact), + array('title' => sprintf($view->translate('Show detailed information about %s'), $contact)) + ); + } + return '[' . implode(', ', $links) . ']'; +} + +$self = $this; + +$url = $this->url(); +$limit = (int) $url->getParam('limit', 25); +if (! $url->hasParam('page') || ($page = (int) $url->getParam('page')) < 1) { + $page = 1; +} + +/** @var \Icinga\Module\Monitoring\DataView\EventHistory $history */ +$history->limit($limit * $page); +?> +
+translate('Flapping with a %.2f%% state change rate'); +$rowAction = Url::fromPath('monitoring/event/show'); +?> + peekAhead() as $event): ?> + + + +service_description); + $msg = $event->output; + $stateName = 'no-state'; + + $rowAction->setParams(new UrlParams())->addParams(array( + 'type' => $event->type, + 'id' => $event->id + )); + switch ($event->type) { + case substr($event->type, 0, 13) === 'notification_': + $rowAction->setParam('type', 'notify'); + $icon = 'bell'; + switch (substr($event->type, 13)) { + case 'state': + $iconTitle = $this->translate('State notification', 'tooltip'); + $label = $this->translate('NOTIFICATION'); + $stateName = $isService ? Service::getStateText($event->state) : Host::getStateText($event->state); + break; + case 'ack': + $iconTitle = $this->translate('Ack Notification', 'tooltip'); + $label = $this->translate('ACK NOTIFICATION'); + break; + case 'dt_start': + $iconTitle = $this->translate('Downtime start notification', 'tooltip'); + $label = $this->translate('DOWNTIME START NOTIFICATION'); + break; + case 'dt_end': + $iconTitle = $this->translate('Downtime end notification', 'tooltip'); + $label = $this->translate('DOWNTIME END NOTIFICATION'); + break; + case 'flapping': + $iconTitle = $this->translate('Flapping notification', 'tooltip'); + $label = $this->translate('FLAPPING NOTIFICATION'); + break; + case 'flapping_end': + $iconTitle = $this->translate('Flapping end notification', 'tooltip'); + $label = $this->translate('FLAPPING END NOTIFICATION'); + break; + case 'custom': + $iconTitle = $this->translate('Custom notification', 'tooltip'); + $label = $this->translate('CUSTOM NOTIFICATION'); + break; + } + $msg = $msg ? preg_replace_callback( + '/^\[([^\]]+)\]/', + function($match) use ($self) { return contactsLink($match, $self); }, + $msg + ) : $this->translate('This notification was not sent out to any contact.'); + break; + case 'comment': + $icon = 'comment-empty'; + $iconTitle = $this->translate('Comment', 'tooltip'); + $label = $this->translate('COMMENT'); + break; + case 'comment_deleted': + $icon = 'cancel'; + $iconTitle = $this->translate('Comment removed', 'tooltip'); + $label = $this->translate('COMMENT DELETED'); + break; + case 'ack': + $icon = 'ok'; + $iconTitle = $this->translate('Acknowledged', 'tooltip'); + $label = $this->translate('ACKNOWLEDGED'); + break; + case 'ack_deleted': + $icon = 'ok'; + $iconTitle = $this->translate('Acknowledgement removed', 'tooltip'); + $label = $this->translate('ACKNOWLEDGEMENT REMOVED'); + break; + case 'dt_comment': + $icon = 'plug'; + $iconTitle = $this->translate('Downtime scheduled', 'tooltip'); + $label = $this->translate('SCHEDULED DOWNTIME'); + break; + case 'dt_comment_deleted': + $icon = 'plug'; + $iconTitle = $this->translate('Downtime removed', 'tooltip'); + $label = $this->translate('DOWNTIME DELETED'); + break; + case 'flapping': + $icon = 'flapping'; + $iconTitle = $this->translate('Flapping started', 'tooltip'); + $label = $this->translate('FLAPPING'); + $msg = sprintf($flappingMsg, $msg); + break; + case 'flapping_deleted': + $icon = 'flapping'; + $iconTitle = $this->translate('Flapping stopped', 'tooltip'); + $label = $this->translate('FLAPPING STOPPED'); + $msg = sprintf($flappingMsg, $msg); + break; + case 'hard_state': + if ((int) $event->state === 0) { + $icon = 'thumbs-up'; + } else { + $icon = 'warning-empty'; + } + $iconTitle = $this->translate('Hard state', 'tooltip'); + $label = $isService ? Service::getStateText($event->state, true) : Host::getStateText($event->state, true); + $stateName = $isService ? Service::getStateText($event->state) : Host::getStateText($event->state); + break; + case 'soft_state': + $icon = 'spinner'; + $iconTitle = $this->translate('Soft state', 'tooltip'); + $label = $isService ? Service::getStateText($event->state, true) : Host::getStateText($event->state, true); + $stateName = $isService ? Service::getStateText($event->state) : Host::getStateText($event->state); + break; + case 'dt_start': + $icon = 'plug'; + $iconTitle = $this->translate('Downtime started', 'tooltip'); + $label = $this->translate('DOWNTIME START'); + break; + case 'dt_end': + $icon = 'plug'; + $iconTitle = $this->translate('Downtime ended', 'tooltip'); + $label = $this->translate('DOWNTIME END'); + break; + } ?> + format($event->timestamp); + if ($currentDate !== $lastDate): + $lastDate = $currentDate; + ?> + + + + + + + + + + + +
+ getIteratorPosition() % $limit === 0): ?> + + +
escape($label) ?>
+
formatTime($event->timestamp) ?>
+
+
+ +
+ icon($icon, $iconTitle) ?> +
+ +
+ isOverview): ?> + '; + echo sprintf( + $this->translate('%s on %s', 'service on host'), + $this->qlink( + $event->service_display_name, + 'monitoring/service/show', + [ + 'host' => $event->host_name, + 'service' => $event->service_description + ], + [ + 'title' => sprintf( + $this->translate('Show detailed information for service %s on host %s'), + $event->service_display_name, + $event->host_display_name + ) + ] + ), + $this->qlink( + $event->host_display_name, + 'monitoring/host/show', + ['host' => $event->host_name], + [ + 'title' => sprintf( + $this->translate('Show detailed information for host %s'), + $event->host_display_name + ) + ] + ) + ); + echo ''; + } else { + echo $this->qlink( + $event->host_display_name, + 'monitoring/host/show', + ['host' => $event->host_name], + [ + 'title' => sprintf( + $this->translate('Show detailed information for host %s'), + $event->host_display_name + ) + ] + ); + } ?> + + nl2br($this->createTicketLinks($this->markdown($msg, ['class' => 'overview-plugin-output']))) ?> +
+
+
+ +hasMore()): ?> + + +
diff --git a/modules/monitoring/application/views/scripts/partials/host/objects-header.phtml b/modules/monitoring/application/views/scripts/partials/host/objects-header.phtml new file mode 100644 index 0000000..48141e2 --- /dev/null +++ b/modules/monitoring/application/views/scripts/partials/host/objects-header.phtml @@ -0,0 +1,41 @@ + + + + $host): /** @var Host $host */ + if ($i === 5) { + break; + } ?> + + + + + + +
+ host_state) ?> +
+ timeSince($host->host_last_state_change, $this->compact) ?> +
+
+ link()->host( + $host->host_name, + $host->host_display_name + ) ?> + hostFlags($host) ?> +
+ 5): ?> + + diff --git a/modules/monitoring/application/views/scripts/partials/object/detail-content.phtml b/modules/monitoring/application/views/scripts/partials/object/detail-content.phtml new file mode 100644 index 0000000..62bfd2c --- /dev/null +++ b/modules/monitoring/application/views/scripts/partials/object/detail-content.phtml @@ -0,0 +1,53 @@ +
+ render('show/components/output.phtml') ?> + render('show/components/grapher.phtml') ?> + render('show/components/extensions.phtml') ?> + +

translate('Problem handling') ?>

+ + + render('show/components/acknowledgement.phtml') ?> + render('show/components/comments.phtml') ?> + render('show/components/downtime.phtml') ?> + render('show/components/notes.phtml') ?> + render('show/components/actions.phtml') ?> + render('show/components/flapping.phtml') ?> + type === 'service'): ?> + render('show/components/servicegroups.phtml') ?> + + render('show/components/hostgroups.phtml') ?> + + +
+ + render('show/components/perfdata.phtml') ?> + +

translate('Notifications') ?>

+ + + render('show/components/notifications.phtml') ?> + hasPermission('*') || ! $this->hasPermission('no-monitoring/contacts')): ?> + render('show/components/contacts.phtml') ?> + + +
+ +

translate('Check execution') ?>

+ + + render('show/components/command.phtml') ?> + render('show/components/checksource.phtml') ?> + render('show/components/reachable.phtml') ?> + render('show/components/checkstatistics.phtml') ?> + render('show/components/checktimeperiod.phtml') ?> + +
+ + customvars)): ?> +

translate('Custom Variables') ?>

+
+ customvarsWithOriginalNames, $object)) ?> +
+ + render('show/components/flags.phtml') ?> +
diff --git a/modules/monitoring/application/views/scripts/partials/object/host-header.phtml b/modules/monitoring/application/views/scripts/partials/object/host-header.phtml new file mode 100644 index 0000000..4de4a01 --- /dev/null +++ b/modules/monitoring/application/views/scripts/partials/object/host-header.phtml @@ -0,0 +1,51 @@ +getPath() === 'monitoring/host/show' && $url->getParam('host') === $object->host_name); +?> + + + + + +
+
host_state, true) ?>
+
+ timeSince($object->host_last_state_change) ?> + host_state > 0 && (int) $object->host_state_type === 0): ?> +
translate('Soft', 'Soft state') ?> host_attempt ?>
+ +
+
+ iconImage()->host($object) ?> + $object->host_name)) . '">'; + } + ?> + escape($object->host_display_name) ?> + host_display_name !== $object->host_name): ?> + (escape($object->host_name) ?>) + + '; + } + ?> + host_alias !== $object->host_display_name && $object->host_alias !== $object->host_name): ?> +
+ escape($this->translate('Alias', 'host') . ': ' . $object->host_alias) ?> +
+ + hostFlags($object) ?> + host_address6 && $object->host_address6 !== $object->host_name): ?> +
escape($object->host_address6) ?>
+ + host_address && $object->host_address !== $object->host_name): ?> +
escape($object->host_address) ?>
+ +
diff --git a/modules/monitoring/application/views/scripts/partials/object/quick-actions.phtml b/modules/monitoring/application/views/scripts/partials/object/quick-actions.phtml new file mode 100644 index 0000000..fe05a84 --- /dev/null +++ b/modules/monitoring/application/views/scripts/partials/object/quick-actions.phtml @@ -0,0 +1,144 @@ +
+ +
diff --git a/modules/monitoring/application/views/scripts/partials/object/service-header.phtml b/modules/monitoring/application/views/scripts/partials/object/service-header.phtml new file mode 100644 index 0000000..318fe49 --- /dev/null +++ b/modules/monitoring/application/views/scripts/partials/object/service-header.phtml @@ -0,0 +1,72 @@ +getPath() === 'monitoring/service/show' && $url->getParam('service') === $object->service_description); +?> + + + + + + + + + +
+
host_state, true) ?>
+
+ timeSince($object->host_last_state_change) ?> + host_state > 0 && (int) $object->host_state_type === 0): ?> +
translate('Soft', 'Soft state') ?> host_attempt ?>
+ +
+
+ iconImage()->host($object) ?> + + escape($object->host_display_name) ?> + host_display_name !== $object->host_name): ?> + (escape($object->host_name) ?>) + + + hostFlags($object) ?> + host_address6 && $object->host_address6 !== $object->host_name): ?> +
escape($object->host_address6) ?>
+ + host_address && $object->host_address !== $object->host_name): ?> +
escape($object->host_address) ?>
+ +
+
service_state, true) ?>
+
+ timeSince($object->service_last_state_change) ?> + service_state > 0 && (int) $object->service_state_type === 0): ?> +
translate('Soft', 'Soft state') ?> service_attempt ?>
+ +
+
+ iconImage()->service($object) ?> + translate('Service') ?>: + $object->host_name, + 'service' => $object->service_description + )) . '">'; + } + ?> + escape($object->service_display_name) ?> + service_display_name !== $object->service_description): ?> + (escape($object->service_description) ?>) + + '; + } + ?> + serviceFlags($object) ?> +
diff --git a/modules/monitoring/application/views/scripts/partials/service/objects-header.phtml b/modules/monitoring/application/views/scripts/partials/service/objects-header.phtml new file mode 100644 index 0000000..d342d87 --- /dev/null +++ b/modules/monitoring/application/views/scripts/partials/service/objects-header.phtml @@ -0,0 +1,45 @@ + + + + $service): /** @var Service $service */ + if ($i === 5) { + break; + } ?> + + + + + + +
+ service_state) ?> +
+ timeSince($service->service_last_state_change, $this->compact) ?> +
+
+ link()->service( + $service->service_description, + $service->service_display_name, + $service->host_name, + $service->host_display_name + . ($service->host_state != 0 ? ' (' . Host::getStateText($service->host_state, true) . ')' : '') + ) ?> + serviceFlags($service) ?> +
+ 5): ?> + + diff --git a/modules/monitoring/application/views/scripts/partials/show-more.phtml b/modules/monitoring/application/views/scripts/partials/show-more.phtml new file mode 100644 index 0000000..fd6a99d --- /dev/null +++ b/modules/monitoring/application/views/scripts/partials/show-more.phtml @@ -0,0 +1,15 @@ +hasMore()): ?> +
+ qlink( + $this->translate('Show More'), + $this->url()->without(array('showCompact', 'limit')), + null, + array( + 'data-base-target' => '_next', + 'class' => 'action-link' + ) + ) ?> +
+ -- cgit v1.2.3