mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-05-28 04:36:06 -04:00
Add controller for hosts
This commit is contained in:
parent
24e5718109
commit
24c60995d9
1 changed files with 23 additions and 0 deletions
23
application/controllers/HostsController.php
Normal file
23
application/controllers/HostsController.php
Normal 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);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue