This is an automated email from the ASF dual-hosted git repository.
liuml07 pushed a commit to branch HADOOP-17800
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/HADOOP-17800 by this push:
new f5e9b6861a0 HADOOP-18209. In Namenode UI Links are not working proper
and port were displaying wrong in UI IPv6 (#4184)
f5e9b6861a0 is described below
commit f5e9b6861a0bb5012dd865839581415e485cb84f
Author: Renukaprasad C <[email protected]>
AuthorDate: Tue Apr 19 03:24:54 2022 +0530
HADOOP-18209. In Namenode UI Links are not working proper and port were
displaying wrong in UI IPv6 (#4184)
Contributed by Renukaprasad C.
Signed-off-by: Mingliang Liu <[email protected]>
---
hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/dfshealth.js | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/dfshealth.js
b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/dfshealth.js
index 9be19fefca9..9a6bf6f5a3a 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/dfshealth.js
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/dfshealth.js
@@ -227,8 +227,10 @@
var n = nodes[i];
n.usedPercentage = Math.round((n.used + n.nonDfsUsedSpace) * 1.0 /
n.capacity * 100);
- var port = n.infoAddr.split(":")[1];
- var securePort = n.infoSecureAddr.split(":")[1];
+ var array = n.infoAddr.split(":");
+ var port = array[array.length-1];
+ array = n.infoSecureAddr.split(":");
+ var securePort = array[array.length-1];
var dnHost = n.name.split(":")[0];
n.dnWebAddress = "http://" + dnHost + ":" + port;
if (securePort != 0) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]