monitoring: Optimize imports in MonitoredObject

This commit is contained in:
Eric Lippmann 2015-09-03 13:47:51 +02:00
parent e5c9eb1d20
commit 4d2675659c
1 changed files with 3 additions and 1 deletions

View File

@ -5,9 +5,9 @@ namespace Icinga\Module\Monitoring\Object;
use InvalidArgumentException; use InvalidArgumentException;
use Icinga\Application\Config; use Icinga\Application\Config;
use Icinga\Exception\InvalidPropertyException;
use Icinga\Data\Filter\Filter; use Icinga\Data\Filter\Filter;
use Icinga\Data\Filterable; use Icinga\Data\Filterable;
use Icinga\Exception\InvalidPropertyException;
use Icinga\Module\Monitoring\Backend\MonitoringBackend; use Icinga\Module\Monitoring\Backend\MonitoringBackend;
use Icinga\Web\UrlParams; use Icinga\Web\UrlParams;
@ -517,9 +517,11 @@ abstract class MonitoredObject implements Filterable
->fetchContactgroups() ->fetchContactgroups()
->fetchCustomvars() ->fetchCustomvars()
->fetchDowntimes(); ->fetchDowntimes();
// Call fetchHostgroups or fetchServicegroups depending on the object's type // Call fetchHostgroups or fetchServicegroups depending on the object's type
$fetchGroups = 'fetch' . ucfirst($this->type) . 'groups'; $fetchGroups = 'fetch' . ucfirst($this->type) . 'groups';
$this->$fetchGroups(); $this->$fetchGroups();
return $this; return $this;
} }