浏览代码

HDFS-11691. Add a proper scheme to the datanode links in NN web UI. Contributed by Kihwal Lee

(cherry picked from commit e4321ec84321672a714419278946fe1012daac71)
Jason Lowe 8 年之前
父节点
当前提交
31af85c18e

+ 1 - 1
hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/dfshealth.html

@@ -319,7 +319,7 @@
   {#LiveNodes}
   <tr>
     <td ng-value="{state}-{name}" class="dfshealth-node-icon dfshealth-node-{state}">{name} ({xferaddr})</td>
-    <td ng-value="{state}-{name}"><a href='//{dnWebAddress}'>{dnWebAddress}</a></td>
+    <td ng-value="{state}-{name}"><a href='{dnWebAddress}'>{dnWebAddress}</a></td>
     <td ng-value="{lastContact}">{lastContact}s</td>
     <td ng-value="{lastBlockReport}">{lastBlockReport}m</td>
     <td ng-value="{usedPercentage}">

+ 2 - 2
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") {