RRD graph mouseover information shows up as Mb when unit size is set to MB
The dashboard traffic graph widget shows mouse over information in Mb when the unit size is set to MB
Discussion about it here and validation
#2 Updated by Joshua Sign 5 months ago
i can confirm
the problem comes when you change from bytes to bits and then bits to bytes.
one temporary workaround :
change /usr/local/www/widgets/widgets/traffic_graphs.widget.php on line 280 :
window.size = <?=json_encode($tg_size)?>;
window.size = <?=json_encode($tg_size)?>*1;
This is because https://github.com/pfsense/pfsense/blob/master/src/usr/local/www/js/traffic-graphs.js#L203 strict check an integer.
And the values comning from post are strings.
Should be casted at first stage, but need more changes to be clean.
#4 Updated by Jared Dillard 5 months ago
It looks like it was introduced in this commit (not that the code before it was perfect): https://github.com/pfsense/pfsense/commit/52229047e723241046a2641efc477a8b48b24dc8
I fixed it in this commit: https://github.com/pfsense/pfsense/commit/e5b43cf8b86586486d951ab1da35b6c45ad6edf6
You can test by toggling the Unit Size from Bits to Bytes and back again, or you can open the console and enter:
and you will see it shows up in a blue color, versus the previous black color. You can also do the same for the following: