monitoring: Use descriptive variable names in servicegroupsAction()

This commit is contained in:
Eric Lippmann 2016-03-31 09:59:18 +02:00
parent b3d382a3d4
commit 913c024e46

View File

@ -445,6 +445,9 @@ class ListController extends Controller
} }
} }
/**
* List service groups
*/
public function servicegroupsAction() public function servicegroupsAction()
{ {
$this->addTitleTab( $this->addTitleTab(
@ -452,9 +455,10 @@ class ListController extends Controller
$this->translate('Service Groups'), $this->translate('Service Groups'),
$this->translate('List service groups') $this->translate('List service groups')
); );
$this->setAutorefreshInterval(12); $this->setAutorefreshInterval(12);
$query = $this->backend->select()->from('servicegroupsummary', array( $serviceGroups = $this->backend->select()->from('servicegroupsummary', array(
'servicegroup_alias', 'servicegroup_alias',
'servicegroup_name', 'servicegroup_name',
'services_critical_handled', 'services_critical_handled',
@ -467,17 +471,18 @@ 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', $serviceGroups);
$this->filterQuery($query); $this->filterQuery($serviceGroups);
$this->view->servicegroups = $query;
$this->setupPaginationControl($serviceGroups);
$this->setupLimitControl(); $this->setupLimitControl();
$this->setupPaginationControl($this->view->servicegroups);
$this->setupSortControl(array( $this->setupSortControl(array(
'services_severity' => $this->translate('Severity'), 'services_severity' => $this->translate('Severity'),
'servicegroup_alias' => $this->translate('Service Group Name'), 'servicegroup_alias' => $this->translate('Service Group Name'),
'services_total' => $this->translate('Total Services') 'services_total' => $this->translate('Total Services')
), $query); ), $serviceGroups);
$this->view->serviceGroups = $serviceGroups;
} }
/** /**