Module: nagvis
Branch: master
Commit: f2208c0183c740317c46334ca9e639a4eaf7cd64
URL:    
http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=f2208c0183c740317c46334ca9e639a4eaf7cd64

Author: LaMi <[email protected]>
Date:   Tue Nov 17 11:43:28 2009 +0100

Fixed host state processing when using host objects

---

 share/server/core/classes/objects/NagiosHost.php |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/share/server/core/classes/objects/NagiosHost.php 
b/share/server/core/classes/objects/NagiosHost.php
index 46610f4..05416ee 100644
--- a/share/server/core/classes/objects/NagiosHost.php
+++ b/share/server/core/classes/objects/NagiosHost.php
@@ -110,11 +110,17 @@ class NagiosHost extends NagVisStatefulObject {
         * @author  Lars Michelsen <[email protected]>
         */
        public function fetchSummariesFromCounts() {
+               // Generate summary output
+               $this->fetchSummaryOutputFromCounts();
+               
+               // Add host state to counts
+               // This should be done after output generation and before
+               // summary state fetching. It could confuse the output fetching 
but
+               // is needed for the summary state
+               $this->addHostStateToStateCounts();
+                               
                // Calculate summary state
                $this->fetchSummaryStateFromCounts();
-               
-               // Generate summary output
-               $this->fetchSummaryOutputFromCounts();  
        }
        
        /**
@@ -157,9 +163,6 @@ class NagiosHost extends NagVisStatefulObject {
                                // Get state counts
                                $this->aStateCounts = 
$this->BACKEND->BACKENDS[$this->backend_id]->getHostStateCounts($this->host_name,
 $this->only_hard_states);
                                
-                               // Add host state to counts
-                               $this->addHostStateToStateCounts();
-                               
                                // Calculate summary state and output
                                $this->fetchSummariesFromCounts();
                                


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to