Fix graphs showing bps instead of pps (#13266)

* fix issue #13119

try to detect if total_units exists (variable comes from errors.inc.php and nupkts.inc.php ) as 'pps' and define graph units as such.

* standardize units_descr for both ucastpackets and errors
This commit is contained in:
Cupid@zul
2021-09-23 13:43:23 +01:00
committed by GitHub
parent f796396e0b
commit ba84acc1db
2 changed files with 6 additions and 2 deletions

View File

@@ -37,7 +37,11 @@ if ($format == 'octets' || $format == 'bytes') {
$units = 'Bps';
$format = 'bits';
} else {
$units = 'bps';
if (isset($total_units) && $total_units == 'pps') {
$units = 'pps';
} else {
$units = 'bps';
}
$format = 'bits';
}

View File

@@ -19,7 +19,7 @@ $rrd_list[4]['colour_area_in'] = 'FACF5A';
$rrd_list[4]['colour_area_out'] = 'FF5959';
$units = '';
$units_descr = 'Packets';
$units_descr = 'Packets/sec';
$total_units = 'pps';
$colours_in = 'purples';
$multiplier = '1';