There is no "highest" severity, just "some" severity

This commit is contained in:
Johannes Meyer 2014-11-20 12:49:10 +01:00
parent 86485cb8ef
commit e23a794844
3 changed files with 20 additions and 20 deletions

View File

@ -505,7 +505,7 @@ class Monitoring_ListController extends Controller
$this->filterQuery($query); $this->filterQuery($query);
$this->view->servicegroups = $query->paginate(); $this->view->servicegroups = $query->paginate();
$this->setupSortControl(array( $this->setupSortControl(array(
'services_highest_severity' => $this->translate('Highest Severity'), 'services_severity' => $this->translate('Severity'),
'servicegroup' => $this->translate('Service Group Name'), 'servicegroup' => $this->translate('Service Group Name'),
'services_total' => $this->translate('Total Services'), 'services_total' => $this->translate('Total Services'),
'services_ok' => $this->translate('Services OK'), 'services_ok' => $this->translate('Services OK'),
@ -552,7 +552,7 @@ class Monitoring_ListController extends Controller
$this->filterQuery($query); $this->filterQuery($query);
$this->view->hostgroups = $query->paginate(); $this->view->hostgroups = $query->paginate();
$this->setupSortControl(array( $this->setupSortControl(array(
'services_highest_severity' => $this->translate('Highest Severity'), 'services_severity' => $this->translate('Severity'),
'hostgroup' => $this->translate('Host Group Name'), 'hostgroup' => $this->translate('Host Group Name'),
'services_total' => $this->translate('Total Services'), 'services_total' => $this->translate('Total Services'),
'services_ok' => $this->translate('Services OK'), 'services_ok' => $this->translate('Services OK'),

View File

@ -35,7 +35,7 @@ class GroupSummaryQuery extends IdoQuery
'services_warning_unhandled' => 'SUM(CASE WHEN object_type = \'service\' AND state = 1 AND acknowledged + in_downtime + host_state = 0 THEN 1 ELSE 0 END)', 'services_warning_unhandled' => 'SUM(CASE WHEN object_type = \'service\' AND state = 1 AND acknowledged + in_downtime + host_state = 0 THEN 1 ELSE 0 END)',
'services_critical_unhandled' => 'SUM(CASE WHEN object_type = \'service\' AND state = 2 AND acknowledged + in_downtime + host_state = 0 THEN 1 ELSE 0 END)', 'services_critical_unhandled' => 'SUM(CASE WHEN object_type = \'service\' AND state = 2 AND acknowledged + in_downtime + host_state = 0 THEN 1 ELSE 0 END)',
'services_unknown_unhandled' => 'SUM(CASE WHEN object_type = \'service\' AND state = 3 AND acknowledged + in_downtime + host_state = 0 THEN 1 ELSE 0 END)', 'services_unknown_unhandled' => 'SUM(CASE WHEN object_type = \'service\' AND state = 3 AND acknowledged + in_downtime + host_state = 0 THEN 1 ELSE 0 END)',
'services_highest_severity' => 'MAX(CASE WHEN object_type = \'service\' THEN severity ELSE 0 END)', 'services_severity' => 'MAX(CASE WHEN object_type = \'service\' THEN severity ELSE 0 END)',
'services_ok_last_state_change' => 'MAX(CASE WHEN object_type = \'service\' AND state = 0 THEN state_change ELSE 0 END)', 'services_ok_last_state_change' => 'MAX(CASE WHEN object_type = \'service\' AND state = 0 THEN state_change ELSE 0 END)',
'services_pending_last_state_change' => 'MAX(CASE WHEN object_type = \'service\' AND state = 99 THEN state_change ELSE 0 END)', 'services_pending_last_state_change' => 'MAX(CASE WHEN object_type = \'service\' AND state = 99 THEN state_change ELSE 0 END)',
'services_warning_last_state_change_handled' => 'MAX(CASE WHEN object_type = \'service\' AND state = 1 AND acknowledged + in_downtime + host_state > 0 THEN state_change ELSE 0 END)', 'services_warning_last_state_change_handled' => 'MAX(CASE WHEN object_type = \'service\' AND state = 1 AND acknowledged + in_downtime + host_state > 0 THEN state_change ELSE 0 END)',

View File

@ -36,7 +36,7 @@ class Groupsummary extends DataView
'services_warning_handled', 'services_warning_handled',
'services_warning_unhandled', 'services_warning_unhandled',
'services_pending', 'services_pending',
'services_highest_severity', 'services_severity',
'services_ok_last_state_change', 'services_ok_last_state_change',
'services_pending_last_state_change', 'services_pending_last_state_change',
'services_warning_last_state_change_handled', 'services_warning_last_state_change_handled',
@ -51,8 +51,8 @@ class Groupsummary extends DataView
public function getSortRules() public function getSortRules()
{ {
return array( return array(
'services_highest_severity' => array( 'services_severity' => array(
'columns' => array('services_highest_severity'), 'columns' => array('services_severity'),
'order' => self::SORT_DESC 'order' => self::SORT_DESC
) )
); );