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/host | |
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/host/objects-header.phtml | 41 |
1 files changed, 41 insertions, 0 deletions
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 @@ +<?php +use Icinga\Module\Monitoring\Object\Host; + +if (! ($hostCount = count($objects))): return; endif ?> +<table class="state-table host-detail-state"> +<tbody> +<?php foreach ($objects as $i => $host): /** @var Host $host */ + if ($i === 5) { + break; + } ?> + <tr> + <td class="state-col state-<?= Host::getStateText($host->host_state); ?><?= $host->host_handled ? ' handled' : '' ?>"> + <span class="sr-only"><?= Host::getStateText($host->host_state) ?></span> + <div class="state-meta"> + <?= $this->timeSince($host->host_last_state_change, $this->compact) ?> + </div> + </td> + <td> + <?= $this->link()->host( + $host->host_name, + $host->host_display_name + ) ?> + <?= $this->hostFlags($host) ?> + </td> + </tr> +<?php endforeach ?> +</tbody> +</table> +<?php if ($hostCount > 5): ?> +<div class="hosts-link"> + <?= $this->qlink( + sprintf($this->translate('List all %d hosts'), $hostCount), + $this->url()->setPath('monitoring/list/hosts'), + null, + array( + 'data-base-target' => '_next', + 'icon' => 'forward' + ) + ) ?> +</div> +<?php endif ?> |