monitoring: Fix list headers

refs #5543
This commit is contained in:
Eric Lippmann 2015-10-01 13:07:48 +02:00
parent 69ea4bd31c
commit df589400e2
9 changed files with 118 additions and 50 deletions

View File

@ -1,14 +1,21 @@
<?php if (! $this->compact): ?>
<div class="controls">
<?= $this->tabs; ?>
<div class="dontprint">
<?= $this->render('list/components/selectioninfo.phtml'); ?>
</div>
<h1><?= count($comments) ?> <?= $this->translate('Comments') ?></h1>
<?= $this->sortBox; ?>
<?= $this->limiter; ?>
<?= $this->paginator; ?>
<?= $this->filterEditor; ?>
<div class="controls dont-print">
<?= $tabs ?>
<div class="text-right">
<?= $this->render('list/components/selectioninfo.phtml'); ?>
</div>
<div class="grid">
<div class="col-1-3">
<?= $this->limiter ?>
</div>
<div class="col-1-3">
<?= $this->paginator ?>
</div>
<div class="col-1-3 text-right">
<?= $this->sortBox ?>
</div>
</div>
<?= $this->filterEditor ?>
</div>
<?php endif ?>
<div class="content">

View File

@ -2,11 +2,19 @@
if (! $this->compact): ?>
<div class="controls">
<?= $this->tabs; ?>
<?= $this->sortBox; ?>
<?= $this->limiter; ?>
<?= $this->paginator; ?>
<?= $this->filterEditor; ?>
<?= $this->tabs ?>
<div class="grid">
<div class="col-1-3">
<?= $this->limiter ?>
</div>
<div class="col-1-3">
<?= $this->paginator ?>
</div>
<div class="col-1-3 text-right">
<?= $this->sortBox ?>
</div>
</div>
<?= $this->filterEditor ?>
</div>
<?php endif ?>
<div class="content">

View File

@ -1,13 +1,20 @@
<?php if (! $this->compact): ?>
<div class="controls">
<?= $this->tabs; ?>
<?= $this->sortBox; ?>
<?= $this->limiter; ?>
<?= $this->paginator; ?>
<?= $this->filterEditor; ?>
<div class="controls dont-print">
<?= $tabs ?>
<div class="grid">
<div class="col-1-3">
<?= $this->limiter ?>
</div>
<div class="col-1-3">
<?= $this->paginator ?>
</div>
<div class="col-1-3 text-right">
<?= $this->sortBox ?>
</div>
</div>
<?= $this->filterEditor ?>
</div>
<?php endif ?>
<div class="content">
<?php if ($contacts->hasResult()): ?>
<table class="action action-table listing-table" data-base-target="_next">
@ -75,4 +82,4 @@
<?php else: ?>
<?= $this->translate('No contacts found matching the filter'); ?>
<?php endif ?>
</div>
</div>

View File

@ -2,19 +2,24 @@
use Icinga\Module\Monitoring\Object\Host;
use Icinga\Module\Monitoring\Object\Service;
$downtimes->peekAhead($this->compact);
if (! $this->compact): ?>
<div class="controls">
<?= $this->tabs; ?>
<div class="dontprint">
<div class="controls dont-print">
<?= $tabs ?>
<div class="text-right">
<?= $this->render('list/components/selectioninfo.phtml'); ?>
</div>
<h1><?= count($downtimes) ?> <?= $this->translate('Downtimes') ?></h1>
<?= $this->sortBox ?>
<?= $this->limiter ?>
<?= $this->paginator ?>
<?= $this->filterEditor ?>
<div class="grid">
<div class="col-1-3">
<?= $this->limiter ?>
</div>
<div class="col-1-3">
<?= $this->paginator ?>
</div>
<div class="col-1-3 text-right">
<?= $this->sortBox ?>
</div>
</div>
<?= $this->filterEditor ?>
</div>
<?php endif ?>
<div class="content">
@ -24,7 +29,7 @@ if (! $this->compact): ?>
data-icinga-multiselect-controllers="<?= $this->href("monitoring/downtimes") ?>"
data-icinga-multiselect-data="downtime_id">
<tbody>
<?php foreach ($downtimes as $downtime):
<?php foreach ($downtimes->peekAhead($this->compact) as $downtime):
if (isset($downtime->service_description)) {
$this->isService = true;
$this->stateName = Service::getStateText($downtime->service_state);

View File

@ -4,9 +4,17 @@ use Icinga\Module\Monitoring\Web\Widget\StateBadges;
if (! $this->compact): ?>
<div class="controls">
<?= $this->tabs ?>
<?= $this->sortBox ?>
<?= $this->limiter ?>
<?= $this->paginator ?>
<div class="grid">
<div class="col-1-3">
<?= $this->limiter ?>
</div>
<div class="col-1-3">
<?= $this->paginator ?>
</div>
<div class="col-1-3 text-right">
<?= $this->sortBox ?>
</div>
</div>
<?= $this->filterEditor ?>
</div>
<?php endif ?>

View File

@ -6,11 +6,21 @@ $notifications->peekAhead($this->compact);
if (! $this->compact): ?>
<div class="controls">
<?= $this->tabs; ?>
<?= $this->sortBox; ?>
<?= $this->limiter; ?>
<?= $this->paginator; ?>
<?= $this->filterEditor; ?>
<div class="controls dont-print">
<?= $tabs ?>
<div class="grid">
<div class="col-1-3">
<?= $this->limiter ?>
</div>
<div class="col-1-3">
<?= $this->paginator ?>
</div>
<div class="col-1-3 text-right">
<?= $this->sortBox ?>
</div>
</div>
<?= $this->filterEditor ?>
</div>
</div>
<?php endif ?>
<div class="content">

View File

@ -3,9 +3,17 @@
if (! $this->compact): ?>
<div class="controls">
<?= $this->tabs ?>
<?= $this->sortBox ?>
<?= $this->limiter ?>
<?= $this->paginator ?>
<div class="grid">
<div class="col-1-3">
<?= $this->limiter ?>
</div>
<div class="col-1-3">
<?= $this->paginator ?>
</div>
<div class="col-1-3 text-right">
<?= $this->sortBox ?>
</div>
</div>
<?= $this->filterEditor ?>
</div>
<?php endif ?>

View File

@ -3,18 +3,18 @@ use Icinga\Module\Monitoring\Object\Host;
use Icinga\Module\Monitoring\Object\Service;
if (! $this->compact): ?>
<div class="controls separated">
<div class="controls separated dont-print">
<?= $this->tabs ?>
<div class="grid dont-print">
<div class="col-1-2 text-left">
<div class="grid">
<div class="col-1-2">
<?= $this->render('list/components/servicesummary.phtml') ?>
</div>
<div class="col-1-2 text-right">
<?= $this->render('list/components/selectioninfo.phtml') ?>
</div>
</div>
<div class="grid dont-print">
<div class="col-1-3 text-left">
<div class="grid">
<div class="col-1-3">
<?= $this->limiter ?>
</div>
<div class="col-1-3">

View File

@ -0,0 +1,15 @@
<?php
/** @var \Icinga\Module\Monitoring\DataView\DataView $dataView */
if ($dataView->hasMore()): ?>
<div class="text-right">
<?= $this->qlink(
$this->translate('Show More'),
$this->url()->without(array('view', 'limit')),
null,
array(
'data-base-target' => '_next',
'class' => 'action-link'
)
) ?>
</div>
<?php endif ?>