Commit 505f0f65 by Torkel Ödegaard

updated change log with PR #545

parent 8262a8de
...@@ -3,6 +3,10 @@ vNext ...@@ -3,6 +3,10 @@ vNext
**Changes** **Changes**
- Use unix epoch for Graphite from/to for absolute time ranges (Closes #536) - Use unix epoch for Graphite from/to for absolute time ranges (Closes #536)
**Fixes**
- Fix formatting negative values (PR #545)
# 1.6.1 (2014-06-24) # 1.6.1 (2014-06-24)
**New features or improvements** **New features or improvements**
......
...@@ -26,52 +26,52 @@ function($, _, moment) { ...@@ -26,52 +26,52 @@ function($, _, moment) {
kbn.round_interval = function(interval) { kbn.round_interval = function(interval) {
switch (true) { switch (true) {
// 0.5s // 0.5s
case (Math.abs(interval) <= 500): case (interval <= 500):
return 100; // 0.1s return 100; // 0.1s
// 5s // 5s
case (Math.abs(interval) <= 5000): case (interval <= 5000):
return 1000; // 1s return 1000; // 1s
// 7.5s // 7.5s
case (Math.abs(interval) <= 7500): case (interval <= 7500):
return 5000; // 5s return 5000; // 5s
// 15s // 15s
case (Math.abs(interval) <= 15000): case (interval <= 15000):
return 10000; // 10s return 10000; // 10s
// 45s // 45s
case (Math.abs(interval) <= 45000): case (interval <= 45000):
return 30000; // 30s return 30000; // 30s
// 3m // 3m
case (Math.abs(interval) <= 180000): case (interval <= 180000):
return 60000; // 1m return 60000; // 1m
// 9m // 9m
case (Math.abs(interval) <= 450000): case (interval <= 450000):
return 300000; // 5m return 300000; // 5m
// 20m // 20m
case (Math.abs(interval) <= 1200000): case (interval <= 1200000):
return 600000; // 10m return 600000; // 10m
// 45m // 45m
case (Math.abs(interval) <= 2700000): case (interval <= 2700000):
return 1800000; // 30m return 1800000; // 30m
// 2h // 2h
case (Math.abs(interval) <= 7200000): case (interval <= 7200000):
return 3600000; // 1h return 3600000; // 1h
// 6h // 6h
case (Math.abs(interval) <= 21600000): case (interval <= 21600000):
return 10800000; // 3h return 10800000; // 3h
// 24h // 24h
case (Math.abs(interval) <= 86400000): case (interval <= 86400000):
return 43200000; // 12h return 43200000; // 12h
// 48h // 48h
case (Math.abs(interval) <= 172800000): case (interval <= 172800000):
return 86400000; // 24h return 86400000; // 24h
// 1w // 1w
case (Math.abs(interval) <= 604800000): case (interval <= 604800000):
return 86400000; // 24h return 86400000; // 24h
// 3w // 3w
case (Math.abs(interval) <= 1814400000): case (interval <= 1814400000):
return 604800000; // 1w return 604800000; // 1w
// 2y // 2y
case (Math.abs(interval) < 3628800000): case (interval < 3628800000):
return 2592000000; // 30d return 2592000000; // 30d
default: default:
return 31536000000; // 1y return 31536000000; // 1y
......
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