[icinga-checkins] icinga.org: icinga-api/mhein/default: * Added HOST_SERVICE to tableMap ( OpenProblems)

git at icinga.org git at icinga.org
Thu Jan 13 11:25:34 CET 2011


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

Author: Marius Hein <marius.hein at netways.de>
Date:   Wed Nov  3 15:53:21 2010 +0100

* Added HOST_SERVICE to tableMap (OpenProblems)

---

 objects/search/IcingaApiSearchIdo.php |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/objects/search/IcingaApiSearchIdo.php b/objects/search/IcingaApiSearchIdo.php
index ad853d9..55a7f12 100644
--- a/objects/search/IcingaApiSearchIdo.php
+++ b/objects/search/IcingaApiSearchIdo.php
@@ -580,7 +580,8 @@ class IcingaApiSearchIdo
 		self::TARGET_HOST_PARENTS => array('ohp','hph','h','oh','ohg','cvsh','cvss'),
 		self::TARGET_NOTIFICATIONS => array('n','on','obn','s','h','oh','os','ohg','cvsh','cvss'),
 		self::TARGET_HOSTGROUP_SUMMARY => array('hg','ohg','hgm','oh','hs','ohg','cvsh','cvss','cg'),
-		self::TARGET_SERVICEGROUP_SUMMARY => array('sg','osg','sgm','ss','os','ohg','cvsh','cvss','cg')
+		self::TARGET_SERVICEGROUP_SUMMARY => array('sg','osg','sgm','ss','os','ohg','cvsh','cvss','cg'),
+		self::TARGET_HOST_SERVICE => array('op','os','s','ss','oh','h','i','hgm','hg','ohg','sgm','sg','osg')
 	);
 	
 	/**
@@ -589,8 +590,10 @@ class IcingaApiSearchIdo
 	 * @author Jannis Moßhammer <jannis.mosshammer at netways.de>
 	 */
 	public function getAffectedColumns() {
-		if(!$this->getSearchTarget())
-			return array();
+		if (!$this->getSearchTarget() || !isset($this->tableMap[$this->getSearchTarget()])) {
+			return array ();
+		}
+		
 		$map = $this->tableMap[$this->getSearchTarget()];
 		$affected = array();
 		$columns = $this->ifSettings->columns;





More information about the icinga-checkins mailing list