mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-28 16:24:04 +02:00
monitoring: Remove applying restrictions in the detail area when not necessary
This commit is contained in:
parent
9599b63a55
commit
44dd4653ec
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
if (! empty($object->contacts)) {
|
if ($object->contacts->hasResult()) {
|
||||||
|
|
||||||
$list = array();
|
$list = array();
|
||||||
foreach ($object->contacts as $contact) {
|
foreach ($object->contacts as $contact) {
|
||||||
@ -17,10 +17,9 @@ if (! empty($object->contacts)) {
|
|||||||
$this->translate('Contacts'),
|
$this->translate('Contacts'),
|
||||||
implode(', ', $list)
|
implode(', ', $list)
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($object->contactgroups)) {
|
if ($object->contactgroups->hasResult()) {
|
||||||
$list = array();
|
$list = array();
|
||||||
foreach ($object->contactgroups as $contactgroup) {
|
foreach ($object->contactgroups as $contactgroup) {
|
||||||
$list[] = $this->qlink(
|
$list[] = $this->qlink(
|
||||||
@ -36,6 +35,4 @@ if (! empty($object->contactgroups)) {
|
|||||||
$this->translate('Contactgroups'),
|
$this->translate('Contactgroups'),
|
||||||
implode(', ', $list)
|
implode(', ', $list)
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -389,7 +389,7 @@ abstract class MonitoredObject implements Filterable
|
|||||||
} else {
|
} else {
|
||||||
$contactsGroups->where('host_name', $this->host_name);
|
$contactsGroups->where('host_name', $this->host_name);
|
||||||
}
|
}
|
||||||
$this->contactgroups = $contactsGroups->applyFilter($this->getFilter())->getQuery()->fetchAll();
|
$this->contactgroups = $contactsGroups;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -418,7 +418,7 @@ abstract class MonitoredObject implements Filterable
|
|||||||
} else {
|
} else {
|
||||||
$contacts->where('host_name', $this->host_name);
|
$contacts->where('host_name', $this->host_name);
|
||||||
}
|
}
|
||||||
$this->contacts = $contacts->applyFilter($this->getFilter())->getQuery()->fetchAll();
|
$this->contacts = $contacts;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -596,7 +596,7 @@ abstract class MonitoredObject implements Filterable
|
|||||||
$eventHistory->where('service_description', $this->service_description);
|
$eventHistory->where('service_description', $this->service_description);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->eventhistory = $eventHistory->applyFilter($this->getFilter());
|
$this->eventhistory = $eventHistory;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user