mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix nototal graph option (#13589)
This commit is contained in:
@@ -65,7 +65,7 @@ foreach ($rrd_list as $rrd) {
|
||||
$rrd_options .= ' CDEF:outB' . $i . '_neg=outB' . $i . ',' . $stacked['stacked'] . ',*';
|
||||
$rrd_options .= ' CDEF:octets' . $i . '=inB' . $i . ',outB' . $i . ',+';
|
||||
|
||||
if (! $args['nototal']) {
|
||||
if (! $nototal) {
|
||||
$in_thing .= $seperator . $in . $i . ',UN,0,' . $in . $i . ',IF';
|
||||
$out_thing .= $seperator . $out . $i . ',UN,0,' . $out . $i . ',IF';
|
||||
$pluses .= $plus;
|
||||
|
@@ -52,7 +52,7 @@ if ($width > '500') {
|
||||
$rrd_options .= sprintf(" COMMENT:'%12s'", 'Current');
|
||||
$rrd_options .= sprintf(" COMMENT:'%10s'", 'Average');
|
||||
$rrd_options .= sprintf(" COMMENT:'%10s'", 'Maximum');
|
||||
if (! $$args['nototal']) {
|
||||
if (! $nototal) {
|
||||
$rrd_options .= sprintf(" COMMENT:'%8s'", 'Total');
|
||||
}
|
||||
} else {
|
||||
@@ -67,7 +67,7 @@ if ($_GET['previous']) {
|
||||
$rrd_options .= sprintf(" COMMENT:'\t'", '');
|
||||
$rrd_options .= sprintf(" COMMENT:'%10s'", 'P Avg');
|
||||
$rrd_options .= sprintf(" COMMENT:'%10s'", 'P Max');
|
||||
if (! $args['nototal']) {
|
||||
if (! $nototal) {
|
||||
$rrd_options .= sprintf(" COMMENT:'%8s'", 'P Total');
|
||||
}
|
||||
}
|
||||
@@ -110,7 +110,7 @@ foreach ($rrd_list as $rrd) {
|
||||
$rrd_options .= ' SHIFT:outB' . $i . "X:$period";
|
||||
}
|
||||
|
||||
if (! $args['nototal']) {
|
||||
if (! $nototal) {
|
||||
$in_thing .= $seperator . 'inB' . $i . ',UN,0,' . 'inB' . $i . ',IF';
|
||||
$out_thing .= $seperator . 'outB' . $i . ',UN,0,' . 'outB' . $i . ',IF';
|
||||
$pluses .= $plus;
|
||||
@@ -146,7 +146,7 @@ foreach ($rrd_list as $rrd) {
|
||||
$rrd_options .= ' GPRINT:inbits' . $i . ':AVERAGE:%6.' . $float_precision . "lf%s$units";
|
||||
$rrd_options .= ' GPRINT:inbits' . $i . ':MAX:%6.' . $float_precision . "lf%s$units";
|
||||
|
||||
if (! $args['nototal']) {
|
||||
if (! $nototal) {
|
||||
$rrd_options .= ' GPRINT:totinB' . $i . ':%6.' . $float_precision . "lf%s$total_units";
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ foreach ($rrd_list as $rrd) {
|
||||
$rrd_options .= " COMMENT:' \t'";
|
||||
$rrd_options .= ' GPRINT:inbits' . $i . 'X:AVERAGE:%6.' . $float_precision . "lf%s$units";
|
||||
$rrd_options .= ' GPRINT:inbits' . $i . 'X:MAX:%6.' . $float_precision . "lf%s$units";
|
||||
if (! $args['nototal']) {
|
||||
if (! $nototal) {
|
||||
$rrd_options .= ' GPRINT:totinB' . $i . 'X' . ':%6.' . $float_precision . "lf%s$total_units";
|
||||
}
|
||||
}
|
||||
@@ -166,7 +166,7 @@ foreach ($rrd_list as $rrd) {
|
||||
$rrd_options .= ' GPRINT:outbits' . $i . ':AVERAGE:%6.' . $float_precision . "lf%s$units";
|
||||
$rrd_options .= ' GPRINT:outbits' . $i . ':MAX:%6.' . $float_precision . "lf%s$units";
|
||||
|
||||
if (! $args['nototal']) {
|
||||
if (! $nototal) {
|
||||
$rrd_options .= ' GPRINT:totoutB' . $i . ':%6.' . $float_precision . "lf%s$total_units";
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ foreach ($rrd_list as $rrd) {
|
||||
$rrd_options .= " COMMENT:' \t'";
|
||||
$rrd_options .= ' GPRINT:outbits' . $i . 'X:AVERAGE:%6.' . $float_precision . "lf%s$units";
|
||||
$rrd_options .= ' GPRINT:outbits' . $i . 'X:MAX:%6.' . $float_precision . "lf%s$units";
|
||||
if (! $args['nototal']) {
|
||||
if (! $nototal) {
|
||||
$rrd_options .= ' GPRINT:totoutB' . $i . 'X' . ':%6.' . $float_precision . "lf%s$total_units";
|
||||
}
|
||||
}
|
||||
@@ -213,7 +213,7 @@ if ($_GET['previous'] == 'yes') {
|
||||
$rrd_optionsb .= ' LINE1.25:dout' . $format . 'X#666666:';
|
||||
}
|
||||
|
||||
if (! $args['nototal']) {
|
||||
if (! $nototal) {
|
||||
$rrd_options .= ' CDEF:inB=' . $in_thing . $pluses;
|
||||
$rrd_options .= ' CDEF:outB=' . $out_thing . $pluses;
|
||||
$rrd_options .= ' CDEF:octets=inB,outB,+';
|
||||
|
@@ -42,6 +42,6 @@ $colours_in = 'purples';
|
||||
$multiplier = '1';
|
||||
$colours_out = 'oranges';
|
||||
|
||||
$args['nototal'] = 1;
|
||||
$nototal = 1;
|
||||
|
||||
include 'includes/html/graphs/generic_multi_seperated.inc.php';
|
||||
|
@@ -42,6 +42,6 @@ $colours_in = 'purples';
|
||||
$multiplier = '1';
|
||||
$colours_out = 'oranges';
|
||||
|
||||
$args['nototal'] = 1;
|
||||
$nototal = 1;
|
||||
|
||||
include 'includes/html/graphs/generic_multi_seperated.inc.php';
|
||||
|
Reference in New Issue
Block a user