mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-05-21 15:10:13 +02:00
the Monitoring/View code was completly dropped in favor of the DataView implementations, as new Backends otherwise would require to implement two seperate query logics refs #3801
32 lines
661 B
PHP
32 lines
661 B
PHP
<?php
|
|
|
|
namespace Icinga\Module\Monitoring\Object;
|
|
|
|
use Icinga\Data\BaseQuery as Query;
|
|
use Icinga\Module\Monitoring\DataView\HostStatus;
|
|
|
|
class Host extends AbstractObject
|
|
{
|
|
|
|
public $type = self::TYPE_HOST;
|
|
public $prefix = 'host_';
|
|
private $view = null;
|
|
|
|
|
|
public function populate()
|
|
{
|
|
$this->fetchComments()
|
|
->fetchDowntimes()
|
|
->fetchHostgroups()
|
|
->fetchContacts()
|
|
->fetchContactGroups();
|
|
}
|
|
|
|
protected function getProperties()
|
|
{
|
|
$this->view = HostStatus::fromRequest($this->getRequest());
|
|
return $this->view->getQuery()->fetchRow();
|
|
}
|
|
|
|
}
|