diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 12:39:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 12:39:39 +0000 |
commit | 8ca6cc32b2c789a3149861159ad258f2cb9491e3 (patch) | |
tree | 2492de6f1528dd44eaa169a5c1555026d9cb75ec /modules/monitoring/application/views/scripts/partials/service | |
parent | Initial commit. (diff) | |
download | icingaweb2-upstream.tar.xz icingaweb2-upstream.zip |
Adding upstream version 2.11.4.upstream/2.11.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | modules/monitoring/application/views/scripts/partials/service/objects-header.phtml | 45 |
1 files changed, 45 insertions, 0 deletions
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 @@ +<?php +use Icinga\Module\Monitoring\Object\Host; +use Icinga\Module\Monitoring\Object\Service; + +if (! ($serviceCount = count($objects))): return; endif ?> +<table class="state-table service-detail-state"> +<tbody> +<?php foreach ($objects as $i => $service): /** @var Service $service */ + if ($i === 5) { + break; + } ?> + <tr> + <td class="state-col state-<?= Service::getStateText($service->service_state) ?><?= $service->service_handled ? ' handled' : '' ?>"> + <span class="sr-only"><?= Service::getStateText($service->service_state) ?></span> + <div class="state-meta"> + <?= $this->timeSince($service->service_last_state_change, $this->compact) ?> + </div> + </td> + <td> + <?= $this->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) . ')' : '') + ) ?> + <?= $this->serviceFlags($service) ?> + </td> + </tr> +<?php endforeach ?> +</tbody> +</table> +<?php if ($serviceCount > 5): ?> +<div class="services-link"> + <?= $this->qlink( + sprintf($this->translate('List all %d services'), $serviceCount), + $this->url()->setPath('monitoring/list/services'), + null, + array( + 'data-base-target' => '_next', + 'icon' => 'forward' + ) + ) ?> +</div> +<?php endif ?> |