monitoring: Remove HostdowntimestarthistoryQuery::getGroup()
refs #9956
This commit is contained in:
parent
df69755056
commit
956c86dcdb
|
@ -13,6 +13,16 @@ class HostdowntimestarthistoryQuery extends IdoQuery
|
||||||
*/
|
*/
|
||||||
protected $allowCustomVars = true;
|
protected $allowCustomVars = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
protected $groupBase = array('downtimehistory' => array('hdh.downtimehistory_id', 'ho.object_id'));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
protected $groupOrigin = array('hostgroups', 'services');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
@ -23,14 +33,12 @@ class HostdowntimestarthistoryQuery extends IdoQuery
|
||||||
'downtimehistory' => array(
|
'downtimehistory' => array(
|
||||||
'host' => 'ho.name1 COLLATE latin1_general_ci',
|
'host' => 'ho.name1 COLLATE latin1_general_ci',
|
||||||
'host_name' => 'ho.name1',
|
'host_name' => 'ho.name1',
|
||||||
'object_type' => '(\'host\')'
|
'object_id' => 'hdh.object_id',
|
||||||
),
|
'object_type' => '(\'host\')',
|
||||||
'history' => array(
|
'output' => "('[' || hdh.author_name || '] ' || hdh.comment_data)",
|
||||||
'type' => "('dt_start')",
|
'state' => '(-1)',
|
||||||
'timestamp' => 'UNIX_TIMESTAMP(hdh.actual_start_time)',
|
'timestamp' => 'UNIX_TIMESTAMP(hdh.actual_start_time)',
|
||||||
'object_id' => 'hdh.object_id',
|
'type' => "('dt_start')"
|
||||||
'state' => '(-1)',
|
|
||||||
'output' => "('[' || hdh.author_name || '] ' || hdh.comment_data)",
|
|
||||||
),
|
),
|
||||||
'hostgroups' => array(
|
'hostgroups' => array(
|
||||||
'hostgroup' => 'hgo.name1 COLLATE latin1_general_ci',
|
'hostgroup' => 'hgo.name1 COLLATE latin1_general_ci',
|
||||||
|
@ -172,20 +180,4 @@ class HostdowntimestarthistoryQuery extends IdoQuery
|
||||||
array()
|
array()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
public function getGroup()
|
|
||||||
{
|
|
||||||
$group = array();
|
|
||||||
if ($this->hasJoinedVirtualTable('hostgroups') || $this->hasJoinedVirtualTable('services')) {
|
|
||||||
$group = array('hdh.downtimehistory_id', 'ho.object_id');
|
|
||||||
if ($this->hasJoinedVirtualTable('hosts')) {
|
|
||||||
$group[] = 'h.host_id';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $group;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue