From ee24f5ccedf17b0bc83aa96f2d623624f849080d Mon Sep 17 00:00:00 2001 From: Alexandre Bruyelles Date: Mon, 16 Jun 2014 10:50:12 +0200 Subject: [PATCH] add an option to not decolore graph --- www/config.inc | 2 ++ www/gengraph.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/www/config.inc b/www/config.inc index 3060005..8084564 100644 --- a/www/config.inc +++ b/www/config.inc @@ -22,6 +22,8 @@ $asset_cache_life = "604800"; # 604800 seconds = 7 days $compat_rrdtool12 = false; # compatibility with RRDtool 1.2 (show95th will not work if this is set) +$decolore = true; #decolore the "negative" part of graphs (only usefull if $outispositive is true) + /* Custom links to be shown for each AS. You can use %as% as a placeholder for the ASN. */ $customlinks = array( diff --git a/www/gengraph.php b/www/gengraph.php index 03b780f..27c9e1e 100644 --- a/www/gengraph.php +++ b/www/gengraph.php @@ -107,7 +107,7 @@ if ($compat_rrdtool12) { /* generate graph area/stack for inbound */ $i = 0; foreach ($knownlinks as $link) { - if ($outispositive) + if ($outispositive && $decolore) $col = $link['color'] . "BB"; else $col = $link['color'];