File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,9 @@ export const GROUP_AUTO_RELOAD_INTERVAL = 10 * SECOND;
6
6
export const PDISK_AUTO_RELOAD_INTERVAL = 10 * SECOND ;
7
7
export const VDISK_AUTO_RELOAD_INTERVAL = 10 * SECOND ;
8
8
export const AUTO_RELOAD_INTERVAL = 10 * SECOND ;
9
+ // by agreement, display all byte values in decimal scale
10
+ // values in data are always in bytes, never in higher units,
11
+ // therefore there is no issue arbitrary converting them in UI
9
12
export const MEGABYTE = 1_000_000 ;
10
13
export const GIGABYTE = 1_000_000_000 ;
11
14
export const TERABYTE = 1_000_000_000_000 ;
Original file line number Diff line number Diff line change @@ -9,7 +9,8 @@ import locales from 'numeral/locales'; // eslint-disable-line no-unused-vars
9
9
numeral . locale ( i18n . lang ) ;
10
10
11
11
export const formatBytes = ( bytes ) => {
12
- return numeral ( bytes ) . format ( '0 ib' ) . replace ( 'i' , '' ) ;
12
+ // by agreement, display byte values in decimal scale
13
+ return numeral ( bytes ) . format ( '0 b' ) ;
13
14
} ;
14
15
15
16
export const formatBps = ( bytes ) => formatBytes ( bytes ) + '/s' ;
You can’t perform that action at this time.
0 commit comments