parent
5c19c05a8a
commit
b56114c824
|
@ -116,7 +116,6 @@ class ServicestatehistoryQuery 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('sh.statehistory_id', 'so.name1', 'so.name2'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -150,7 +149,6 @@ class ServicestatehistoryQuery extends IdoQuery
|
||||||
'sgo.object_id = sg.servicegroup_object_id AND sgo.is_active = 1 AND sgo.objecttype_id = 4',
|
'sgo.object_id = sg.servicegroup_object_id AND sgo.is_active = 1 AND sgo.objecttype_id = 4',
|
||||||
array()
|
array()
|
||||||
);
|
);
|
||||||
$this->select->group(array('sh.statehistory_id', 'so.name1', 'so.name2'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -164,4 +162,21 @@ class ServicestatehistoryQuery extends IdoQuery
|
||||||
array()
|
array()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getGroup()
|
||||||
|
{
|
||||||
|
$group = array();
|
||||||
|
if ($this->hasJoinedVirtualTable('hostgroups') || $this->hasJoinedVirtualTable('servicegroups')) {
|
||||||
|
$group = array('sh.statehistory_id', 'so.object_id');
|
||||||
|
if ($this->hasJoinedVirtualTable('services')) {
|
||||||
|
$group[] = 'h.host_id';
|
||||||
|
$group[] = 's.service_id';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $group;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue