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;
66export const PDISK_AUTO_RELOAD_INTERVAL = 10 * SECOND ;
77export const VDISK_AUTO_RELOAD_INTERVAL = 10 * SECOND ;
88export 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
912export const MEGABYTE = 1_000_000 ;
1013export const GIGABYTE = 1_000_000_000 ;
1114export 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
99numeral . locale ( i18n . lang ) ;
1010
1111export 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' ) ;
1314} ;
1415
1516export const formatBps = ( bytes ) => formatBytes ( bytes ) + '/s' ;
You can’t perform that action at this time.
0 commit comments