Commit 31e52719 by Torkel Ödegaard

Fixed number formating issue when InfluxDB return MAX float64, Fixes #1402

parent 8c977e37
......@@ -326,11 +326,15 @@ function($, _, moment) {
}
var steps = 0;
var limit = extArray.length;
while (Math.abs(size) >= factor) {
steps++;
size /= factor;
if (steps >= limit) { return "NA"; }
}
if (steps > 0) {
decimals = scaledDecimals + (3 * steps);
}
......
......@@ -25,6 +25,7 @@ define([
describeValueFormat('none', 2.75e-10, 0, 10, '3e-10');
describeValueFormat('none', 0, 0, 2, '0');
describeValueFormat('bytes', -1.57e+308, -1.57e+308, 2, 'NA');
describeValueFormat('ns', 25, 1, 0, '25 ns');
describeValueFormat('ns', 2558, 50, 0, '2.56 µs');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment