[icinga-checkins] icinga.org: icinga-api/mhein/default: * config_type fixes

git at icinga.org git at icinga.org
Thu Jan 20 10:12:13 CET 2011


Module: icinga-api
Branch: mhein/default
Commit: ba2516ffb0adbb49b29227cd867de50988dbcaef
URL:    https://git.icinga.org/?p=icinga-api.git;a=commit;h=ba2516ffb0adbb49b29227cd867de50988dbcaef

Author: Marius Hein <marius.hein at netways.de>
Date:   Mon Jan 17 15:54:04 2011 +0100

* config_type fixes

---

 .../data_interfaces/IcingaApiSearchIdoMysql.php    |    8 ++++----
 .../data_interfaces/IcingaApiSearchIdoOci.php      |    8 ++++----
 .../data_interfaces/IcingaApiSearchIdoOci8.php     |    4 ++--
 .../data_interfaces/IcingaApiSearchIdoPgsql.php    |    4 ++--
 4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/objects/search/data_interfaces/IcingaApiSearchIdoMysql.php b/objects/search/data_interfaces/IcingaApiSearchIdoMysql.php
index f3ad13b..0f4c9a4 100644
--- a/objects/search/data_interfaces/IcingaApiSearchIdoMysql.php
+++ b/objects/search/data_interfaces/IcingaApiSearchIdoMysql.php
@@ -42,7 +42,7 @@ implements IcingaApiSearchIdoInterface {
 				distinct ${FIELDS}
 			from
 				${TABLE_PREFIX}objects oh
-			${if_table:h:inner join ${TABLE_PREFIX}hosts h on h.host_object_id = oh.object_id}
+			inner join ${TABLE_PREFIX}hosts h on h.host_object_id = oh.object_id
 			${if_table:hs:inner join ${TABLE_PREFIX}hoststatus hs on hs.host_object_id = oh.object_id}
 			${if_table:i,h:inner join ${TABLE_PREFIX}instances i on i.instance_id = h.instance_id}
 			${if_table:hcg,h:inner join ${TABLE_PREFIX}host_contactgroups hcg on hcg.host_id = h.host_id}
@@ -56,7 +56,7 @@ implements IcingaApiSearchIdoInterface {
 			${if_table:cvsh,oh:inner join ${TABLE_PREFIX}customvariablestatus cvsh on oh.object_id = cvsh.object_id}
 			${if_table:cvsc,oc,cgm,cg,hcg,h:inner join ${TABLE_PREFIX}customvariablestatus cvsc on oc.object_id = cvsc.object_id}
 			where
-				oh.objecttype_id = 1
+				oh.objecttype_id = 1 and h.config_type=1
 			${FILTER_AND}
 			${GROUPBY}
 			${ORDERBY}
@@ -66,7 +66,7 @@ implements IcingaApiSearchIdoInterface {
 				distinct ${FIELDS}
 			from
 				${TABLE_PREFIX}objects os
-			${if_table:s:inner join ${TABLE_PREFIX}services s on s.service_object_id = os.object_id}
+			inner join ${TABLE_PREFIX}services s on s.service_object_id = os.object_id
 			${if_table:i,s:inner join ${TABLE_PREFIX}instances i on i.instance_id = s.instance_id}
 			${if_table:scg,s:inner join ${TABLE_PREFIX}service_contactgroups scg on scg.service_id = s.service_id}
 			${if_table:cg,scg,s:inner join ${TABLE_PREFIX}contactgroups cg on cg.contactgroup_object_id = scg.contactgroup_object_id}
@@ -86,7 +86,7 @@ implements IcingaApiSearchIdoInterface {
 			${if_table:cvss:inner join ${TABLE_PREFIX}customvariablestatus cvss on os.object_id = cvss.object_id}
 			${if_table:cvsc,oc,cgm,cg,scg,s:inner join ${TABLE_PREFIX}customvariablestatus cvsc on oc.object_id = cvsc.object_id}
 			where
-				os.objecttype_id = 2
+				os.objecttype_id = 2 and s.config_type=1
 			${FILTER_AND}
 			${GROUPBY}
 			${ORDERBY}
diff --git a/objects/search/data_interfaces/IcingaApiSearchIdoOci.php b/objects/search/data_interfaces/IcingaApiSearchIdoOci.php
index c3f1dfe..355c6e8 100644
--- a/objects/search/data_interfaces/IcingaApiSearchIdoOci.php
+++ b/objects/search/data_interfaces/IcingaApiSearchIdoOci.php
@@ -48,7 +48,7 @@ class IcingaApiSearchIdoOci
 				distinct ${FIELDS}
 			from
 				${TABLE_PREFIX}objects oh
-			${if_table:h:inner join ${TABLE_PREFIX}hosts h on h.host_object_id = oh.id}
+			inner join ${TABLE_PREFIX}hosts h on h.host_object_id = oh.id
 			${if_table:hs:inner join ${TABLE_PREFIX}hoststatus hs on hs.host_object_id = oh.id}
 			${if_table:i,h:inner join ${TABLE_PREFIX}instances i on i.id = h.instance_id}
 			${if_table:hcg,h:inner join ${TABLE_PREFIX}host_contactgroups hcg on hcg.host_id = h.id}
@@ -62,7 +62,7 @@ class IcingaApiSearchIdoOci
 			${if_table:cvsh,oh:inner join ${TABLE_PREFIX}customvariablestatus cvsh on oh.id = cvsh.object_id}
 			${if_table:cvsc,oc,cgm,cg,hcg,h:inner join ${TABLE_PREFIX}customvariablestatus cvsc on oc.id = cvsc.object_id}
 			where
-				oh.objecttype_id = 1
+				oh.objecttype_id = 1 and h.config_type=1
 			${FILTER_AND}
 			${GROUPBY}
 			${ORDERBY}
@@ -72,7 +72,7 @@ class IcingaApiSearchIdoOci
 				distinct ${FIELDS}
 			from
 				${TABLE_PREFIX}objects os
-			${if_table:s:inner join ${TABLE_PREFIX}services s on s.service_object_id = os.id}
+			inner join ${TABLE_PREFIX}services s on s.service_object_id = os.id
 			${if_table:i,s:inner join ${TABLE_PREFIX}instances i on i.id = s.instance_id}
 			${if_table:scg,s:inner join ${TABLE_PREFIX}service_contactgroups scg on scg.service_id = s.id}
 			${if_table:cg,scg,s:inner join ${TABLE_PREFIX}contactgroups cg on cg.contactgroup_object_id = scg.contactgroup_object_id}
@@ -92,7 +92,7 @@ class IcingaApiSearchIdoOci
 			${if_table:cvss:inner join ${TABLE_PREFIX}customvariablestatus cvss on os.id = cvss.object_id}
 			${if_table:cvsc,oc,cgm,cg,scg,s:inner join ${TABLE_PREFIX}customvariablestatus cvsc on oc.id = cvsc.object_id}
 			where
-				os.objecttype_id = 2
+				os.objecttype_id = 2 and s.config_type=1
 			${FILTER_AND}
 			${GROUPBY}
 			${ORDERBY}
diff --git a/objects/search/data_interfaces/IcingaApiSearchIdoOci8.php b/objects/search/data_interfaces/IcingaApiSearchIdoOci8.php
index a44fc8b..4761b7a 100644
--- a/objects/search/data_interfaces/IcingaApiSearchIdoOci8.php
+++ b/objects/search/data_interfaces/IcingaApiSearchIdoOci8.php
@@ -65,7 +65,7 @@ class IcingaApiSearchIdoOci8
 			${if_table:cvsh,oh:inner join ${TABLE_PREFIX}customvariablestatus cvsh on oh.id = cvsh.id}
 			${if_table:cvsc,oc,cgm,cg,hcg,h:inner join ${TABLE_PREFIX}customvariablestatus cvsc on oc.id = cvsc.id}
 			where
-				oh.objecttype_id = 1
+				oh.objecttype_id = 1 and h.config_type=1
 			${FILTER_AND}
 			${GROUPBY}
 			${ORDERBY}
@@ -96,7 +96,7 @@ class IcingaApiSearchIdoOci8
 			${if_table:cvss:inner join ${TABLE_PREFIX}customvariablestatus cvss on os.id = cvss.id}
 			${if_table:cvsc,oc,cgm,cg,scg,s:inner join ${TABLE_PREFIX}customvariablestatus cvsc on oc.id = cvsc.id}
 			where
-				os.objecttype_id = 2
+				os.objecttype_id = 2 s.config_type=1
 			${FILTER_AND}
 			${GROUPBY}
 			${ORDERBY}
diff --git a/objects/search/data_interfaces/IcingaApiSearchIdoPgsql.php b/objects/search/data_interfaces/IcingaApiSearchIdoPgsql.php
index 39a66e7..5ea26ac 100644
--- a/objects/search/data_interfaces/IcingaApiSearchIdoPgsql.php
+++ b/objects/search/data_interfaces/IcingaApiSearchIdoPgsql.php
@@ -55,7 +55,7 @@ class IcingaApiSearchIdoPgsql
 			${if_table:cvsh,oh:inner join ${TABLE_PREFIX}customvariablestatus AS cvsh on oh.object_id = cvsh.object_id}
 			${if_table:cvsc,oc,cgm,cg,hcg,h:inner join ${TABLE_PREFIX}customvariablestatus AS cvsc on oc.object_id = cvsc.object_id}
 			where
-				oh.objecttype_id = 1
+				oh.objecttype_id = 1 and h.config_type=1
 			${FILTER_AND}
 			${GROUPBY}
 			${ORDERBY}
@@ -85,7 +85,7 @@ class IcingaApiSearchIdoPgsql
 			${if_table:cvss:inner join ${TABLE_PREFIX}customvariablestatus AS cvss on os.object_id = cvss.object_id}
 			${if_table:cvsc,oc,cgm,cg,scg,s:inner join ${TABLE_PREFIX}customvariablestatus AS cvsc on oc.object_id = cvsc.object_id}
 			where
-				os.objecttype_id = 2
+				os.objecttype_id = 2 and s.config_type=1
 			${FILTER_AND}
 			${GROUPBY}
 			${ORDERBY}





More information about the icinga-checkins mailing list