Skip to content

Commit

Permalink
monitoring: Fix list headers
Browse files Browse the repository at this point in the history
refs #5543
  • Loading branch information
lippserd committed Oct 1, 2015
1 parent 69ea4bd commit df58940
Show file tree
Hide file tree
Showing 9 changed files with 118 additions and 50 deletions.
27 changes: 17 additions & 10 deletions modules/monitoring/application/views/scripts/list/comments.phtml
@@ -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">
Expand Down
Expand Up @@ -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">
Expand Down
23 changes: 15 additions & 8 deletions modules/monitoring/application/views/scripts/list/contacts.phtml
@@ -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">
Expand Down Expand Up @@ -75,4 +82,4 @@
<?php else: ?>
<?= $this->translate('No contacts found matching the filter'); ?>
<?php endif ?>
</div>
</div>
27 changes: 16 additions & 11 deletions modules/monitoring/application/views/scripts/list/downtimes.phtml
Expand Up @@ -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">
Expand All @@ -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);
Expand Down
14 changes: 11 additions & 3 deletions modules/monitoring/application/views/scripts/list/hostgroups.phtml
Expand Up @@ -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 ?>
Expand Down
Expand Up @@ -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">
Expand Down
Expand Up @@ -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 ?>
Expand Down
10 changes: 5 additions & 5 deletions modules/monitoring/application/views/scripts/list/services.phtml
Expand Up @@ -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">
Expand Down
@@ -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 ?>

0 comments on commit df58940

Please sign in to comment.