I look around in the code, trying to apply the patch manually, as there
have been a few changed between 1.2.5-2 and 1.2.6-10 (current unstable).
I can confirm that the patch removes all zero lines, which is good in
some cases and bad in other.
But during that, I realized that there are just some boolean logic
errors, causing zero lines to be redrawn exactly if there are _no_
negative numbers.

I don't have a clue about perl, so I just put some ! where they seem
fit and, as far as I can see, it works.


Holger


Here comes the patch to push the logic back on track:

--- munin-graph.bak     2009-05-01 17:16:03.000000000 +0200
+++ munin-graph 2009-05-01 17:31:40.000000000 +0200
@@ -654,11 +654,11 @@
            {
                push (@rrd, "CDEF:min_max_diff=a$rrdname,i$rrdname,-");
                push (@rrd, "CDEF:re_zero=min_max_diff,min_max_diff,-") 
-                   unless ($node->{client}->{$service}->{$field.".negative"});
+                   unless !($node->{client}->{$service}->{$field.".negative"});
                push (@rrd, "AREA:i$rrdname#ffffff");
                push (@rrd, "STACK:min_max_diff$range_colour");
                push (@rrd, "LINE2:re_zero#000000")
-                   unless ($node->{client}->{$service}->{$field.".negative"});
+                   unless !($node->{client}->{$service}->{$field.".negative"});
            }
 
            if ($has_negative and !...@rrd_negatives) # Push "global" headers...
@@ -699,7 +699,7 @@
                    $negfield = 
$node->{client}->{$service}->{$negfield.".realname"};
                }
 
-               if (!...@rrd_negatives) # zero-line, to redraw zero afterwards.
+               if (@rrd_negatives) # zero-line, to redraw zero afterwards.
                {
                    push (@rrd_negatives, "CDEF:re_zero=g$negfield,UN,0,0,IF");
                }



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to