mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Fixed number formating issue when InfluxDB return MAX float64, Fixes #1402
This commit is contained in:
parent
8c977e37a9
commit
31e5271921
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user