*historyQuery: Drop redundant query columns

refs #8613
This commit is contained in:
Johannes Meyer 2015-04-09 15:13:59 +02:00
parent 9e79419eb1
commit 51bf5cfbc8
6 changed files with 79 additions and 89 deletions

View File

@ -22,8 +22,6 @@ class CommentdeletionhistoryQuery extends IdoQuery
'service' => 'o.name2 COLLATE latin1_general_ci',
'host_name' => 'o.name1 COLLATE latin1_general_ci',
'service_description' => 'o.name2 COLLATE latin1_general_ci',
'service_host_name' => 'o.name1 COLLATE latin1_general_ci',
'service_description' => 'o.name2 COLLATE latin1_general_ci',
'object_type' => "CASE WHEN o.objecttype_id = 1 THEN 'host' ELSE 'service' END"
)
);

View File

@ -22,8 +22,6 @@ class CommenthistoryQuery extends IdoQuery
'service' => 'o.name2 COLLATE latin1_general_ci',
'host_name' => 'o.name1 COLLATE latin1_general_ci',
'service_description' => 'o.name2 COLLATE latin1_general_ci',
'service_host_name' => 'o.name1 COLLATE latin1_general_ci',
'service_description' => 'o.name2 COLLATE latin1_general_ci',
'object_type' => "CASE WHEN o.objecttype_id = 1 THEN 'host' ELSE 'service' END"
)
);

View File

@ -22,8 +22,6 @@ class DowntimeendhistoryQuery extends IdoQuery
'service' => 'o.name2 COLLATE latin1_general_ci',
'host_name' => 'o.name1 COLLATE latin1_general_ci',
'service_description' => 'o.name2 COLLATE latin1_general_ci',
'service_host_name' => 'o.name1 COLLATE latin1_general_ci',
'service_description' => 'o.name2 COLLATE latin1_general_ci',
'object_type' => "CASE WHEN o.objecttype_id = 1 THEN 'host' ELSE 'service' END"
)
);

View File

@ -22,8 +22,6 @@ class DowntimestarthistoryQuery extends IdoQuery
'service' => 'o.name2 COLLATE latin1_general_ci',
'host_name' => 'o.name1 COLLATE latin1_general_ci',
'service_description' => 'o.name2 COLLATE latin1_general_ci',
'service_host_name' => 'o.name1 COLLATE latin1_general_ci',
'service_description' => 'o.name2 COLLATE latin1_general_ci',
'object_type' => "CASE WHEN o.objecttype_id = 1 THEN 'host' ELSE 'service' END"
)
);

View File

@ -7,9 +7,9 @@ class NotificationhistoryQuery extends IdoQuery
{
protected $columnMap = array(
'history' => array(
'state_time' => 'n.start_time',
'timestamp' => 'UNIX_TIMESTAMP(n.start_time)',
'raw_timestamp' => 'n.start_time',
'state_time' => 'n.start_time',
'object_id' => 'n.object_id',
'type' => "('notify')",
'state' => 'n.state',
@ -22,8 +22,6 @@ class NotificationhistoryQuery extends IdoQuery
'service' => 'o.name2 COLLATE latin1_general_ci',
'host_name' => 'o.name1 COLLATE latin1_general_ci',
'service_description' => 'o.name2 COLLATE latin1_general_ci',
'service_host_name' => 'o.name1 COLLATE latin1_general_ci',
'service_description' => 'o.name2 COLLATE latin1_general_ci',
'object_type' => "CASE WHEN o.objecttype_id = 1 THEN 'host' ELSE 'service' END"
)
);

View File

@ -12,9 +12,9 @@ class StatehistoryQuery extends IdoQuery
protected $columnMap = array(
'statehistory' => array(
'raw_timestamp' => 'sh.state_time',
'timestamp' => 'UNIX_TIMESTAMP(sh.state_time)',
'state_time' => 'sh.state_time',
'timestamp' => 'UNIX_TIMESTAMP(sh.state_time)',
'raw_timestamp' => 'sh.state_time',
'object_id' => 'sho.object_id',
'type' => "(CASE WHEN sh.state_type = 1 THEN 'hard_state' ELSE 'soft_state' END)",
'state' => 'sh.state',
@ -22,11 +22,11 @@ class StatehistoryQuery extends IdoQuery
'output' => 'sh.output',
'attempt' => 'sh.current_check_attempt',
'max_attempts' => 'sh.max_check_attempts',
'host' => 'sho.name1 COLLATE latin1_general_ci',
'host_name' => 'sho.name1 COLLATE latin1_general_ci',
'service' => 'sho.name2 COLLATE latin1_general_ci',
'host_name' => 'sho.name1 COLLATE latin1_general_ci',
'service_description' => 'sho.name2 COLLATE latin1_general_ci',
'service_host_name' => 'sho.name1 COLLATE latin1_general_ci',
'object_type' => "CASE WHEN sho.objecttype_id = 1 THEN 'host' ELSE 'service' END"
)
);