parent
29b5e4fd43
commit
7156bd7dfb
|
@ -253,10 +253,13 @@ abstract class MonitoredObject implements Filterable
|
||||||
'type' => 'comment_type',
|
'type' => 'comment_type',
|
||||||
))
|
))
|
||||||
->where('comment_type', array('comment', 'ack'))
|
->where('comment_type', array('comment', 'ack'))
|
||||||
->where('comment_objecttype', $this->type)
|
->where('comment_objecttype', $this->type);
|
||||||
->where('comment_host', $this->host_name);
|
|
||||||
if ($this->type === self::TYPE_SERVICE) {
|
if ($this->type === self::TYPE_SERVICE) {
|
||||||
$comments->where('comment_service', $this->service_description);
|
$comments
|
||||||
|
->where('service_host_name', $this->host_name)
|
||||||
|
->where('service_description', $this->service_description);
|
||||||
|
} else {
|
||||||
|
$comments->where('host_name', $this->host_name);
|
||||||
}
|
}
|
||||||
$this->comments = $comments->getQuery()->fetchAll();
|
$this->comments = $comments->getQuery()->fetchAll();
|
||||||
return $this;
|
return $this;
|
||||||
|
@ -387,8 +390,9 @@ abstract class MonitoredObject implements Filterable
|
||||||
'contact_pager',
|
'contact_pager',
|
||||||
));
|
));
|
||||||
if ($this->type === self::TYPE_SERVICE) {
|
if ($this->type === self::TYPE_SERVICE) {
|
||||||
$contacts->where('service_host_name', $this->host_name);
|
$contacts
|
||||||
$contacts->where('service_description', $this->service_description);
|
->where('service_host_name', $this->host_name)
|
||||||
|
->where('service_description', $this->service_description);
|
||||||
} else {
|
} else {
|
||||||
$contacts->where('host_name', $this->host_name);
|
$contacts->where('host_name', $this->host_name);
|
||||||
}
|
}
|
||||||
|
@ -430,8 +434,9 @@ abstract class MonitoredObject implements Filterable
|
||||||
'contactgroup_alias'
|
'contactgroup_alias'
|
||||||
));
|
));
|
||||||
if ($this->type === self::TYPE_SERVICE) {
|
if ($this->type === self::TYPE_SERVICE) {
|
||||||
$contactsGroups->where('service_host_name', $this->host_name);
|
$contactsGroups
|
||||||
$contactsGroups->where('service_description', $this->service_description);
|
->where('service_host_name', $this->host_name)
|
||||||
|
->where('service_description', $this->service_description);
|
||||||
} else {
|
} else {
|
||||||
$contactsGroups->where('host_name', $this->host_name);
|
$contactsGroups->where('host_name', $this->host_name);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue