diff --git a/html/includes/graphs/common.inc.php b/html/includes/graphs/common.inc.php index 3f1c630b9..31f4d9e12 100644 --- a/html/includes/graphs/common.inc.php +++ b/html/includes/graphs/common.inc.php @@ -9,6 +9,7 @@ if ($_GET['inverse']) { $in = 'out'; $out = 'in'; $inverse=TRUE; } else { $in = if ($_GET['legend'] == "no") { $rrd_options .= " -g"; } if ($_GET['nototal']) { $nototal=TRUE;} else { $nototal=FALSE;} if ($_GET['nodetails']) { $nodetails=TRUE; } else { $nodetails=FALSE; } +if ($_GET['noagg']) { $noagg=TRUE; } else { $noagg=FALSE; } if ($_GET['title'] == "yes") { $rrd_options .= " --title='".$graph_title."' "; } if (isset($_GET['graph_title'])) { $rrd_options .= " --title='".$_GET['graph_title']."' "; } diff --git a/html/includes/graphs/generic_multi_bits_separated.inc.php b/html/includes/graphs/generic_multi_bits_separated.inc.php index d2d917b4b..c312d315d 100644 --- a/html/includes/graphs/generic_multi_bits_separated.inc.php +++ b/html/includes/graphs/generic_multi_bits_separated.inc.php @@ -98,29 +98,31 @@ foreach ($rrd_list as $rrd) $i++; $iter++; } -$rrd_options .= " CDEF:aggr".$in."bytes=" . $aggr_in.",ADDNAN"; -$rrd_options .= " CDEF:aggr".$out."bytes=" . $aggr_out.",ADDNAN"; -$rrd_options .= " CDEF:aggrinbits=aggrinbytes,".$multiplier.",*"; -$rrd_options .= " CDEF:aggroutbits=aggroutbytes,".$multiplier.",*"; -$rrd_options .= " VDEF:totalin=aggrinbytes,TOTAL"; -$rrd_options .= " VDEF:totalout=aggroutbytes,TOTAL"; -$rrd_options .= " COMMENT:' \\\\n'"; -$rrd_options .= " COMMENT:'".substr(str_pad("Aggregate In", $descr_len+5),0,$descr_len+5)."'"; -$rrd_options .= " GPRINT:aggrinbits:LAST:%6.2lf%s$units"; -$rrd_options .= " GPRINT:aggrinbits:AVERAGE:%6.2lf%s$units"; -$rrd_options .= " GPRINT:aggrinbits:MAX:%6.2lf%s$units"; -if (!$nototal) { - $rrd_options .= " GPRINT:totalin:%6.2lf%s$total_units"; +if (!$noagg){ + $rrd_options .= " CDEF:aggr".$in."bytes=" . $aggr_in.",ADDNAN"; + $rrd_options .= " CDEF:aggr".$out."bytes=" . $aggr_out.",ADDNAN"; + $rrd_options .= " CDEF:aggrinbits=aggrinbytes,".$multiplier.",*"; + $rrd_options .= " CDEF:aggroutbits=aggroutbytes,".$multiplier.",*"; + $rrd_options .= " VDEF:totalin=aggrinbytes,TOTAL"; + $rrd_options .= " VDEF:totalout=aggroutbytes,TOTAL"; + $rrd_options .= " COMMENT:' \\\\n'"; + $rrd_options .= " COMMENT:'".substr(str_pad("Aggregate In", $descr_len+5),0,$descr_len+5)."'"; + $rrd_options .= " GPRINT:aggrinbits:LAST:%6.2lf%s$units"; + $rrd_options .= " GPRINT:aggrinbits:AVERAGE:%6.2lf%s$units"; + $rrd_options .= " GPRINT:aggrinbits:MAX:%6.2lf%s$units"; + if (!$nototal) { + $rrd_options .= " GPRINT:totalin:%6.2lf%s$total_units"; + } + $rrd_options .= "\\\\n"; + $rrd_options .= " COMMENT:'".substr(str_pad("Aggregate Out", $descr_len+5),0,$descr_len+5)."'"; + $rrd_options .= " GPRINT:aggroutbits:LAST:%6.2lf%s$units"; + $rrd_options .= " GPRINT:aggroutbits:AVERAGE:%6.2lf%s$units"; + $rrd_options .= " GPRINT:aggroutbits:MAX:%6.2lf%s$units"; + if (!$nototal) { + $rrd_options .= " GPRINT:totalout:%6.2lf%s$total_units"; + } + $rrd_options .= "\\\\n"; } -$rrd_options .= "\\\\n"; -$rrd_options .= " COMMENT:'".substr(str_pad("Aggregate Out", $descr_len+5),0,$descr_len+5)."'"; -$rrd_options .= " GPRINT:aggroutbits:LAST:%6.2lf%s$units"; -$rrd_options .= " GPRINT:aggroutbits:AVERAGE:%6.2lf%s$units"; -$rrd_options .= " GPRINT:aggroutbits:MAX:%6.2lf%s$units"; -if (!$nototal) { - $rrd_options .= " GPRINT:totalout:%6.2lf%s$total_units"; -} -$rrd_options .= "\\\\n"; if ($custom_graph) { $rrd_options .= $custom_graph; }