HDFS-13844. Fix the fmt_bytes function in the dfs-dust.js. Contributed by yanghuafeng.
(cherry picked from commit a9c1c55cafc0338bb35d2991f217d4157463f1d3) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/19edb89f Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/19edb89f Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/19edb89f Branch: refs/heads/branch-2.9 Commit: 19edb89f9033acc27e16a5ae2aae1373a569ecdc Parents: 9ecb4ba Author: Inigo Goiri <inigo...@apache.org> Authored: Mon Sep 17 14:37:25 2018 -0700 Committer: Inigo Goiri <inigo...@apache.org> Committed: Mon Sep 17 14:40:12 2018 -0700 ---------------------------------------------------------------------- .../hadoop-hdfs/src/main/webapps/static/dfs-dust.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/19edb89f/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/dfs-dust.js ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/dfs-dust.js b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/dfs-dust.js index 1f37d21..2c45bf2 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/dfs-dust.js +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/dfs-dust.js @@ -20,7 +20,7 @@ var filters = { 'fmt_bytes': function (v) { - var UNITS = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'ZB']; + var UNITS = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB']; var prev = 0, i = 0; while (Math.floor(v) > 0 && i < UNITS.length) { prev = v; @@ -28,7 +28,7 @@ i += 1; } - if (i > 0 && i < UNITS.length) { + if (i > 0) { v = prev; i -= 1; } --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org