parent
1557410b72
commit
6627b5ae6e
|
@ -5,7 +5,7 @@
|
|||
namespace Icinga\Module\Monitoring\Object;
|
||||
|
||||
use InvalidArgumentException;
|
||||
use Icinga\Module\Monitoring\Backend;
|
||||
use Icinga\Module\Monitoring\Backend\MonitoringBackend;
|
||||
|
||||
/**
|
||||
* A Icinga host
|
||||
|
@ -63,10 +63,10 @@ class Host extends MonitoredObject
|
|||
/**
|
||||
* Create a new host
|
||||
*
|
||||
* @param Backend $backend Backend to fetch host information from
|
||||
* @param MonitoringBackend $backend Backend to fetch host information from
|
||||
* @param string $host Host name
|
||||
*/
|
||||
public function __construct(Backend $backend, $host)
|
||||
public function __construct(MonitoringBackend $backend, $host)
|
||||
{
|
||||
parent::__construct($backend);
|
||||
$this->host = $host;
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace Icinga\Module\Monitoring\Object;
|
|||
use InvalidArgumentException;
|
||||
use Icinga\Application\Config;
|
||||
use Icinga\Exception\InvalidPropertyException;
|
||||
use Icinga\Module\Monitoring\Backend;
|
||||
use Icinga\Module\Monitoring\Backend\MonitoringBackend;
|
||||
use Icinga\Web\UrlParams;
|
||||
|
||||
/**
|
||||
|
@ -28,7 +28,7 @@ abstract class MonitoredObject
|
|||
/**
|
||||
* Backend to fetch object information from
|
||||
*
|
||||
* @var Backend
|
||||
* @var MonitoringBackend
|
||||
*/
|
||||
protected $backend;
|
||||
|
||||
|
@ -119,9 +119,9 @@ abstract class MonitoredObject
|
|||
/**
|
||||
* Create a monitored object, i.e. host or service
|
||||
*
|
||||
* @param Backend $backend Backend to fetch object information from
|
||||
* @param MonitoringBackend $backend Backend to fetch object information from
|
||||
*/
|
||||
public function __construct(Backend $backend)
|
||||
public function __construct(MonitoringBackend $backend)
|
||||
{
|
||||
$this->backend = $backend;
|
||||
}
|
||||
|
@ -480,9 +480,9 @@ abstract class MonitoredObject
|
|||
public static function fromParams(UrlParams $params)
|
||||
{
|
||||
if ($params->has('service') && $params->has('host')) {
|
||||
return new Service(Backend::createBackend(), $params->get('host'), $params->get('service'));
|
||||
return new Service(MonitoringBackend::createBackend(), $params->get('host'), $params->get('service'));
|
||||
} elseif ($params->has('host')) {
|
||||
return new Host(Backend::createBackend(), $params->get('host'));
|
||||
return new Host(MonitoringBackend::createBackend(), $params->get('host'));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
namespace Icinga\Module\Monitoring\Object;
|
||||
|
||||
use InvalidArgumentException;
|
||||
use Icinga\Module\Monitoring\Backend;
|
||||
use Icinga\Module\Monitoring\Backend\MonitoringBackend;
|
||||
|
||||
/**
|
||||
* A Icinga service
|
||||
|
@ -68,11 +68,11 @@ class Service extends MonitoredObject
|
|||
/**
|
||||
* Create a new service
|
||||
*
|
||||
* @param Backend $backend Backend to fetch service information from
|
||||
* @param MonitoringBackend $backend Backend to fetch service information from
|
||||
* @param string $host Host name the service is running on
|
||||
* @param string $service Service name
|
||||
*/
|
||||
public function __construct(Backend $backend, $host, $service)
|
||||
public function __construct(MonitoringBackend $backend, $host, $service)
|
||||
{
|
||||
parent::__construct($backend);
|
||||
$this->host = new Host($backend, $host);
|
||||
|
|
Loading…
Reference in New Issue