hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [24/50] [abbrv] hadoop git commit: HDFS-11198. NN UI should link DN web address using hostnames. Contributed by Weiwei Yang.
Date Thu, 08 Dec 2016 22:29:31 GMT
HDFS-11198. NN UI should link DN web address using hostnames. Contributed by  Weiwei Yang.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/4dd4f3a4
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/4dd4f3a4
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/4dd4f3a4

Branch: refs/heads/HADOOP-13345
Commit: 4dd4f3a4bb483795e8669ec34d3efcd6c1b8b465
Parents: 7b988e8
Author: Kihwal Lee <kihwal@apache.org>
Authored: Tue Dec 6 08:06:50 2016 -0600
Committer: Kihwal Lee <kihwal@apache.org>
Committed: Tue Dec 6 08:06:50 2016 -0600

----------------------------------------------------------------------
 .../hadoop-hdfs/src/main/webapps/hdfs/dfshealth.html    |  8 +-------
 .../hadoop-hdfs/src/main/webapps/hdfs/dfshealth.js      | 12 ++++++------
 2 files changed, 7 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/4dd4f3a4/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/dfshealth.html
----------------------------------------------------------------------
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 13569fe..3598c80 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
@@ -314,13 +314,7 @@
   {#LiveNodes}
   <tr>
     <td ng-value="{state}-{name}" class="dfshealth-node-icon dfshealth-node-{state}">{name}
({xferaddr})</td>
-    <td ng-value="{state}-{name}">
-    {@select key=secureMode}
-      {@eq value="off"}<a href='//{infoAddr}'>{infoAddr}</a>{/eq}
-      {@eq value="on"}<a href='//{infoSecureAddr}'>{infoSecureAddr}</a>{/eq}
-      {@default}<a href='//{infoAddr}'>{infoAddr}</a>{/default}
-    {/select}
-    </td>
+    <td ng-value="{state}-{name}"><a href='//{dnWebAddress}'>{dnWebAddress}</a></td>
     <td ng-value="{lastContact}">{lastContact}s</td>
     <td ng-value="{usedPercentage}">
       <div>

http://git-wip-us.apache.org/repos/asf/hadoop/blob/4dd4f3a4/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/dfshealth.js
----------------------------------------------------------------------
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 f230b0f..02aa895 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
@@ -212,12 +212,12 @@
           var n = nodes[i];
           n.usedPercentage = Math.round((n.used + n.nonDfsUsedSpace) * 1.0 / n.capacity *
100);
 
-          var addr = n.infoSecureAddr;
-          var position = addr.lastIndexOf(":");
-          var port = addr.substring(position + 1, addr.length);
-          n.secureMode = "off";
-          if (port != 0) {
-            n.secureMode = "on";
+          var port = n.infoAddr.split(":")[1];
+          var securePort = n.infoSecureAddr.split(":")[1];
+          var dnHost = n.name.split(":")[0];
+          n.dnWebAddress = dnHost + ":" + port;
+          if (securePort != 0) {
+            n.dnWebAddress = dnHost + ":" + securePort;
           }
 
           if (n.adminState === "In Service") {


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message