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/list/downtimes.phtml | |
parent | Initial commit. (diff) | |
download | icingaweb2-8ca6cc32b2c789a3149861159ad258f2cb9491e3.tar.xz icingaweb2-8ca6cc32b2c789a3149861159ad258f2cb9491e3.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/list/downtimes.phtml | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/modules/monitoring/application/views/scripts/list/downtimes.phtml b/modules/monitoring/application/views/scripts/list/downtimes.phtml new file mode 100644 index 0000000..46ce0bb --- /dev/null +++ b/modules/monitoring/application/views/scripts/list/downtimes.phtml @@ -0,0 +1,64 @@ +<?php +use Icinga\Module\Monitoring\Object\Host; +use Icinga\Module\Monitoring\Object\Service; + +if (! $this->compact): ?> +<div class="controls"> + <?= $this->tabs ?> + <?= $this->render('list/components/selectioninfo.phtml') ?> + <?= $this->paginator ?> + <div class="sort-controls-container"> + <?= $this->limiter ?> + <?= $this->sortBox ?> + </div> + <?= $this->filterEditor ?> +</div> +<?php endif ?> +<div class="content"> +<?php if (! $downtimes->hasResult()): ?> + <p><?= $this->translate('No downtimes found matching the filter.') ?></p> +</div> +<?php return; endif ?> + <table class="common-table state-table table-row-selectable multiselect" + data-base-target="_next" + data-icinga-multiselect-url="<?= $this->href('monitoring/downtimes/show') ?>" + data-icinga-multiselect-controllers="<?= $this->href("monitoring/downtimes") ?>" + data-icinga-multiselect-data="downtime_id"> + <thead class="print-only"> + <tr> + <th><?= $this->translate('State') ?></th> + <th><?= $this->translate('Downtime') ?></th> + </tr> + </thead> + <tbody> + <?php foreach ($downtimes->peekAhead($this->compact) as $downtime): + if (isset($downtime->service_description)) { + $this->isService = true; + $this->stateName = Service::getStateText($downtime->service_state); + } else { + $this->isService = false; + $this->stateName = Host::getStateText($downtime->host_state); + } + // Set downtime for partials + $this->downtime = $downtime; + ?> + <tr href="<?= $this->href('monitoring/downtime/show', array('downtime_id' => $downtime->id)) ?>"> + <?= $this->render('partials/downtime/downtime-header.phtml') ?> + </tr> + <?php endforeach ?> + </tbody> + </table> +<?php if ($downtimes->hasMore()): ?> + <div class="dont-print action-links"> + <?= $this->qlink( + $this->translate('Show More'), + $this->url()->without(array('showCompact', 'limit')), + null, + array( + 'class' => 'action-link', + 'data-base-target' => '_next' + ) + ) ?> + </div> +<?php endif ?> +</div> |