This is an automated email from the ASF dual-hosted git repository.

wanggenhua pushed a commit to branch 2.0.6-prepare
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/2.0.6-prepare by this push:
     new 7d91ad3c54 [Fix][UI] Fix bytesToSize function calculation error. 
(#10628)
7d91ad3c54 is described below

commit 7d91ad3c541b1c28f8ca02b938a0feeaf6522b5f
Author: Amy0104 <[email protected]>
AuthorDate: Mon Jun 27 15:00:48 2022 +0800

    [Fix][UI] Fix bytesToSize function calculation error. (#10628)
---
 dolphinscheduler-ui/src/js/module/util/util.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dolphinscheduler-ui/src/js/module/util/util.js 
b/dolphinscheduler-ui/src/js/module/util/util.js
index 49e3bb2ee8..59bab4f889 100644
--- a/dolphinscheduler-ui/src/js/module/util/util.js
+++ b/dolphinscheduler-ui/src/js/module/util/util.js
@@ -24,7 +24,7 @@ const bytesToSize = (bytes) => {
   const sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']
   const i = Math.floor(Math.log(bytes) / Math.log(k))
 
-  return parseInt((bytes / Math.pow(k, i)).toPrecision(3)) + ' ' + sizes[i]
+  return parseFloat((bytes / Math.pow(k, i)).toPrecision(3)) + ' ' + sizes[i]
 }
 
 /**

Reply via email to