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

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


Module: icinga-web
Branch: r1.5
Commit: 3e9c0a99bb5ebb8686250d053a0f2bad8ee24101
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=3e9c0a99bb5ebb8686250d053a0f2bad8ee24101

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 bf83f0b..ba121bb 100644
--- a/app/modules/Api/models/Store/LegacyLayer/TargetModifierModel.class.php
+++ b/app/modules/Api/models/Store/LegacyLayer/TargetModifierModel.class.php
@@ -509,6 +509,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),
@@ -535,6 +536,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),





More information about the icinga-checkins mailing list