mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 15:54:03 +02:00
parent
690fc89d62
commit
f4e4dbe069
@ -13,6 +13,16 @@ class ServicedowntimeQuery extends IdoQuery
|
|||||||
*/
|
*/
|
||||||
protected $allowCustomVars = true;
|
protected $allowCustomVars = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
protected $groupBase = array('downtimes', array('sd.scheduleddowntime_id', 'so.object_id'));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
protected $groupOrigin = array('hostgroups', 'servicegroups');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
@ -185,37 +195,4 @@ class ServicedowntimeQuery extends IdoQuery
|
|||||||
array()
|
array()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
public function getGroup()
|
|
||||||
{
|
|
||||||
$group = array();
|
|
||||||
if ($this->hasJoinedVirtualTable('hostgroups') || $this->hasJoinedVirtualTable('servicegroups')) {
|
|
||||||
$group = array('sd.scheduleddowntime_id', 'so.object_id');
|
|
||||||
|
|
||||||
if ($this->hasJoinedVirtualTable('hosts')) {
|
|
||||||
$group[] = 'h.host_id';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->hasJoinedVirtualTable('hoststatus')) {
|
|
||||||
$group[] = 'hs.hoststatus_id';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->hasJoinedVirtualTable('services')) {
|
|
||||||
$group[] = 's.service_id';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->hasJoinedVirtualTable('servicestatus')) {
|
|
||||||
$group[] = 'ss.servicestatus_id';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->hasJoinedVirtualTable('instances')) {
|
|
||||||
$group[] = 'i.instance_id';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $group;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user