monitoring: Use descriptive variable names in hostgroupsAction()

This commit is contained in:
Eric Lippmann 2016-03-31 09:38:02 +02:00
parent c7249eab0c
commit 28e639bde1
1 changed files with 13 additions and 7 deletions

View File

@ -470,10 +470,15 @@ class ListController extends Controller
public function hostgroupsAction() public function hostgroupsAction()
{ {
$this->addTitleTab('hostgroups', $this->translate('Host Groups'), $this->translate('List host groups')); $this->addTitleTab(
'hostgroups',
$this->translate('Host Groups'),
$this->translate('List host groups')
);
$this->setAutorefreshInterval(12); $this->setAutorefreshInterval(12);
$query = $this->backend->select()->from('hostgroupsummary', array( $hostGroups = $this->backend->select()->from('hostgroupsummary', array(
'hostgroup_alias', 'hostgroup_alias',
'hostgroup_name', 'hostgroup_name',
'hosts_down_handled', 'hosts_down_handled',
@ -493,18 +498,19 @@ class ListController extends Controller
'services_warning_handled', 'services_warning_handled',
'services_warning_unhandled' 'services_warning_unhandled'
)); ));
$this->applyRestriction('monitoring/filter/objects', $query); $this->applyRestriction('monitoring/filter/objects', $hostGroups);
$this->filterQuery($query); $this->filterQuery($hostGroups);
$this->view->hostgroups = $query;
$this->setupPaginationControl($hostGroups);
$this->setupLimitControl(); $this->setupLimitControl();
$this->setupPaginationControl($this->view->hostgroups);
$this->setupSortControl(array( $this->setupSortControl(array(
'hosts_severity' => $this->translate('Severity'), 'hosts_severity' => $this->translate('Severity'),
'hostgroup_alias' => $this->translate('Host Group Name'), 'hostgroup_alias' => $this->translate('Host Group Name'),
'hosts_total' => $this->translate('Total Hosts'), 'hosts_total' => $this->translate('Total Hosts'),
'services_total' => $this->translate('Total Services') 'services_total' => $this->translate('Total Services')
), $query); ), $hostGroups);
$this->view->hostgroups = $hostGroups;
} }
public function eventhistoryAction() public function eventhistoryAction()