list/servicegroups: Ensure dashboard compliance

refs #7876
This commit is contained in:
Johannes Meyer 2015-04-17 16:14:46 +02:00
parent 2190e553be
commit 7ae7bf38c4
2 changed files with 19 additions and 18 deletions

View File

@ -510,12 +510,14 @@ class Monitoring_ListController extends Controller
if ($url = $this->hasBetterUrl()) { if ($url = $this->hasBetterUrl()) {
return $this->redirectNow($url); return $this->redirectNow($url);
} }
$this->addTitleTab( $this->addTitleTab(
'servicegroups', 'servicegroups',
$this->translate('Service Groups'), $this->translate('Service Groups'),
$this->translate('List service groups') $this->translate('List service groups')
); );
$this->setAutorefreshInterval(12); $this->setAutorefreshInterval(12);
$query = $this->backend->select()->from('groupsummary', array( $query = $this->backend->select()->from('groupsummary', array(
'servicegroup_name', 'servicegroup_name',
'servicegroup_alias', 'servicegroup_alias',
@ -547,6 +549,9 @@ class Monitoring_ListController extends Controller
// service groups. We should separate them. // service groups. We should separate them.
$this->filterQuery($query); $this->filterQuery($query);
$this->view->servicegroups = $query->paginate(); $this->view->servicegroups = $query->paginate();
$this->setupLimitControl();
$this->setupPaginationControl($this->view->servicegroups);
$this->setupSortControl(array( $this->setupSortControl(array(
'services_severity' => $this->translate('Severity'), 'services_severity' => $this->translate('Severity'),
'servicegroup_alias' => $this->translate('Service Group Name'), 'servicegroup_alias' => $this->translate('Service Group Name'),

View File

@ -1,21 +1,17 @@
<?php if ($this->compact): ?> <?php if (! $this->compact): ?>
<div class="content">
<?php else: ?>
<div class="controls"> <div class="controls">
<?= $this->tabs ?> <?= $this->tabs; ?>
<div style="margin: 1em;" class="dontprint"> <?= $this->sortBox; ?>
<?= $this->translate('Sort by'); ?> <?= $this->sortControl->render($this); ?> <?= $this->limiter; ?>
</div> <?= $this->paginator; ?>
<?= $this->widget('limiter')->setMaxLimit(count($servicegroups)); ?>
<?= $this->paginationControl($servicegroups, null, null, array('preserve' => $this->preserve)); ?>
</div>
<div class="content">
<?= $this->filterEditor; ?> <?= $this->filterEditor; ?>
</div>
<?php endif ?> <?php endif ?>
<div class="content">
<?php <?php
if (count($servicegroups) === 0) { if (count($servicegroups) === 0) {
echo $this->translate('No service groups matching the filter'); echo $this->translate('No servicegroups found matching the filter') . '</div>';
echo '</div>';
return; return;
} }
?> ?>