Title: [opsview] [9683] Fixed host interfaces which gives a webexception when looking at query host
Revision
9683
Author
tvoon
Date
2012-08-02 11:27:08 +0100 (Thu, 02 Aug 2012)

Log Message

Fixed host interfaces which gives a webexception when looking at query host
page. Only seen since DBIx::Class upgrade (DE348)

Modified Paths

Modified: trunk/opsview-web/lib/Opsview/Web/Controller/RRDgraph.pm
===================================================================
--- trunk/opsview-web/lib/Opsview/Web/Controller/RRDgraph.pm	2012-08-01 10:09:18 UTC (rev 9682)
+++ trunk/opsview-web/lib/Opsview/Web/Controller/RRDgraph.pm	2012-08-02 10:27:08 UTC (rev 9683)
@@ -247,7 +247,7 @@
                 $uom = read_file($uom_file);
                 ( $new_uom, $uom_multiplier ) = convert_uoms($uom);
                 if ( $c->debug ) {
-                    $c->log->_dump($hash);
+                    $c->log->debug( Data::Dump::dump($hash) );
                     $c->log->debug( "uom_file=$uom_file" );
                     $c->log->debug( "uom=$uom" );
                     $c->log->debug( "new_uom=$new_uom" );
@@ -277,7 +277,7 @@
                   "GPRINT:$vname:AVERAGE:$format_specifier", "COMMENT:\\n";
             }
 
-            $c->log->_dump($rrdoptions) if ( $c->debug );
+            $c->log->debug( Data::Dump::dump($rrdoptions) ) if ( $c->debug );
 
             next unless ($includethresholds);
 

Modified: trunk/opsview-web/lib/Opsview/Web/Controller/State/Host.pm
===================================================================
--- trunk/opsview-web/lib/Opsview/Web/Controller/State/Host.pm	2012-08-01 10:09:18 UTC (rev 9682)
+++ trunk/opsview-web/lib/Opsview/Web/Controller/State/Host.pm	2012-08-02 10:27:08 UTC (rev 9683)
@@ -123,7 +123,12 @@
             servicename =>
               { "-like" => [ "Interface: %", "Errors: %", "Discards: %" ] },
         },
-        { prefetch => "servicestatus", }
+
+        # This prefetch needs to be removed. It seems that since the DBIx::Class upgrade to 0.8198,
+        # it seems that the prefetch doesn't associated the related object correctly
+        # We remove this prefetch which means extra calls are necessary later, but given that this
+        # is not a regularly run query, this should be fine. Can investigate further if necessary
+        #{ prefetch => "servicestatus", }
     );
 
     # Add authentication

Modified: trunk/opsview-web/t/825queryhost.t
===================================================================
--- trunk/opsview-web/t/825queryhost.t	2012-08-01 10:09:18 UTC (rev 9682)
+++ trunk/opsview-web/t/825queryhost.t	2012-08-02 10:27:08 UTC (rev 9683)
@@ -12,7 +12,7 @@
 use Test::Deep;
 use Test::LongString;
 
-use Opsview::Test qw(opsview);
+use Opsview::Test qw(opsview runtime);
 use Test::WWW::Mechanize::Catalyst qw(Opsview::Web);
 
 use lib "$Bin/lib";

_______________________________________________
Opsview-checkins mailing list
[email protected]
http://lists.opsview.org/lists/listinfo/opsview-checkins

Reply via email to