mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-21 12:54:26 +02:00
parent
9f7b9edffe
commit
f7f02bdc8f
@ -23,6 +23,11 @@ class ServicedowntimeQuery extends IdoQuery
|
|||||||
*/
|
*/
|
||||||
protected $groupOrigin = array('hostgroups', 'servicegroups');
|
protected $groupOrigin = array('hostgroups', 'servicegroups');
|
||||||
|
|
||||||
|
protected $subQueryTargets = array(
|
||||||
|
'hostgroups' => 'hostgroup',
|
||||||
|
'servicegroups' => 'servicegroup'
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
@ -199,4 +204,19 @@ class ServicedowntimeQuery extends IdoQuery
|
|||||||
array()
|
array()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function joinSubQuery(IdoQuery $query, $name)
|
||||||
|
{
|
||||||
|
if ($name === 'hostgroup') {
|
||||||
|
$query->joinVirtualTable('services');
|
||||||
|
|
||||||
|
return ['so.object_id', 'so.object_id'];
|
||||||
|
} elseif ($name === 'servicegroup') {
|
||||||
|
$query->joinVirtualTable('members');
|
||||||
|
|
||||||
|
return ['sgm.service_object_id', 'so.object_id'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return parent::joinSubQuery($query, $name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user