Hostgroups: Add sort control

This commit is contained in:
Eric Lippmann 2019-12-11 13:54:11 +01:00
parent c795db5313
commit fc3aaf6734

View file

@ -18,6 +18,15 @@ class HostgroupsController extends Controller
$limitControl = $this->createLimitControl();
$paginationControl = $this->createPaginationControl($hostgroups);
$sortControl = $this->createSortControl(
$hostgroups,
[
'display_name' => $this->translate('Name'),
'hosts_severity desc' => $this->translate('Severity'),
'hosts_total desc' => $this->translate('Total Hosts'),
'services_total desc' => $this->translate('Total Services')
]
);
$filterControl = $this->createFilterControl($hostgroups);
$this->filter($hostgroups);
@ -25,6 +34,7 @@ class HostgroupsController extends Controller
yield $this->export($hostgroups);
$this->addControl($paginationControl);
$this->addControl($sortControl);
$this->addControl($limitControl);
$this->addControl($filterControl);