hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [40/50] [abbrv] hadoop git commit: YARN-6196. Improve Resource Donut chart with better label in Node page of new YARN UI. Contributed by Akhil PB.
Date Mon, 13 Mar 2017 13:56:52 GMT
YARN-6196. Improve Resource Donut chart with better label in Node page of new YARN UI. Contributed
by Akhil PB.


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

Branch: refs/heads/HADOOP-13345
Commit: e06ff18ab68d23a0f236df8a0603a42367927f3c
Parents: fd26783
Author: Sunil G <sunilg@apache.org>
Authored: Fri Mar 10 16:17:48 2017 +0530
Committer: Sunil G <sunilg@apache.org>
Committed: Fri Mar 10 16:17:48 2017 +0530

----------------------------------------------------------------------
 .../main/webapp/app/helpers/log-files-comma.js  | 10 ++++++++-
 .../app/serializers/yarn-node-container.js      |  2 +-
 .../main/webapp/app/serializers/yarn-node.js    |  4 ++--
 .../main/webapp/app/serializers/yarn-rm-node.js |  4 ++--
 .../src/main/webapp/app/templates/yarn-node.hbs | 23 +++++++++++++-------
 .../main/webapp/app/templates/yarn-nodes.hbs    |  2 +-
 .../webapp/app/templates/yarn-nodes/table.hbs   | 13 ++++++-----
 7 files changed, 37 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/e06ff18a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/helpers/log-files-comma.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/helpers/log-files-comma.js
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/helpers/log-files-comma.js
index 78dcf25..026cd7f 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/helpers/log-files-comma.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/helpers/log-files-comma.js
@@ -35,8 +35,16 @@ export default Ember.Helper.helper(function(params,hash) {
   var containerId = hash.containerId;
   var html = '<td>';
   for (var i = 0; i < logFilesLen; i++) {
+    var logFileName = "";
+    if (logFiles[i]) {
+      if (typeof logFiles[i] === "object" && logFiles[i].containerLogFiles) {
+        logFileName = logFiles[i].containerLogFiles;
+      } else if (typeof logFiles[i] === "string") {
+        logFileName = logFiles[i];
+      }
+    }
     html = html + '<a href="#/yarn-container-log/' + nodeId + '/' +
-        nodeAddr + '/' + containerId + '/' + logFiles[i] + '">' + logFiles[i] +
+        nodeAddr + '/' + containerId + '/' + logFileName + '">' + logFileName +
         '</a>';
     if (i !== logFilesLen - 1) {
       html = html + ",";

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e06ff18a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-node-container.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-node-container.js
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-node-container.js
index 7e78987..7bcb655 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-node-container.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-node-container.js
@@ -30,7 +30,7 @@ export default DS.JSONAPISerializer.extend({
         containerId: payload.id,
         state: payload.state,
         user: payload.user,
-        diagnostics: payload.diagnostics,
+        diagnostics: payload.diagnostics || 'N/A',
         exitCode: payload.exitCode,
         totalMemoryNeeded: payload.totalMemoryNeededMB,
         totalVCoresNeeded: payload.totalVCoresNeeded,

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e06ff18a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-node.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-node.js
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-node.js
index 0d9faec..10521e6 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-node.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-node.js
@@ -36,8 +36,8 @@ export default DS.JSONAPISerializer.extend({
         pmemCheckEnabled: payload.pmemCheckEnabled,
         nodeHealthy: payload.nodeHealthy,
         lastNodeUpdateTime: Converter.timeStampToDate(payload.lastNodeUpdateTime),
-        healthReport: payload.healthReport,
-        nmStartupTime: Converter.timeStampToDate(payload.nmStartupTime),
+        healthReport: payload.healthReport || 'N/A',
+        nmStartupTime: payload.nmStartupTime? Converter.timeStampToDate(payload.nmStartupTime)
: '',
         nodeManagerBuildVersion: payload.nodeManagerBuildVersion,
         hadoopBuildVersion: payload.hadoopBuildVersion
       }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e06ff18a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-rm-node.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-rm-node.js
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-rm-node.js
index ad50621..1c6d1be 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-rm-node.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-rm-node.js
@@ -34,7 +34,7 @@ export default DS.JSONAPISerializer.extend({
         nodeHostName: payload.nodeHostName,
         nodeHTTPAddress: payload.nodeHTTPAddress,
         lastHealthUpdate: Converter.timeStampToDate(payload.lastHealthUpdate),
-        healthReport: payload.healthReport,
+        healthReport: payload.healthReport || 'N/A',
         numContainers: payload.numContainers,
         usedMemoryMB: payload.usedMemoryMB,
         availMemoryMB: payload.availMemoryMB,
@@ -57,7 +57,7 @@ export default DS.JSONAPISerializer.extend({
   normalizeArrayResponse(store, primaryModelClass, payload/*, id, requestType*/) {
     // expected response is of the form { data: [ {}, {} ] }
     var normalizedArrayResponse = {};
-    if (payload.nodes) {
+    if (payload.nodes && payload.nodes.node) {
       // payload is of the form { "nodes": { "node": [ {},{},{} ]  } }
       normalizedArrayResponse.data = payload.nodes.node.map(singleNode => {
         return this.internalNormalizeSingleResponse(store, primaryModelClass,

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e06ff18a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-node.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-node.hbs
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-node.hbs
index b7f727a..1e8549b 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-node.hbs
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-node.hbs
@@ -28,7 +28,7 @@
       <div class="row">
         <div class="col-md-12 container-fluid">
           <div class="panel panel-default">
-          <div class="panel-heading">Node Information</div>
+          <div class="panel-heading">Node Information: {{model.rmNode.id}}</div>
           <table class="table">
             <tbody>
             <tr>
@@ -63,10 +63,12 @@
               <td>Node Health Report</td>
               <td>{{model.node.healthReport}}</td>
             </tr>
-            <tr>
-              <td>Node Manager Start Time</td>
-              <td>{{model.node.nmStartupTime}}</td>
-            </tr>
+            {{#if model.node.nmStartupTime}}
+              <tr>
+                <td>Node Manager Start Time</td>
+                <td>{{model.node.nmStartupTime}}</td>
+              </tr>
+            {{/if}}
             <tr>
               <td>Node Manager Version</td>
               <td>{{model.node.nodeManagerBuildVersion}}</td>
@@ -82,22 +84,25 @@
       </div>
 
       <div class="row">
-        <div class="col-lg-5 container-fluid">
+        <div class="col-lg-6 container-fluid">
           <div class="panel panel-default">
             <div class="panel-heading">
-              Resource - Memory (in MB)
+              Resource - Memory
             </div>
             <div class="container-fluid" id="mem-donut-chart">
               {{donut-chart data=model.rmNode.getMemoryDataForDonutChart
               showLabels=true
               parentId="mem-donut-chart"
               ratio=0.6
+              type="memory"
+              colorTargets="good"
+              colorTargetReverse=true
               maxHeight=350}}
             </div>
           </div>
         </div>
 
-        <div class="col-lg-5 container-fluid">
+        <div class="col-lg-6 container-fluid">
           <div class="panel panel-default">
             <div class="panel-heading">
               Resource - VCores
@@ -107,6 +112,8 @@
               showLabels=true
               parentId="vcore-donut-chart"
               ratio=0.6
+              colorTargets="good"
+              colorTargetReverse=true
               maxHeight=350}}
             </div>
           </div>

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e06ff18a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-nodes.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-nodes.hbs
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-nodes.hbs
index 874b3c4..795d00e 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-nodes.hbs
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-nodes.hbs
@@ -29,7 +29,7 @@
           <ul class="nav nav-pills nav-stacked collapse in">
 
             {{#link-to "yarn-nodes.table" tagName="li"}}
-              {{#link-to 'yarn-nodes.table'}}Nodes Table
+              {{#link-to 'yarn-nodes.table'}}Information
               {{/link-to}}
             {{/link-to}}
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e06ff18a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-nodes/table.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-nodes/table.hbs
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-nodes/table.hbs
index 1390906..79d721b 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-nodes/table.hbs
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-nodes/table.hbs
@@ -16,12 +16,13 @@
   limitations under the License.
 --}}
 <div class="row">
-
-  {{#if model.nodes}}
-    {{em-table columns=columns rows=model.nodes}}
-  {{else}}
-    <h4 align="center">No nodes found on this cluster</h4>
-  {{/if}}
+  <div class="col-md-12">
+    {{#if model.nodes}}
+      {{em-table columns=columns rows=model.nodes}}
+    {{else}}
+      <h4 align="center">No nodes found on this cluster</h4>
+    {{/if}}
+  </div>
 </div>
 
 {{outlet}}


---------------------------------------------------------------------
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