Add controller for hosts

This commit is contained in:
Eric Lippmann 2019-09-09 14:46:56 +02:00
parent 24e5718109
commit 24c60995d9

View file

@ -0,0 +1,23 @@
<?php
namespace Icinga\Module\Eagle\Controllers;
use Icinga\Module\Eagle\Model\Host;
use Icinga\Module\Eagle\Web\Controller;
use Icinga\Module\Eagle\Widget\HostList;
class HostsController extends Controller
{
public function indexAction()
{
$this->setTitle($this->translate('Hosts'));
$db = $this->getDb();
$hosts = Host::on($db)->with('state');
$hostList = new HostList($hosts);
$this->addContent($hostList);
}
}