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,14 +505,14 @@ class Monitoring_ListController extends Controller
$this->filterQuery($query);
$this->view->servicegroups = $query->paginate();
$this->setupSortControl(array(
'services_highest_severity' => $this->translate('Highest Severity'),
'servicegroup' => $this->translate('Service Group Name'),
'services_total' => $this->translate('Total Services'),
'services_ok' => $this->translate('Services OK'),
'services_unknown' => $this->translate('Services UNKNOWN'),
'services_critical' => $this->translate('Services CRITICAL'),
'services_warning' => $this->translate('Services WARNING'),
'services_pending' => $this->translate('Services PENDING')
'services_severity' => $this->translate('Severity'),
'servicegroup' => $this->translate('Service Group Name'),
'services_total' => $this->translate('Total Services'),
'services_ok' => $this->translate('Services OK'),
'services_unknown' => $this->translate('Services UNKNOWN'),
'services_critical' => $this->translate('Services CRITICAL'),
'services_warning' => $this->translate('Services WARNING'),
'services_pending' => $this->translate('Services PENDING')
));
}
@ -552,14 +552,14 @@ class Monitoring_ListController extends Controller
$this->filterQuery($query);
$this->view->hostgroups = $query->paginate();
$this->setupSortControl(array(
'services_highest_severity' => $this->translate('Highest Severity'),
'hostgroup' => $this->translate('Host Group Name'),
'services_total' => $this->translate('Total Services'),
'services_ok' => $this->translate('Services OK'),
'services_unknown' => $this->translate('Services UNKNOWN'),
'services_critical' => $this->translate('Services CRITICAL'),
'services_warning' => $this->translate('Services WARNING'),
'services_pending' => $this->translate('Services PENDING')
'services_severity' => $this->translate('Severity'),
'hostgroup' => $this->translate('Host Group Name'),
'services_total' => $this->translate('Total Services'),
'services_ok' => $this->translate('Services OK'),
'services_unknown' => $this->translate('Services UNKNOWN'),
'services_critical' => $this->translate('Services CRITICAL'),
'services_warning' => $this->translate('Services WARNING'),
'services_pending' => $this->translate('Services PENDING')
));
}

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_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_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_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)',

View File

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