From f6490f89268714da8ef8599ffa5d508185c50b55 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Tue, 15 Dec 2015 19:01:48 +0100 Subject: [PATCH] IcingaObjectTables: remove filters, fix object_type --- application/tables/IcingaEndpointTable.php | 9 +++++---- application/tables/IcingaHostTable.php | 2 +- application/tables/IcingaServiceTable.php | 2 +- application/tables/IcingaUserTable.php | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/application/tables/IcingaEndpointTable.php b/application/tables/IcingaEndpointTable.php index c2a41a61..5816d33e 100644 --- a/application/tables/IcingaEndpointTable.php +++ b/application/tables/IcingaEndpointTable.php @@ -13,10 +13,11 @@ class IcingaEndpointTable extends IcingaObjectTable public function getColumns() { return array( - 'id' => 'e.id', - 'endpoint' => 'e.object_name', - 'host' => "(CASE WHEN e.host IS NULL THEN NULL ELSE CONCAT(e.host || ':' || COALESCE(e.port, 5665)) END)", - 'zone' => 'z.object_name', + 'id' => 'e.id', + 'endpoint' => 'e.object_name', + 'object_type' => 'e.object_type', + 'host' => "(CASE WHEN e.host IS NULL THEN NULL ELSE CONCAT(e.host || ':' || COALESCE(e.port, 5665)) END)", + 'zone' => 'z.object_name', ); } diff --git a/application/tables/IcingaHostTable.php b/application/tables/IcingaHostTable.php index 22de08ec..ff7b90b9 100644 --- a/application/tables/IcingaHostTable.php +++ b/application/tables/IcingaHostTable.php @@ -76,6 +76,6 @@ class IcingaHostTable extends IcingaObjectTable public function getBaseQuery() { - return $this->getUnfilteredQuery()->where('h.object_type = ?', 'object'); + return $this->getUnfilteredQuery(); } } diff --git a/application/tables/IcingaServiceTable.php b/application/tables/IcingaServiceTable.php index 1167d42b..9e589afd 100644 --- a/application/tables/IcingaServiceTable.php +++ b/application/tables/IcingaServiceTable.php @@ -57,6 +57,6 @@ class IcingaServiceTable extends IcingaObjectTable public function getBaseQuery() { - return $this->getUnfilteredQuery()->where('s.object_type = ?', 'object'); + return $this->getUnfilteredQuery(); } } diff --git a/application/tables/IcingaUserTable.php b/application/tables/IcingaUserTable.php index f1e39ea7..bd8a7c71 100644 --- a/application/tables/IcingaUserTable.php +++ b/application/tables/IcingaUserTable.php @@ -56,6 +56,6 @@ class IcingaUserTable extends IcingaObjectTable public function getBaseQuery() { - return $this->getUnfilteredQuery()->where('u.object_type = ?', 'object'); + return $this->getUnfilteredQuery(); } }