mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 06:44:33 +02:00
parent
11ed6d6cfa
commit
dc66c24a1d
@ -107,7 +107,6 @@ class HostdowntimestarthistoryQuery extends IdoQuery
|
|||||||
'hgo.object_id = hg.hostgroup_object_id AND hgo.is_active = 1 AND hgo.objecttype_id = 3',
|
'hgo.object_id = hg.hostgroup_object_id AND hgo.is_active = 1 AND hgo.objecttype_id = 3',
|
||||||
array()
|
array()
|
||||||
);
|
);
|
||||||
$this->select->group(array('hdh.downtimehistory_id', 'ho.name1'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -157,6 +156,21 @@ class HostdowntimestarthistoryQuery extends IdoQuery
|
|||||||
'so.object_id = s.service_object_id AND so.is_active = 1 AND so.objecttype_id = 2',
|
'so.object_id = s.service_object_id AND so.is_active = 1 AND so.objecttype_id = 2',
|
||||||
array()
|
array()
|
||||||
);
|
);
|
||||||
$this->select->group(array('hdh.downtimehistory_id', 'ho.name1'));
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@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…
x
Reference in New Issue
Block a user