From 451e917e7de39aa15181e86ac184d1713d501b7b Mon Sep 17 00:00:00 2001 From: hijklmno Date: Mon, 16 May 2016 15:24:31 -0700 Subject: [PATCH 1/2] Add dBm as an option in energy units --- public/app/core/utils/kbn.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/app/core/utils/kbn.js b/public/app/core/utils/kbn.js index 11a544d2708..c70973b84b0 100644 --- a/public/app/core/utils/kbn.js +++ b/public/app/core/utils/kbn.js @@ -396,7 +396,8 @@ function($, _) { kbn.valueFormats.ev = kbn.formatBuilders.decimalSIPrefix('eV'); kbn.valueFormats.amp = kbn.formatBuilders.decimalSIPrefix('A'); kbn.valueFormats.volt = kbn.formatBuilders.decimalSIPrefix('V'); - + kbn.valueFormats.dBm = kbn.formatBuilders.decimalSIPrefix('dBm'); + // Temperature kbn.valueFormats.celsius = kbn.formatBuilders.fixedUnit('°C'); kbn.valueFormats.farenheit = kbn.formatBuilders.fixedUnit('°F'); @@ -677,6 +678,7 @@ function($, _) { {text: 'electron volt (eV)', value: 'ev' }, {text: 'Ampere (A)', value: 'amp' }, {text: 'Volt (V)', value: 'volt' }, + {text: 'Decibel-milliwatt (dBm)', value: 'dBm' }, ] }, { From f1b5a265ab762486e445584f3280cd3a883d8a2f Mon Sep 17 00:00:00 2001 From: hijklmno Date: Mon, 16 May 2016 15:35:42 -0700 Subject: [PATCH 2/2] fix trailing whitespace in kbn.js --- public/app/core/utils/kbn.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/core/utils/kbn.js b/public/app/core/utils/kbn.js index c70973b84b0..9d714c34fb3 100644 --- a/public/app/core/utils/kbn.js +++ b/public/app/core/utils/kbn.js @@ -397,7 +397,7 @@ function($, _) { kbn.valueFormats.amp = kbn.formatBuilders.decimalSIPrefix('A'); kbn.valueFormats.volt = kbn.formatBuilders.decimalSIPrefix('V'); kbn.valueFormats.dBm = kbn.formatBuilders.decimalSIPrefix('dBm'); - + // Temperature kbn.valueFormats.celsius = kbn.formatBuilders.fixedUnit('°C'); kbn.valueFormats.farenheit = kbn.formatBuilders.fixedUnit('°F');