diff --git a/public/app/core/utils/kbn.ts b/public/app/core/utils/kbn.ts index 11dccc32907..329b415f1fe 100644 --- a/public/app/core/utils/kbn.ts +++ b/public/app/core/utils/kbn.ts @@ -463,6 +463,15 @@ kbn.valueFormats.Mbits = kbn.formatBuilders.decimalSIPrefix('bps', 2); kbn.valueFormats.GBs = kbn.formatBuilders.decimalSIPrefix('Bs', 3); kbn.valueFormats.Gbits = kbn.formatBuilders.decimalSIPrefix('bps', 3); +// Hash Rate +kbn.valueFormats.Hs = kbn.formatBuilders.decimalSIPrefix('H/s'); +kbn.valueFormats.KHs = kbn.formatBuilders.decimalSIPrefix('H/s', 1); +kbn.valueFormats.MHs = kbn.formatBuilders.decimalSIPrefix('H/s', 2); +kbn.valueFormats.GHs = kbn.formatBuilders.decimalSIPrefix('H/s', 3); +kbn.valueFormats.THs = kbn.formatBuilders.decimalSIPrefix('H/s', 4); +kbn.valueFormats.PHs = kbn.formatBuilders.decimalSIPrefix('H/s', 5); +kbn.valueFormats.EHs = kbn.formatBuilders.decimalSIPrefix('H/s', 6); + // Throughput kbn.valueFormats.ops = kbn.formatBuilders.simpleCountUnit('ops'); kbn.valueFormats.rps = kbn.formatBuilders.simpleCountUnit('rps'); @@ -878,6 +887,18 @@ kbn.getUnitFormats = function() { { text: 'gigabits/sec', value: 'Gbits' }, ], }, + { + text: 'hash rate', + submenu: [ + {text: 'hashes/sec', value: 'Hs'}, + {text: 'kilohashes/sec', value: 'KHs'}, + {text: 'megahashes/sec', value: 'MHs'}, + {text: 'gigahashes/sec', value: 'GHs'}, + {text: 'terahashes/sec', value: 'THs'}, + {text: 'petahashes/sec', value: 'PHs'}, + {text: 'exahashes/sec', value: 'EHs'}, + ], + }, { text: 'throughput', submenu: [ diff --git a/public/app/plugins/datasource/elasticsearch/partials/bucket_agg.html b/public/app/plugins/datasource/elasticsearch/partials/bucket_agg.html index a180f97c994..d0cf23a3d93 100644 --- a/public/app/plugins/datasource/elasticsearch/partials/bucket_agg.html +++ b/public/app/plugins/datasource/elasticsearch/partials/bucket_agg.html @@ -101,6 +101,7 @@ get-options="getSizeOptions()" on-change="onChangeInternal()" label-mode="true" + allow-custom="true" css-class="width-12">