Fix: bps & Bps default scale remains decimal (backwards-compatibility) (#27838)

pull/27867/head
Berbe 5 years ago committed by GitHub
parent c6502afa77
commit 7c0bd29fcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      packages/grafana-data/src/valueFormats/categories.ts
  2. 2
      public/app/plugins/panel/table-old/specs/renderer.test.ts

@ -151,10 +151,10 @@ export const getCategories = (): ValueFormatCategory[] => [
name: 'Data rate',
formats: [
{ name: 'packets/sec', id: 'pps', fn: SIPrefix('p/s') },
{ name: 'bytes/sec(IEC)', id: 'Bps', fn: binaryPrefix('B/s') },
{ name: 'bytes/sec(SI)', id: 'decBps', fn: SIPrefix('B/s') },
{ name: 'bits/sec(IEC)', id: 'bps', fn: binaryPrefix('b/s') },
{ name: 'bits/sec(SI)', id: 'decbps', fn: SIPrefix('b/s') },
{ name: 'bytes/sec(IEC)', id: 'binBps', fn: binaryPrefix('B/s') },
{ name: 'bytes/sec(SI)', id: 'Bps', fn: SIPrefix('B/s') },
{ name: 'bits/sec(IEC)', id: 'binbps', fn: binaryPrefix('b/s') },
{ name: 'bits/sec(SI)', id: 'bps', fn: SIPrefix('b/s') },
{ name: 'kibibytes/sec', id: 'KiBs', fn: binaryPrefix('B/s', 1) },
{ name: 'kibibits/sec', id: 'Kibits', fn: binaryPrefix('b/s', 1) },
{ name: 'kilobytes/sec', id: 'KBs', fn: SIPrefix('B/s', 1) },

@ -33,7 +33,7 @@ describe('when rendering table', () => {
{ text: 'Colored' },
{ text: 'Undefined' },
{ text: 'String' },
{ text: 'United', unit: 'decbps' },
{ text: 'United', unit: 'bps' },
{ text: 'Sanitized' },
{ text: 'Link' },
{ text: 'Array' },

Loading…
Cancel
Save