This commit is contained in:
parent
2a8aad92d6
commit
0fe00bce50
|
@ -4,9 +4,9 @@ module StatisticsHelper
|
|||
def data_format_string num
|
||||
result = num
|
||||
if num < 1024 * 1024
|
||||
result = format("%0.3f", (num/1024)) + " GB"
|
||||
result = format("%0.3f", (num/1024)).to_s + " GB"
|
||||
else
|
||||
result = format("%0.3f", (num/(1024*1024))) + " TB"
|
||||
result = format("%0.3f", (num/(1024*1024))).to_s + " TB"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue