Add sort control to the hostgroup- and servicegroupsummary view

This commit is contained in:
Johannes Meyer 2014-11-20 10:07:46 +01:00
parent 2fdc1f4322
commit 4e87d21726
3 changed files with 22 additions and 2 deletions

View File

@ -505,7 +505,14 @@ class Monitoring_ListController extends Controller
$this->filterQuery($query);
$this->view->servicegroups = $query->paginate();
$this->setupSortControl(array(
'servicegroup_name' => $this->translate('Servicegroup Name')
'services_highest_severity' => $this->translate('Highest Severity'),
'servicegroup' => $this->translate('Service Group Name'),
'services_total' => $this->translate('Total Services'),
'services_ok' => $this->translate('Services OK'),
'services_unknown' => $this->translate('Services UNKNOWN'),
'services_critical' => $this->translate('Services CRITICAL'),
'services_warning' => $this->translate('Services WARNING'),
'services_pending' => $this->translate('Services PENDING')
));
}
@ -545,7 +552,14 @@ class Monitoring_ListController extends Controller
$this->filterQuery($query);
$this->view->hostgroups = $query->paginate();
$this->setupSortControl(array(
'hostgroup_name' => $this->translate('Hostgroup Name')
'services_highest_severity' => $this->translate('Highest Severity'),
'hostgroup' => $this->translate('Host Group Name'),
'services_total' => $this->translate('Total Services'),
'services_ok' => $this->translate('Services OK'),
'services_unknown' => $this->translate('Services UNKNOWN'),
'services_critical' => $this->translate('Services CRITICAL'),
'services_warning' => $this->translate('Services WARNING'),
'services_pending' => $this->translate('Services PENDING')
));
}

View File

@ -3,6 +3,9 @@
<?php else: ?>
<div class="controls">
<?= $this->tabs ?>
<div style="margin: 1em;" class="dontprint">
<?= $this->translate('Sort by'); ?> <?= $this->sortControl->render($this); ?>
</div>
<?= $this->widget('limiter')->setMaxLimit(count($hostgroups)); ?>
<?= $this->paginationControl($hostgroups, null, null, array('preserve' => $this->preserve)); ?>
</div>

View File

@ -3,6 +3,9 @@
<?php else: ?>
<div class="controls">
<?= $this->tabs ?>
<div style="margin: 1em;" class="dontprint">
<?= $this->translate('Sort by'); ?> <?= $this->sortControl->render($this); ?>
</div>
<?= $this->widget('limiter')->setMaxLimit(count($servicegroups)); ?>
<?= $this->paginationControl($servicegroups, null, null, array('preserve' => $this->preserve)); ?>
</div>