From d85dbd11aeaa77d8cbe0ac1a0b5c025011cf330b Mon Sep 17 00:00:00 2001 From: Jason Lowe Date: Tue, 25 Apr 2017 17:30:42 -0500 Subject: [PATCH] HDFS-11691. Add a proper scheme to the datanode links in NN web UI. Contributed by Kihwal Lee (cherry picked from commit e4321ec84321672a714419278946fe1012daac71) --- .../hadoop-hdfs/src/main/webapps/hdfs/dfshealth.html | 2 +- .../hadoop-hdfs/src/main/webapps/hdfs/dfshealth.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/dfshealth.html b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/dfshealth.html index fbea3440d46..549fc7555d9 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/dfshealth.html +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/dfshealth.html @@ -316,7 +316,7 @@ {#LiveNodes} {name} ({xferaddr}) - {dnWebAddress} + {dnWebAddress} {lastContact}s
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 9025aacfaff..f2b8ac3cc22 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 @@ -215,9 +215,9 @@ var port = n.infoAddr.split(":")[1]; var securePort = n.infoSecureAddr.split(":")[1]; var dnHost = n.name.split(":")[0]; - n.dnWebAddress = dnHost + ":" + port; + n.dnWebAddress = "http://" + dnHost + ":" + port; if (securePort != 0) { - n.dnWebAddress = dnHost + ":" + securePort; + n.dnWebAddress = "https://" + dnHost + ":" + securePort; } if (n.adminState === "In Service") {