From 7d91ad3c541b1c28f8ca02b938a0feeaf6522b5f Mon Sep 17 00:00:00 2001 From: Amy0104 <97265214+Amy0104@users.noreply.github.com> Date: Mon, 27 Jun 2022 15:00:48 +0800 Subject: [PATCH] [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] } /**