mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-28 16:24:04 +02:00
Add sort control to hostgroup summary and fix sort rules for the generic group summary
refs #4185
This commit is contained in:
parent
103a4dbe91
commit
a730713c0a
@ -1,4 +1,5 @@
|
|||||||
<div data-icinga-component="app/mainDetailGrid">
|
<div data-icinga-component="app/mainDetailGrid">
|
||||||
|
<?= $this->sortControl->render($this); ?>
|
||||||
<?= $this->paginationControl($hostgroups, null, null, array('preserve' => $this->preserve)); ?>
|
<?= $this->paginationControl($hostgroups, null, null, array('preserve' => $this->preserve)); ?>
|
||||||
<table class="table table-condensed">
|
<table class="table table-condensed">
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -77,7 +77,7 @@ class GroupsummaryQuery extends AbstractQuery
|
|||||||
|
|
||||||
protected function joinHostgroups()
|
protected function joinHostgroups()
|
||||||
{
|
{
|
||||||
if (in_array('servicegroup_name', $this->getColumns())){
|
if (in_array('servicegroup_name', $this->getColumns())) {
|
||||||
return $this->joinServiceHostgroups();
|
return $this->joinServiceHostgroups();
|
||||||
} else {
|
} else {
|
||||||
return $this->joinHostHostgroups();
|
return $this->joinHostHostgroups();
|
||||||
|
@ -35,10 +35,14 @@ class Groupsummary extends DataView
|
|||||||
|
|
||||||
public function getSortRules()
|
public function getSortRules()
|
||||||
{
|
{
|
||||||
|
if (in_array('servicegroup_name', $this->getQuery()->getColumns())) {
|
||||||
return array(
|
return array(
|
||||||
'servicegroup_name' => array(
|
'servicegroup_name' => array(
|
||||||
'order' => self::SORT_ASC
|
'order' => self::SORT_ASC
|
||||||
),
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return array(
|
||||||
'hostgroup_name' => array(
|
'hostgroup_name' => array(
|
||||||
'order' => self::SORT_ASC
|
'order' => self::SORT_ASC
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user