Skip to content

Commit

Permalink
monitoring: Fix list headers, #2
Browse files Browse the repository at this point in the history
refs #5543
  • Loading branch information
lippserd committed Oct 1, 2015
1 parent 04dd811 commit aadbbe0
Show file tree
Hide file tree
Showing 13 changed files with 57 additions and 125 deletions.
18 changes: 5 additions & 13 deletions modules/monitoring/application/views/scripts/list/comments.phtml
@@ -1,19 +1,11 @@
<?php if (! $this->compact): ?>
<div class="controls dont-print">
<div class="controls separated 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>
<?= $this->limiter ?>
<?= $this->paginator ?>
<?= $this->render('list/components/selectioninfo.phtml') ?>
<?= $this->sortBox ?>
</div>
<?= $this->filterEditor ?>
</div>
Expand Down
Expand Up @@ -7,7 +7,7 @@ if (! $stats instanceof stdClass) {
$stats = $stats->fetchRow();
}
?>
<div class="v-center">
<div class="hosts-summary">
<?= $this->qlink(
sprintf($this->translatePlural('%u Host', '%u Hosts', $stats->hosts_total), $stats->hosts_total),
// @TODO(el): Fix that
Expand Down
Expand Up @@ -7,7 +7,7 @@ if (! $stats instanceof stdClass) {
$stats = $stats->fetchRow();
}
?>
<div class="v-center">
<div class="services-summary">
<?= $this->qlink(
sprintf($this->translatePlural(
'%u Service', '%u Services', $stats->services_total),
Expand Down
@@ -1,18 +1,12 @@
<?php

if (! $this->compact): ?>
<div class="controls">
<?= $this->tabs ?>
<div class="controls separated 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>
<?= $this->limiter ?>
<?= $this->paginator ?>
<?= $this->sortBox ?>
</div>
<?= $this->filterEditor ?>
</div>
Expand Down
14 changes: 4 additions & 10 deletions modules/monitoring/application/views/scripts/list/contacts.phtml
@@ -1,16 +1,10 @@
<?php if (! $this->compact): ?>
<div class="controls dont-print">
<div class="controls separated 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>
<?= $this->limiter ?>
<?= $this->paginator ?>
<?= $this->sortBox ?>
</div>
<?= $this->filterEditor ?>
</div>
Expand Down
18 changes: 5 additions & 13 deletions modules/monitoring/application/views/scripts/list/downtimes.phtml
Expand Up @@ -3,21 +3,13 @@ use Icinga\Module\Monitoring\Object\Host;
use Icinga\Module\Monitoring\Object\Service;

if (! $this->compact): ?>
<div class="controls dont-print">
<div class="controls separated 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>
<?= $this->limiter ?>
<?= $this->paginator ?>
<?= $this->render('list/components/selectioninfo.phtml') ?>
<?= $this->sortBox ?>
</div>
<?= $this->filterEditor ?>
</div>
Expand Down
Expand Up @@ -11,14 +11,14 @@ if (! $url->hasParam('page') || ($page = (int) $url->getParam('page')) < 1) {
$history->limit($limit * $page);

if (! $this->compact): ?>
<div class="controls">
<div class="controls dont-print separated">
<?= $this->tabs; ?>
<div class="grid dont-print">
<div class="grid">
<div class="col-1-3 text-left">
<?= $this->limiter ?>
</div>
<div class="col-1-3">
<a href="#load-more">
<a class="action-link" href="#load-more">
<?= $this->translate('Scroll to the bottom of this page to load additional events'); ?>
</a>
</div>
Expand Down
16 changes: 5 additions & 11 deletions modules/monitoring/application/views/scripts/list/hostgroups.phtml
Expand Up @@ -2,18 +2,12 @@
use Icinga\Module\Monitoring\Web\Widget\StateBadges;
/** @var \Icinga\Module\Monitoring\DataView\Hostgroup $hostgroups */
if (! $this->compact): ?>
<div class="controls">
<?= $this->tabs ?>
<div class="controls separated 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>
<?= $this->limiter ?>
<?= $this->paginator ?>
<?= $this->sortBox ?>
</div>
<?= $this->filterEditor ?>
</div>
Expand Down
26 changes: 8 additions & 18 deletions modules/monitoring/application/views/scripts/list/hosts.phtml
Expand Up @@ -2,26 +2,16 @@
use Icinga\Module\Monitoring\Object\Host;

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">
<?= $this->render('list/components/hostssummary.phtml') ?>
</div>
<div class="col-1-2 text-right">
<?= $this->render('list/components/selectioninfo.phtml') ?>
</div>
<div class="grid">
<?= $this->render('list/components/hostssummary.phtml') ?>
<?= $this->render('list/components/selectioninfo.phtml') ?>
</div>
<div class="grid dont-print">
<div class="col-1-3 text-left">
<?= $this->limiter ?>
</div>
<div class="col-1-3">
<?= $this->paginator ?>
</div>
<div class="col-1-3 text-right">
<?= $this->sortBox ?>
</div>
<div class="grid">
<?= $this->limiter ?>
<?= $this->paginator ?>
<?= $this->sortBox ?>
</div>
<?= $this->filterEditor ?>
</div>
Expand Down
Expand Up @@ -5,22 +5,14 @@ use Icinga\Module\Monitoring\Object\Service;
$notifications->peekAhead($this->compact);

if (! $this->compact): ?>
<div class="controls">
<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 class="controls separated dont-print">
<?= $tabs ?>
<div class="grid">
<?= $this->limiter ?>
<?= $this->paginator ?>
<?= $this->sortBox ?>
</div>
<?= $this->filterEditor ?>
</div>
<?php endif ?>
<div class="content">
Expand Down
Expand Up @@ -3,7 +3,7 @@ use Icinga\Module\Monitoring\Object\Service;
use Icinga\Web\Url;

if (! $this->compact): ?>
<div class="controls">
<div class="controls separated">
<?= $this->tabs; ?>
<div class="grid dont-print">
<div class="col-1-3 text-left">
Expand Down Expand Up @@ -102,7 +102,7 @@ $hostFilter = '(host_name=' . implode('|host_name=', array_keys($pivotData)) . '
<?php if (! $this->compact && $this->horizontalPaginator->getPages()->pageCount > 1): ?>
<td>
<?php $expandLink = $this->qlink(
$this->translate('more …'),
$this->translate('Load more'),
Url::fromRequest(),
array(
'limit' => (
Expand All @@ -123,7 +123,7 @@ $hostFilter = '(host_name=' . implode('|host_name=', array_keys($pivotData)) . '
<tr>
<td colspan="<?= count($pivotHeader['cols']) + 1?>" class="service-grid-table-more">
<?php echo $this->qlink(
$this->translate('more …'),
$this->translate('Load more'),
Url::fromRequest(),
array(
'limit' => $this->horizontalPaginator->getItemCountPerPage() . ',' .
Expand Down
@@ -1,18 +1,12 @@
<?php use Icinga\Module\Monitoring\Web\Widget\StateBadges;

if (! $this->compact): ?>
<div class="controls">
<?= $this->tabs ?>
<div class="controls separated 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>
<?= $this->limiter ?>
<?= $this->paginator ?>
<?= $this->sortBox ?>
</div>
<?= $this->filterEditor ?>
</div>
Expand Down
20 changes: 5 additions & 15 deletions modules/monitoring/application/views/scripts/list/services.phtml
Expand Up @@ -6,23 +6,13 @@ if (! $this->compact): ?>
<div class="controls separated dont-print">
<?= $this->tabs ?>
<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>
<?= $this->render('list/components/servicesummary.phtml') ?>
<?= $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>
<?= $this->limiter ?>
<?= $this->paginator ?>
<?= $this->sortBox ?>
</div>
<?= $this->filterEditor ?>
</div>
Expand Down

0 comments on commit aadbbe0

Please sign in to comment.