From eb433ad03e2c883fd71de423a6af76c48fab07b1 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Sat, 12 Aug 2017 11:26:08 +0200 Subject: [PATCH] GroupMemberTable: code cleanup --- .../Director/Web/Table/GroupMemberTable.php | 25 ++++--------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/library/Director/Web/Table/GroupMemberTable.php b/library/Director/Web/Table/GroupMemberTable.php index 1df6aec0..b7dd33c7 100644 --- a/library/Director/Web/Table/GroupMemberTable.php +++ b/library/Director/Web/Table/GroupMemberTable.php @@ -5,7 +5,6 @@ namespace Icinga\Module\Director\Web\Table; use Icinga\Module\Director\Db; use Icinga\Module\Director\Objects\IcingaObjectGroup; use ipl\Html\Link; -use ipl\Web\Widget\ControlsAndContent; use ipl\Web\Table\ZfQueryBasedTable; use ipl\Web\Url; @@ -45,20 +44,6 @@ class GroupMemberTable extends ZfQueryBasedTable return $this; } - public function renderTo(ControlsAndContent $controller) - { - $url = $controller->url(); - $this->initializeOptionalQuickSearch($controller); - $controller->content()->add([ - $this->getPaginator($url), - $this - ]); - - if ($url->getParam('format') === 'sql') { - $controller->content()->prepend($this->dumpSqlQuery($url)); - } - } - public function getType() { return $this->type; @@ -103,11 +88,11 @@ class GroupMemberTable extends ZfQueryBasedTable protected function prepareQuery() { -// select h.object_name, hg.object_name, -// CASE WHEN hgh.host_id IS NULL THEN 'apply' ELSE 'direct' END AS assi -// from icinga_hostgroup_host_resolved hgr join icinga_host h on h.id = hgr.host_id -// join icinga_hostgroup hg on hgr.hostgroup_id = hg.id -// left join icinga_hostgroup_host hgh on hgh.host_id = h.id and hgh.hostgroup_id = hg.id; + // select h.object_name, hg.object_name, + // CASE WHEN hgh.host_id IS NULL THEN 'apply' ELSE 'direct' END AS assi + // from icinga_hostgroup_host_resolved hgr join icinga_host h on h.id = hgr.host_id + // join icinga_hostgroup hg on hgr.hostgroup_id = hg.id + // left join icinga_hostgroup_host hgh on hgh.host_id = h.id and hgh.hostgroup_id = hg.id; $type = $this->getType(); $columns = [