Searching for 'unhandled' is more interesting than 'handled', other small fixes

This commit is contained in:
Thomas Gelf 2013-08-21 00:05:17 +02:00 committed by Eric Lippmann
parent 344a99bbb8
commit 4b62297b3e
1 changed files with 4 additions and 3 deletions

View File

@ -185,6 +185,7 @@ class StatusQuery extends AbstractQuery
'status' => array(
'service_problems' => 'CASE WHEN ss.current_state = 0 THEN 0 ELSE 1 END',
'service_handled' => 'CASE WHEN ss.problem_has_been_acknowledged = 1 OR ss.scheduled_downtime_depth > 0 THEN 1 ELSE 0 END',
'service_unhandled' => 'CASE WHEN ss.problem_has_been_acknowledged = 0 AND ss.scheduled_downtime_depth = 0 THEN 1 ELSE 0 END',
'service_severity' => 'CASE WHEN ss.current_state = 0
THEN
CASE WHEN ss.has_been_checked = 0 OR ss.has_been_checked IS NULL