You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ae...@apache.org on 2016/06/19 00:33:12 UTC

[33/39] hadoop git commit: HDFS-10493. Add links to datanode web UI in namenode datanodes page. Contributed by Weiwei Yang.

HDFS-10493. Add links to datanode web UI in namenode datanodes page. 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/28006951
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/28006951
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/28006951

Branch: refs/heads/HDFS-1312
Commit: 280069510b71d81a150b2b28d9fa987891d82774
Parents: c35fa4a
Author: Kihwal Lee <ki...@apache.org>
Authored: Fri Jun 17 11:05:44 2016 -0500
Committer: Kihwal Lee <ki...@apache.org>
Committed: Fri Jun 17 11:05:44 2016 -0500

----------------------------------------------------------------------
 .../hadoop-hdfs/src/main/webapps/hdfs/dfshealth.html      |  9 +++++++++
 .../hadoop-hdfs/src/main/webapps/hdfs/dfshealth.js        | 10 ++++++++++
 2 files changed, 19 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/28006951/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 66c0dec..4fa2e4c 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
@@ -300,6 +300,7 @@
   <thead>
     <tr>
       <th>Node</th>
+      <th>Http Address</th>
       <th>Last contact</th>
       <th style="width:180px; text-align:center">Capacity</th>
       <th>Blocks</th>
@@ -310,6 +311,13 @@
   {#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="{lastContact}">{lastContact}s</td>
     <td ng-value="{usedPercentage}">
       <div>
@@ -328,6 +336,7 @@
   {#DeadNodes}
   <tr class="danger">
     <td ng-value="{state}-{name}" class="dfshealth-node-icon dfshealth-node-{state}">{name} ({xferaddr})</td>
+    <td></td>
     <td>{#helper_relative_time value="{lastContact}"/}</td>
     <td></td>
     <td></td>

http://git-wip-us.apache.org/repos/asf/hadoop/blob/28006951/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 e7245df..e2908c0 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
@@ -210,6 +210,15 @@
         for (var i = 0, e = nodes.length; i < e; ++i) {
           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";
+          }
+
           if (n.adminState === "In Service") {
             n.state = "alive";
           } else if (nodes[i].adminState === "Decommission In Progress") {
@@ -249,6 +258,7 @@
             'lengthMenu': [ [25, 50, 100, -1], [25, 50, 100, "All"] ],
             'columns': [
               { 'orderDataType': 'ng-value', 'searchable': true },
+              { 'orderDataType': 'ng-value', 'searchable': true },
               { 'orderDataType': 'ng-value', 'type': 'numeric' },
               { 'orderDataType': 'ng-value', 'type': 'numeric' },
               { 'orderData': 3, 'type': 'numeric' },


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