[icinga-checkins] icinga.org: icinga-web/mhein/default: * Api fix for STATUS_SUMMARY queries

git at icinga.org git at icinga.org
Wed Nov 16 14:38:39 CET 2011


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

Author: Marius Hein <marius.hein at netways.de>
Date:   Wed Nov 16 14:30:59 2011 +0100

* Api fix for STATUS_SUMMARY queries

---

 .../LegacyLayer/TargetModifierModel.class.php      |    2 ++
 1 files changed, 2 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 34e1d7b..198b29a 100644
--- a/app/modules/Api/models/Store/LegacyLayer/TargetModifierModel.class.php
+++ b/app/modules/Api/models/Store/LegacyLayer/TargetModifierModel.class.php
@@ -557,6 +557,7 @@ class Api_Store_LegacyLayer_TargetModifierModel extends IcingaStoreTargetModifie
                 $this->additionalSelects["COUNT"] = "count(DISTINCT hs.host_object_id)";
                 $this->ignoreIds = true;
                 $this->forceGroup[] = "hs.current_state";
+                $this->forceGroup[] = "(hs.has_been_checked-hs.should_be_scheduled)*-1";
                 $this->retainedAlias = "h";
                 $this->aliasDefs = array(
                                        "h"  => array("src" => "oh", "relation" => "host","alwaysJoin"=>true),
@@ -583,6 +584,7 @@ class Api_Store_LegacyLayer_TargetModifierModel extends IcingaStoreTargetModifie
                 $this->additionalSelects["COUNT"] = "count(DISTINCT ss.service_object_id)";
                 $this->retainedAlias = "s";
                 $this->forceGroup[] = "ss.current_state";
+                $this->forceGroup[] = "(ss.has_been_checked-ss.should_be_scheduled)*-1";
                 $this->aliasDefs = array(
                                        "s"  => array("src" => "os", "relation" => "service", "alwaysJoin" => true),
                                        "os" => array("src" => "ss", "relation" => "serviceobject", "alwaysJoin" => true, "with"=>"os.is_active=1"),





More information about the icinga-checkins mailing list