list/eventhistory: Ensure dashboard compliance

refs #7876
This commit is contained in:
Johannes Meyer 2015-04-17 16:15:58 +02:00
parent faa29e3dee
commit 7be00791a7
2 changed files with 16 additions and 22 deletions

View File

@ -624,6 +624,7 @@ class Monitoring_ListController extends Controller
if ($url = $this->hasBetterUrl()) {
return $this->redirectNow($url);
}
$this->addTitleTab(
'eventhistory',
$this->translate('Event Overview'),
@ -645,11 +646,13 @@ class Monitoring_ListController extends Controller
));
$this->filterQuery($query);
$this->view->history = $query->paginate();
$this->setupLimitControl();
$this->setupPaginationControl($this->view->history);
$this->setupSortControl(array(
'timestamp' => $this->translate('Occurence')
));
$this->view->history = $query->paginate();
}
public function servicegridAction()

View File

@ -1,32 +1,23 @@
<?php
use Icinga\Module\Monitoring\Object\Host;
use Icinga\Module\Monitoring\Object\Service;
?>
<?php if (false === $this->compact): ?>
if (! $this->compact): ?>
<div class="controls">
<?= $this->tabs ?>
<div style="margin: 1em" class="dontprint">
<div style="float: right">
<?= $this->translate('Sort by') ?> <?= $this->sortControl ?>
</div>
</div>
<?= $this->widget('limiter', array('url' => $this->url, 'max' => $this->history->count())); ?>
<?= $this->paginationControl($history, null, null, array('preserve' => $this->preserve)); ?>
<?= $this->tabs; ?>
<?= $this->sortBox; ?>
<?= $this->limiter; ?>
<?= $this->paginator; ?>
<?= $this->filterEditor; ?>
</div>
<?php endif ?>
<div class="content">
<?= $this->filterEditor ?>
<?php if (count($history) === 0): ?>
<?= $this->translate('No history events matching the filter') ?>
</div>
<?php return; endif ?>
<?php
if (count($history) === 0) {
echo $this->translate('No history events found matching the filter') . '</div>';
return;
}
?>
<table data-base-target="_next" class="action">
<tbody>
<?php foreach ($history as $event): ?>