icingadb-web/application/controllers/HostsController.php
2019-10-08 23:33:10 +02:00

25 lines
544 B
PHP

<?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');
$hosts->limit(25);
$hostList = (new HostList($hosts))
->setRedis($this->getRedis());
$this->addContent($hostList);
}
}