I wrote a small bit of code in order to track aggregate system temperatures, and tried to make use of the $optional_graphs feature. Doing so broke the pie chart.

I tracked down the problem to the templating code, and the blocks used for variable substitution. Basically, a new block is created for each optional_graph, but they are "nested," instead of "closed." This causes incorrect parameters to be used for the pie chart.

The fix is a one-liner (against trunk):

Index: cluster_view.php
===================================================================
--- cluster_view.php    (revision 873)
+++ cluster_view.php    (working copy)
@@ -52,7 +52,7 @@
        $tpl->newBlock('optional_graphs');
        $tpl->assign('name',$g);
        $tpl->assign('graph_args',$graph_args);
-
+       $tpl->gotoBlock('_ROOT');
 }

 #


--
Jesse Becker
NHGRI Linux support (Digicon Contractor)

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Ganglia-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ganglia-developers

Reply via email to