From 531586bebafe80f25c63a00d42f8bd2a9180ac2b Mon Sep 17 00:00:00 2001 From: Jon Skarpeteig Date: Thu, 5 Oct 2017 13:34:07 +0200 Subject: [PATCH 1/3] Add Norwegian Krone denominator for currency See http://www.xe.com/symbols.php for currency symbols reference --- public/app/core/utils/kbn.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/app/core/utils/kbn.js b/public/app/core/utils/kbn.js index 8947ce5a902..1782e76ca23 100644 --- a/public/app/core/utils/kbn.js +++ b/public/app/core/utils/kbn.js @@ -402,6 +402,7 @@ function($, _, moment) { kbn.valueFormats.currencyRUB = kbn.formatBuilders.currency('₽'); kbn.valueFormats.currencyUAH = kbn.formatBuilders.currency('₴'); kbn.valueFormats.currencyBRL = kbn.formatBuilders.currency('R$'); + kbn.valueFormats.currencyNOK = kbn.formatBuilders.currency('kr'); // Data (Binary) kbn.valueFormats.bits = kbn.formatBuilders.binarySIPrefix('b'); @@ -756,6 +757,7 @@ function($, _, moment) { {text: 'Rubles (₽)', value: 'currencyRUB'}, {text: 'Hryvnias (₴)', value: 'currencyUAH'}, {text: 'Real (R$)', value: 'currencyBRL'}, + {text: 'Norwegian Krone (kr)', value: 'currencyNOK'}, ] }, { From 7479c82687892ff1d853bb0d6e50498d0f132aa0 Mon Sep 17 00:00:00 2001 From: Jon Skarpeteig Date: Thu, 5 Oct 2017 13:44:23 +0200 Subject: [PATCH 2/3] Update kbn.js Adding the other kr currencies not to offend any maintainers --- public/app/core/utils/kbn.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/public/app/core/utils/kbn.js b/public/app/core/utils/kbn.js index 1782e76ca23..f7029f9bdd4 100644 --- a/public/app/core/utils/kbn.js +++ b/public/app/core/utils/kbn.js @@ -402,7 +402,10 @@ function($, _, moment) { kbn.valueFormats.currencyRUB = kbn.formatBuilders.currency('₽'); kbn.valueFormats.currencyUAH = kbn.formatBuilders.currency('₴'); kbn.valueFormats.currencyBRL = kbn.formatBuilders.currency('R$'); + kbn.valueFormats.currencyDKK = kbn.formatBuilders.currency('kr'); + kbn.valueFormats.currencyISK = kbn.formatBuilders.currency('kr'); kbn.valueFormats.currencyNOK = kbn.formatBuilders.currency('kr'); + kbn.valueFormats.currencySEK = kbn.formatBuilders.currency('kr'); // Data (Binary) kbn.valueFormats.bits = kbn.formatBuilders.binarySIPrefix('b'); @@ -757,7 +760,11 @@ function($, _, moment) { {text: 'Rubles (₽)', value: 'currencyRUB'}, {text: 'Hryvnias (₴)', value: 'currencyUAH'}, {text: 'Real (R$)', value: 'currencyBRL'}, + {text: 'Danish Krone (kr)', value: 'currencyDKK'}, + {text: 'Icelandic Krone (kr)', value: 'currencyISK'}, {text: 'Norwegian Krone (kr)', value: 'currencyNOK'}, + {text: 'Swedish Krone (kr)', value: 'currencySEK'}, + ] }, { From 789473fd34674a29ce224af7974e270bab651d84 Mon Sep 17 00:00:00 2001 From: Jon Skarpeteig Date: Thu, 5 Oct 2017 13:46:42 +0200 Subject: [PATCH 3/3] Lint fix --- public/app/core/utils/kbn.js | 1 - 1 file changed, 1 deletion(-) diff --git a/public/app/core/utils/kbn.js b/public/app/core/utils/kbn.js index f7029f9bdd4..1daaa2f8ba3 100644 --- a/public/app/core/utils/kbn.js +++ b/public/app/core/utils/kbn.js @@ -764,7 +764,6 @@ function($, _, moment) { {text: 'Icelandic Krone (kr)', value: 'currencyISK'}, {text: 'Norwegian Krone (kr)', value: 'currencyNOK'}, {text: 'Swedish Krone (kr)', value: 'currencySEK'}, - ] }, {