*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

@ -7,24 +7,22 @@ class CommentdeletionhistoryQuery extends IdoQuery
{
protected $columnMap = array(
'commenthistory' => array(
'state_time' => 'h.deletion_time',
'timestamp' => 'UNIX_TIMESTAMP(h.deletion_time)',
'raw_timestamp' => 'h.deletion_time',
'object_id' => 'h.object_id',
'type' => "(CASE h.entry_type WHEN 1 THEN 'comment_deleted' WHEN 2 THEN 'dt_comment_deleted' WHEN 3 THEN 'flapping_deleted' WHEN 4 THEN 'ack_deleted' END)",
'state' => '(NULL)',
'state_type' => '(NULL)',
'output' => "('[' || h.author_name || '] ' || h.comment_data)",
'attempt' => '(NULL)',
'max_attempts' => '(NULL)',
'state_time' => 'h.deletion_time',
'timestamp' => 'UNIX_TIMESTAMP(h.deletion_time)',
'raw_timestamp' => 'h.deletion_time',
'object_id' => 'h.object_id',
'type' => "(CASE h.entry_type WHEN 1 THEN 'comment_deleted' WHEN 2 THEN 'dt_comment_deleted' WHEN 3 THEN 'flapping_deleted' WHEN 4 THEN 'ack_deleted' END)",
'state' => '(NULL)',
'state_type' => '(NULL)',
'output' => "('[' || h.author_name || '] ' || h.comment_data)",
'attempt' => '(NULL)',
'max_attempts' => '(NULL)',
'host' => 'o.name1 COLLATE latin1_general_ci',
'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"
'host' => 'o.name1 COLLATE latin1_general_ci',
'service' => 'o.name2 COLLATE latin1_general_ci',
'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,24 +7,22 @@ class CommenthistoryQuery extends IdoQuery
{
protected $columnMap = array(
'commenthistory' => array(
'state_time' => 'h.comment_time',
'timestamp' => 'UNIX_TIMESTAMP(h.comment_time)',
'raw_timestamp' => 'h.comment_time',
'object_id' => 'h.object_id',
'type' => "(CASE h.entry_type WHEN 1 THEN 'comment' WHEN 2 THEN 'dt_comment' WHEN 3 THEN 'flapping' WHEN 4 THEN 'ack' END)",
'state' => '(NULL)',
'state_type' => '(NULL)',
'output' => "('[' || h.author_name || '] ' || h.comment_data)",
'attempt' => '(NULL)',
'max_attempts' => '(NULL)',
'state_time' => 'h.comment_time',
'timestamp' => 'UNIX_TIMESTAMP(h.comment_time)',
'raw_timestamp' => 'h.comment_time',
'object_id' => 'h.object_id',
'type' => "(CASE h.entry_type WHEN 1 THEN 'comment' WHEN 2 THEN 'dt_comment' WHEN 3 THEN 'flapping' WHEN 4 THEN 'ack' END)",
'state' => '(NULL)',
'state_type' => '(NULL)',
'output' => "('[' || h.author_name || '] ' || h.comment_data)",
'attempt' => '(NULL)',
'max_attempts' => '(NULL)',
'host' => 'o.name1 COLLATE latin1_general_ci',
'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"
'host' => 'o.name1 COLLATE latin1_general_ci',
'service' => 'o.name2 COLLATE latin1_general_ci',
'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,24 +7,22 @@ class DowntimeendhistoryQuery extends IdoQuery
{
protected $columnMap = array(
'downtimehistory' => array(
'state_time' => 'h.actual_end_time',
'timestamp' => 'UNIX_TIMESTAMP(h.actual_end_time)',
'raw_timestamp' => 'h.actual_end_time',
'object_id' => 'h.object_id',
'type' => "('dt_end')",
'state' => '(NULL)',
'state_type' => '(NULL)',
'output' => "('[' || h.author_name || '] ' || h.comment_data)",
'attempt' => '(NULL)',
'max_attempts' => '(NULL)',
'state_time' => 'h.actual_end_time',
'timestamp' => 'UNIX_TIMESTAMP(h.actual_end_time)',
'raw_timestamp' => 'h.actual_end_time',
'object_id' => 'h.object_id',
'type' => "('dt_end')",
'state' => '(NULL)',
'state_type' => '(NULL)',
'output' => "('[' || h.author_name || '] ' || h.comment_data)",
'attempt' => '(NULL)',
'max_attempts' => '(NULL)',
'host' => 'o.name1 COLLATE latin1_general_ci',
'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"
'host' => 'o.name1 COLLATE latin1_general_ci',
'service' => 'o.name2 COLLATE latin1_general_ci',
'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,24 +7,22 @@ class DowntimestarthistoryQuery extends IdoQuery
{
protected $columnMap = array(
'downtimehistory' => array(
'state_time' => 'h.actual_start_time',
'timestamp' => 'UNIX_TIMESTAMP(h.actual_start_time)',
'raw_timestamp' => 'h.actual_start_time',
'object_id' => 'h.object_id',
'type' => "('dt_start')",
'state' => '(NULL)',
'state_type' => '(NULL)',
'output' => "('[' || h.author_name || '] ' || h.comment_data)",
'attempt' => '(NULL)',
'max_attempts' => '(NULL)',
'state_time' => 'h.actual_start_time',
'timestamp' => 'UNIX_TIMESTAMP(h.actual_start_time)',
'raw_timestamp' => 'h.actual_start_time',
'object_id' => 'h.object_id',
'type' => "('dt_start')",
'state' => '(NULL)',
'state_type' => '(NULL)',
'output' => "('[' || h.author_name || '] ' || h.comment_data)",
'attempt' => '(NULL)',
'max_attempts' => '(NULL)',
'host' => 'o.name1 COLLATE latin1_general_ci',
'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"
'host' => 'o.name1 COLLATE latin1_general_ci',
'service' => 'o.name2 COLLATE latin1_general_ci',
'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,24 +7,22 @@ class NotificationhistoryQuery extends IdoQuery
{
protected $columnMap = array(
'history' => array(
'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',
'state_type' => '(NULL)',
'output' => null,
'attempt' => '(NULL)',
'max_attempts' => '(NULL)',
'state_time' => 'n.start_time',
'timestamp' => 'UNIX_TIMESTAMP(n.start_time)',
'raw_timestamp' => 'n.start_time',
'object_id' => 'n.object_id',
'type' => "('notify')",
'state' => 'n.state',
'state_type' => '(NULL)',
'output' => null,
'attempt' => '(NULL)',
'max_attempts' => '(NULL)',
'host' => 'o.name1 COLLATE latin1_general_ci',
'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"
'host' => 'o.name1 COLLATE latin1_general_ci',
'service' => 'o.name2 COLLATE latin1_general_ci',
'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"
)
);