From ca96d794e2d810afb1735ca79cb23874d22ca705 Mon Sep 17 00:00:00 2001 From: Omar Ahmad Date: Tue, 10 Sep 2019 14:30:38 -0400 Subject: [PATCH] Units: Adding T,P,E,Z,and Y bytes (#18706) * Adding T and P for bytes Luckily, all the hard work was done before; just added in these prefixes for our production environment. * Future-proofing with other values (why not?) * Yottaflops? * Cutting back down to Peta sizes, except for hashes --- .../grafana-ui/src/utils/valueFormats/categories.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/grafana-ui/src/utils/valueFormats/categories.ts b/packages/grafana-ui/src/utils/valueFormats/categories.ts index fafa2bdd76d..8f314cef65b 100644 --- a/packages/grafana-ui/src/utils/valueFormats/categories.ts +++ b/packages/grafana-ui/src/utils/valueFormats/categories.ts @@ -75,6 +75,8 @@ export const getCategories = (): ValueFormatCategory[] => [ { name: 'TFLOP/s', id: 'tflops', fn: decimalSIPrefix('FLOP/s', 4) }, { name: 'PFLOP/s', id: 'pflops', fn: decimalSIPrefix('FLOP/s', 5) }, { name: 'EFLOP/s', id: 'eflops', fn: decimalSIPrefix('FLOP/s', 6) }, + { name: 'ZFLOP/s', id: 'zflops', fn: decimalSIPrefix('FLOP/s', 7) }, + { name: 'YFLOP/s', id: 'yflops', fn: decimalSIPrefix('FLOP/s', 8) }, ], }, { @@ -123,6 +125,8 @@ export const getCategories = (): ValueFormatCategory[] => [ { name: 'kibibytes', id: 'kbytes', fn: binarySIPrefix('B', 1) }, { name: 'mebibytes', id: 'mbytes', fn: binarySIPrefix('B', 2) }, { name: 'gibibytes', id: 'gbytes', fn: binarySIPrefix('B', 3) }, + { name: 'tebibytes', id: 'tbytes', fn: binarySIPrefix('B', 4) }, + { name: 'pebibytes', id: 'pbytes', fn: binarySIPrefix('B', 5) }, ], }, { @@ -133,6 +137,8 @@ export const getCategories = (): ValueFormatCategory[] => [ { name: 'kilobytes', id: 'deckbytes', fn: decimalSIPrefix('B', 1) }, { name: 'megabytes', id: 'decmbytes', fn: decimalSIPrefix('B', 2) }, { name: 'gigabytes', id: 'decgbytes', fn: decimalSIPrefix('B', 3) }, + { name: 'terabytes', id: 'dectbytes', fn: decimalSIPrefix('B', 4) }, + { name: 'petabytes', id: 'decpbytes', fn: decimalSIPrefix('B', 5) }, ], }, { @@ -147,6 +153,10 @@ export const getCategories = (): ValueFormatCategory[] => [ { name: 'megabits/sec', id: 'Mbits', fn: decimalSIPrefix('bps', 2) }, { name: 'gigabytes/sec', id: 'GBs', fn: decimalSIPrefix('Bs', 3) }, { name: 'gigabits/sec', id: 'Gbits', fn: decimalSIPrefix('bps', 3) }, + { name: 'terabytes/sec', id: 'TBs', fn: decimalSIPrefix('Bs', 4) }, + { name: 'terabits/sec', id: 'Gbits', fn: decimalSIPrefix('bps', 4) }, + { name: 'petabytes/sec', id: 'PBs', fn: decimalSIPrefix('Bs', 5) }, + { name: 'petabits/sec', id: 'Pbits', fn: decimalSIPrefix('bps', 5) }, ], }, {