From 09a0ef2013eecb12864b71ea324e645576049a56 Mon Sep 17 00:00:00 2001 From: Ties Bos Date: Sun, 11 Jan 2015 22:19:59 -0800 Subject: [PATCH] Add Bps support, much like bps --- src/app/components/kbn.js | 1 + src/app/panels/graph/axisEditor.html | 4 ++-- src/app/panels/graph/graph.js | 3 +++ src/app/panels/singlestat/editor.html | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/app/components/kbn.js b/src/app/components/kbn.js index aedfbb90f17..63c785b9ff5 100644 --- a/src/app/components/kbn.js +++ b/src/app/components/kbn.js @@ -363,6 +363,7 @@ function($, _, moment) { kbn.valueFormats.bits = kbn.formatFuncCreator(1024, [' b', ' Kib', ' Mib', ' Gib', ' Tib', ' Pib', ' Eib', ' Zib', ' Yib']); kbn.valueFormats.bytes = kbn.formatFuncCreator(1024, [' B', ' KiB', ' MiB', ' GiB', ' TiB', ' PiB', ' EiB', ' ZiB', ' YiB']); kbn.valueFormats.bps = kbn.formatFuncCreator(1000, [' bps', ' Kbps', ' Mbps', ' Gbps', ' Tbps', ' Pbps', ' Ebps', ' Zbps', ' Ybps']); + kbn.valueFormats.Bps = kbn.formatFuncCreator(1000, [' Bps', ' KBps', ' MBps', ' GBps', ' TBps', ' PBps', ' EBps', ' ZBps', ' YBps']); kbn.valueFormats.short = kbn.formatFuncCreator(1000, ['', ' K', ' Mil', ' Bil', ' Tri', ' Qaudr', ' Quint', ' Sext', ' Sept']); kbn.valueFormats.none = kbn.toFixed; diff --git a/src/app/panels/graph/axisEditor.html b/src/app/panels/graph/axisEditor.html index 9965d7ff2f2..45282baaa11 100644 --- a/src/app/panels/graph/axisEditor.html +++ b/src/app/panels/graph/axisEditor.html @@ -4,7 +4,7 @@
Left Y Axis
- +
@@ -23,7 +23,7 @@
Right Y Axis
- +
diff --git a/src/app/panels/graph/graph.js b/src/app/panels/graph/graph.js index 48bd68c9483..b4934a7354c 100755 --- a/src/app/panels/graph/graph.js +++ b/src/app/panels/graph/graph.js @@ -418,6 +418,9 @@ function (angular, $, kbn, moment, _, GraphTooltip) { case 'bps': url += '&yUnitSystem=si'; break; + case 'Bps': + url += '&yUnitSystem=si'; + break; case 'short': url += '&yUnitSystem=si'; break; diff --git a/src/app/panels/singlestat/editor.html b/src/app/panels/singlestat/editor.html index 2460571a4b3..6c83c5ab821 100644 --- a/src/app/panels/singlestat/editor.html +++ b/src/app/panels/singlestat/editor.html @@ -39,7 +39,7 @@
Formats
- +