Skip to content

Commit 584bbfa

Browse files
zavarkogmergify-bot
authored andcommitted
SI binary prefix fix (ki => Ki)
(cherry picked from commit 135260e) (cherry picked from commit 928820b) (cherry picked from commit 2189d5b)
1 parent 2efeca4 commit 584bbfa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

deps/rabbitmq_management/priv/www/js/formatters.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ function fmt_si_prefix(num0, max0, binary, allow_fractions) {
3333
var max = num_power[1];
3434
var power = num_power[2];
3535
var powers = ['', 'k', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y'];
36-
var suffix = powers[power] + ((power != 0 && binary) ? 'i' : '');
36+
var suffix = powers[power];
37+
if (power != 0 && binary) {
38+
suffix = suffix.toUpperCase() + 'i';
39+
}
40+
3741
return (((power != 0 || allow_fractions) && max <= 10) ? num.toFixed(1) :
3842
num.toFixed(0)) + " " + suffix;
3943
}

0 commit comments

Comments
 (0)