monitoring: Remove ServicedowntimestarthistoryQuery::getGroup()
refs #9956
This commit is contained in:
parent
bd4216907e
commit
aa76925f69
|
@ -13,6 +13,16 @@ class ServicedowntimestarthistoryQuery extends IdoQuery
|
||||||
*/
|
*/
|
||||||
protected $allowCustomVars = true;
|
protected $allowCustomVars = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
protected $groupBase = array('downtimehistory', array('sdh.downtimehistory_id', 'so.object_id'));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
protected $groupOrigin = array('hostgroups', 'servicegroups');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
@ -23,18 +33,16 @@ class ServicedowntimestarthistoryQuery extends IdoQuery
|
||||||
'downtimehistory' => array(
|
'downtimehistory' => array(
|
||||||
'host' => 'so.name1 COLLATE latin1_general_ci',
|
'host' => 'so.name1 COLLATE latin1_general_ci',
|
||||||
'host_name' => 'so.name1',
|
'host_name' => 'so.name1',
|
||||||
|
'object_id' => 'sdh.object_id',
|
||||||
'object_type' => '(\'service\')',
|
'object_type' => '(\'service\')',
|
||||||
|
'output' => "('[' || sdh.author_name || '] ' || sdh.comment_data)",
|
||||||
'service' => 'so.name2 COLLATE latin1_general_ci',
|
'service' => 'so.name2 COLLATE latin1_general_ci',
|
||||||
'service_description' => 'so.name2',
|
'service_description' => 'so.name2',
|
||||||
'service_host' => 'so.name1 COLLATE latin1_general_ci',
|
'service_host' => 'so.name1 COLLATE latin1_general_ci',
|
||||||
'service_host_name' => 'so.name1'
|
'service_host_name' => 'so.name1',
|
||||||
),
|
'state' => '(-1)',
|
||||||
'history' => array(
|
'timestamp' => 'UNIX_TIMESTAMP(sdh.actual_start_time)',
|
||||||
'type' => "('dt_start')",
|
'type' => "('dt_start')"
|
||||||
'timestamp' => 'UNIX_TIMESTAMP(sdh.actual_start_time)',
|
|
||||||
'object_id' => 'sdh.object_id',
|
|
||||||
'state' => '(-1)',
|
|
||||||
'output' => "('[' || sdh.author_name || '] ' || sdh.comment_data)",
|
|
||||||
),
|
),
|
||||||
'hostgroups' => array(
|
'hostgroups' => array(
|
||||||
'hostgroup' => 'hgo.name1 COLLATE latin1_general_ci',
|
'hostgroup' => 'hgo.name1 COLLATE latin1_general_ci',
|
||||||
|
@ -90,7 +98,6 @@ class ServicedowntimestarthistoryQuery extends IdoQuery
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->joinedVirtualTables['downtimehistory'] = true;
|
$this->joinedVirtualTables['downtimehistory'] = true;
|
||||||
$this->joinedVirtualTables['history'] = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -170,21 +177,4 @@ class ServicedowntimestarthistoryQuery extends IdoQuery
|
||||||
array()
|
array()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
public function getGroup()
|
|
||||||
{
|
|
||||||
$group = array();
|
|
||||||
if ($this->hasJoinedVirtualTable('hostgroups') || $this->hasJoinedVirtualTable('servicegroups')) {
|
|
||||||
$group = array('sdh.downtimehistory_id', 'so.object_id');
|
|
||||||
if ($this->hasJoinedVirtualTable('services')) {
|
|
||||||
$group[] = 'h.host_id';
|
|
||||||
$group[] = 's.service_id';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $group;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue