Add sort control to hostgroup summary and fix sort rules for the generic group summary

refs #4185
This commit is contained in:
Eric Lippmann 2013-10-15 15:33:53 +02:00
parent 103a4dbe91
commit a730713c0a
3 changed files with 9 additions and 4 deletions

View File

@ -1,4 +1,5 @@
<div data-icinga-component="app/mainDetailGrid">
<?= $this->sortControl->render($this); ?>
<?= $this->paginationControl($hostgroups, null, null, array('preserve' => $this->preserve)); ?>
<table class="table table-condensed">
<tbody>

View File

@ -35,10 +35,14 @@ class Groupsummary extends DataView
public function getSortRules()
{
if (in_array('servicegroup_name', $this->getQuery()->getColumns())) {
return array(
'servicegroup_name' => array(
'order' => self::SORT_ASC
),
)
);
}
return array(
'hostgroup_name' => array(
'order' => self::SORT_ASC
)