[icinga-checkins] icinga.org: icinga-api/master: * Added comment target

git at icinga.org git at icinga.org
Tue Sep 7 18:26:49 CEST 2010


Module: icinga-api
Branch: master
Commit: 08355c2d6fff1ad4959b464f316e2a691dc5368a
URL:    https://git.icinga.org/?p=icinga-api.git;a=commit;h=08355c2d6fff1ad4959b464f316e2a691dc5368a

Author: Marius Hein <marius.hein at netways.de>
Date:   Tue Aug 31 10:53:51 2010 +0200

* Added comment target

---

 .../data_interfaces/IcingaApiSearchIdoMysql.php    |   27 ++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/objects/search/data_interfaces/IcingaApiSearchIdoMysql.php b/objects/search/data_interfaces/IcingaApiSearchIdoMysql.php
index 0f8295a..c08fb28 100644
--- a/objects/search/data_interfaces/IcingaApiSearchIdoMysql.php
+++ b/objects/search/data_interfaces/IcingaApiSearchIdoMysql.php
@@ -355,6 +355,16 @@ implements IcingaApiSearchIdoInterface {
 			${FILTER}
 			${GROUPBY}
 			${ORDERBY:ss.current_state asc}
+			${LIMIT}',
+		self::TARGET_COMMENT =>
+			'select
+				${FIELDS}
+			from
+			${TABLE_PREFIX}comments co
+			where 1
+			${FILTER}
+			${GROUPBY}
+			${ORDERBY:co.comment_time asc}
 			${LIMIT}'
 			);
 
@@ -588,6 +598,23 @@ implements IcingaApiSearchIdoInterface {
 			// Summary queries
 		'HOSTGROUP_SUMMARY_COUNT' => array('oh', 'object_id', 'count(%s)'),
 		'SERVICEGROUP_SUMMARY_COUNT' => array('ss', 'current_state', 'count(%s)'),
+		
+			// Comments
+		'COMMENT_ID' => array('co', 'comment_id'),
+		'COMMENT_INSTANCE_ID' => array('co', 'instance_id'),
+		'COMMENT_ENTRY_TIME' => array('co', 'entry_time'),
+		'COMMENT_ENTRY_TIME_USEC' => array('co', 'entry_time_usec'),
+		'COMMENT_TYPE' => array('co', 'comment_type'),
+		'COMMENT_ENTRY_TYPE' => array('co', 'entry_type'),
+		'COMMENT_OBJECT_ID' => array('co', 'object_id'),
+		'COMMENT_TIME' => array('co', 'comment_time'),
+		'COMMENT_INTERNAL_ID' => array('co', 'internal_comment_id'),
+		'COMMENT_AUTHOR_NAME' => array('co', 'author_name'),
+		'COMMENT_DATA' => array('co', 'comment_data'),
+		'COMMENT_IS_PERSISTENT' => array('co', 'is_persistent'),
+		'COMMENT_SOURCE' => array('co', 'comment_source'),
+		'COMMENT_EXPIRES' => array('co', 'expires'),
+		'COMMENT_EXPIRATION_TIME' => array('co', 'expiration_time')
 			);
 
 			/*





More information about the icinga-checkins mailing list