mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-05-28 04:36:06 -04:00
Introduce HostgroupsController
This commit is contained in:
parent
5ac698b3f9
commit
955c5457d9
1 changed files with 33 additions and 0 deletions
33
application/controllers/HostgroupsController.php
Normal file
33
application/controllers/HostgroupsController.php
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
namespace Icinga\Module\Eagle\Controllers;
|
||||
|
||||
use Icinga\Module\Eagle\Model\Hostgroupsummary;
|
||||
use Icinga\Module\Eagle\Web\Controller;
|
||||
use Icinga\Module\Eagle\Widget\ItemList\HostgroupList;
|
||||
|
||||
class HostgroupsController extends Controller
|
||||
{
|
||||
public function indexAction() {
|
||||
|
||||
$this->setTitle($this->translate('Host Groups'));
|
||||
|
||||
$db = $this->getDb();
|
||||
|
||||
$hostgroups = Hostgroupsummary::on($db);
|
||||
|
||||
$limitControl = $this->createLimitControl();
|
||||
$paginationControl = $this->createPaginationControl($hostgroups);
|
||||
$filterControl = $this->createFilterControl($hostgroups);
|
||||
|
||||
$this->filter($hostgroups);
|
||||
|
||||
yield $this->export($hostgroups);
|
||||
|
||||
$this->addControl($paginationControl);
|
||||
$this->addControl($limitControl);
|
||||
$this->addControl($filterControl);
|
||||
|
||||
$this->addContent(new HostgroupList($hostgroups));
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue