[icinga-checkins] icinga.org: icinga-web/master: * Added TARGET_CONTACT to api

git at icinga.org git at icinga.org
Thu Dec 29 19:05:35 CET 2011


Module: icinga-web
Branch: master
Commit: 080b0ec1fd88d8eba9aae5bea370844633a8aed8
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=080b0ec1fd88d8eba9aae5bea370844633a8aed8

Author: Jannis Mosshammer <jannis.mosshammer at netways.de>
Date:   Wed Nov 30 21:08:23 2011 +0100

* Added TARGET_CONTACT to api

---

 .../LegacyLayer/TargetModifierModel.class.php      |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/app/modules/Api/models/Store/LegacyLayer/TargetModifierModel.class.php b/app/modules/Api/models/Store/LegacyLayer/TargetModifierModel.class.php
index e0b1229..e3e01b2 100644
--- a/app/modules/Api/models/Store/LegacyLayer/TargetModifierModel.class.php
+++ b/app/modules/Api/models/Store/LegacyLayer/TargetModifierModel.class.php
@@ -495,6 +495,18 @@ class Api_Store_LegacyLayer_TargetModifierModel extends IcingaStoreTargetModifie
                         "ocg"  => array("src" => "cg","relation" => "object")
                 );
                 break;
+        
+            case IcingaApiConstants::TARGET_CONTACT:
+                $this->mainAlias = "cgm";
+                $this->setTarget("IcingaContacts");
+
+                $this->aliasDefs = array(
+                        "ocg"   => array("src" => "cg", "relation" => "object"),
+                        "cg"   => array("src" => "cgm", "relation" => "contactgroups","join"=>"left"),
+                        "cvsc"    => array("src" => "cgm", "relation" => "customvariablestatus"),
+                        "oc"  => array("src" => "cgm","relation" => "object")
+                );
+                break;
 
             case IcingaApiConstants::TARGET_CONTACTGROUP:
                 $this->mainAlias = "cg";





More information about the icinga-checkins mailing list