From b18bc644404e02b57635bfcc8258e85abb141146 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 13:44:46 +0200 Subject: Adding upstream version 1.1.1. Signed-off-by: Daniel Baumann --- application/views/scripts/services/grid.phtml | 150 ++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 application/views/scripts/services/grid.phtml (limited to 'application/views/scripts/services/grid.phtml') diff --git a/application/views/scripts/services/grid.phtml b/application/views/scripts/services/grid.phtml new file mode 100644 index 0000000..f00ce8e --- /dev/null +++ b/application/views/scripts/services/grid.phtml @@ -0,0 +1,150 @@ +compact): ?> + controls ?> + +
+ +
+
translate('No services found matching the filter.') ?>
+
+
+ $_) { + $hostFilter->orFilter(Filter::where('host.name', $hostName)); +} +?> + + + + + $serviceDisplayName):?> + + + + + + + + $hostDisplayName): ?> + + + + + + horizontalPaginator->count(); + $horizontalItemsPerPage = $this->horizontalPaginator->getLimit() ?? $horizontalTotalItems; + $horizontalTotalPages = ceil($horizontalTotalItems / $horizontalItemsPerPage); + + $verticalTotalItems = $this->verticalPaginator->count(); + $verticalItemsPerPage = $this->verticalPaginator->getLimit() ?? $verticalTotalItems; + $verticalTotalPages = ceil($verticalTotalItems / $verticalItemsPerPage); + + if (! $this->compact && $horizontalTotalPages > 1): ?> + + + + + compact && $verticalTotalPages > 1): ?> + + + + + +
partial( + 'joystickPagination-icingadb.phtml', + 'default', + array( + 'flippable' => true, + 'baseUrl' => $baseUrl, + 'xAxisPaginator' => $horizontalPaginator, + 'yAxisPaginator' => $verticalPaginator + ) + ); ?>
qlink( + $this->ellipsis($serviceDisplayName, 24), + Url::fromPath('icingadb/services')->addFilter( + Filter::matchAll($hostFilter, Filter::where('service.name', $serviceDescription)) + ), + null, + array('title' => sprintf( + $this->translate('List all services with the name "%s" on all reported hosts'), + $serviceDisplayName + )), + false + ) ?>
$_) { + $serviceFilter->orFilter(Filter::where('service.name', $serviceName)); + } + echo $this->qlink( + $hostDisplayName, + Url::fromPath('icingadb/services')->addFilter( + Filter::matchAll($serviceFilter, Filter::where('host.name', $hostName)) + ), + null, + array('title' => sprintf($this->translate('List all reported services on host %s'), $hostDisplayName)) + ); + ?> + + + + protectId($service->host_name . '_' . $service->name . '_desc') ?> + + escape($service->state->output) ?> + + qlink( + '', + 'icingadb/service', + array( + 'host.name' => $hostName, + 'name' => $serviceDescription + ), + array( + 'aria-describedby' => $ariaDescribedById, + 'aria-label' => sprintf( + $this->translate('Show detailed information for service %s on host %s'), + $service->display_name, + $service->host_display_name + ), + 'class' => 'service-grid-link state-' . $service->state->getStateText() . ($service->state->is_handled ? ' handled' : ''), + 'title' => $service->state->output + ) + ) ?> + + qlink( + $this->translate('Load more'), + $baseUrl, + array( + 'limit' => ( + $horizontalItemsPerPage + 20) . ',' + . $verticalItemsPerPage + ), + array( + 'class' => 'action-link', + 'data-base-target' => '_self' + ) + ) ?> + +
+ qlink( + $this->translate('Load more'), + $baseUrl, + array( + 'limit' => $horizontalItemsPerPage . ',' . + ($verticalItemsPerPage + 20) + ), + array( + 'class' => 'action-link', + 'data-base-target' => '_self' + ) + ) ?> +
+ -- cgit v1.2.3