Remove hardcoded filter in state history summary query

This commit is contained in:
Alexander Klimov 2014-03-07 15:02:01 +01:00
parent 25979f44e3
commit 45520fe2d6
2 changed files with 5 additions and 4 deletions

View File

@ -19,7 +19,10 @@ foreach ($summary as $entry) {
'monitoring/list/eventhistory', 'monitoring/list/eventhistory',
array( array(
'timestamp<' => strtotime($day . ' 23:59:59'), 'timestamp<' => strtotime($day . ' 23:59:59'),
'timestamp>' => strtotime($day . ' 00:00:00') 'timestamp>' => strtotime($day . ' 00:00:00'),
'object_type' => 'service',
'state' => '2',
'type' => 'hard_state,soft_state'
) )
) )
); );

View File

@ -34,8 +34,6 @@ class StateHistorySummaryQuery extends IdoQuery
'sh.object_id = sho.object_id AND sho.is_active = 1', 'sh.object_id = sho.object_id AND sho.is_active = 1',
array() array()
)->where('sh.state_time >= ?', '2013-11-20 00:00:00') )->where('sh.state_time >= ?', '2013-11-20 00:00:00')
->where('sh.state_type = 1')
->where('sh.state = 2')
->group('DATE(sh.state_time)'); ->group('DATE(sh.state_time)');
$this->joinedVirtualTables = array('statehistory' => true); $this->joinedVirtualTables = array('statehistory' => true);
} }