icingadb-web/application/controllers/HostsController.php
Eric Lippmann 53a871695b WIP: List at most 25 hosts
Subject to remove once we have a paginator.
2019-09-09 14:47:42 +02:00

24 lines
500 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);
$this->addContent($hostList);
}
}