tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject tez git commit: TEZ-2712. Tez UI: Display the vertex description in the tooltip of vertex in DAG view UI (sree)
Date Wed, 18 Jan 2017 14:12:25 GMT
Repository: tez
Updated Branches:
  refs/heads/master 6fea794df -> 8ce4621ff


TEZ-2712. Tez UI: Display the vertex description in the tooltip of vertex in DAG view UI (sree)


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

Branch: refs/heads/master
Commit: 8ce4621ff479abfdf4958588fb19bebf6386e9c5
Parents: 6fea794
Author: Sreenath Somarajapuram <sree@apache.org>
Authored: Wed Jan 18 19:42:21 2017 +0530
Committer: Sreenath Somarajapuram <sree@apache.org>
Committed: Wed Jan 18 19:42:21 2017 +0530

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../webapp/app/controllers/dag/graphical.js     |  4 +++
 .../main/webapp/app/controllers/dag/swimlane.js |  4 +++
 tez-ui/src/main/webapp/app/models/vertex.js     |  7 +++++
 .../main/webapp/app/styles/details-page.less    |  6 +++++
 .../main/webapp/app/templates/vertex/index.hbs  | 11 ++++++++
 .../unit/controllers/dag/graphical-test.js      |  1 +
 .../tests/unit/controllers/dag/swimlane-test.js |  1 +
 .../webapp/tests/unit/models/vertex-test.js     | 27 ++++++++++++++++++++
 9 files changed, 62 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/8ce4621f/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index f0cb52e..116bd91 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -169,6 +169,7 @@ ALL CHANGES:
   TEZ-3556. Tez UI: Display query configurations
   TEZ-3496. Tez UI: Optimize display of all tasks table
   TEZ-3571. Tez UI: Display a Total Timeline View for Hive Queries
+  TEZ-2712. Tez UI: Display the vertex description in the tooltip of vertex in DAG view UI
 
 Release 0.8.5: Unreleased
 

http://git-wip-us.apache.org/repos/asf/tez/blob/8ce4621f/tez-ui/src/main/webapp/app/controllers/dag/graphical.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/controllers/dag/graphical.js b/tez-ui/src/main/webapp/app/controllers/dag/graphical.js
index 535f32b..c55ab8b 100644
--- a/tez-ui/src/main/webapp/app/controllers/dag/graphical.js
+++ b/tez-ui/src/main/webapp/app/controllers/dag/graphical.js
@@ -76,6 +76,10 @@ export default MultiTableController.extend({
       type: 'duration'
     }
   },{
+    id: 'description',
+    headerTitle: 'Description',
+    contentPath: 'description',
+  },{
     id: 'firstTaskStartTime',
     headerTitle: 'First Task Start Time',
     contentPath: 'firstTaskStartTime',

http://git-wip-us.apache.org/repos/asf/tez/blob/8ce4621f/tez-ui/src/main/webapp/app/controllers/dag/swimlane.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/controllers/dag/swimlane.js b/tez-ui/src/main/webapp/app/controllers/dag/swimlane.js
index 68f1410..8793992 100644
--- a/tez-ui/src/main/webapp/app/controllers/dag/swimlane.js
+++ b/tez-ui/src/main/webapp/app/controllers/dag/swimlane.js
@@ -73,6 +73,10 @@ export default MultiTableController.extend({
       type: 'duration'
     }
   },{
+    id: 'description',
+    headerTitle: 'Description',
+    contentPath: 'description',
+  },{
     id: 'firstTaskStartTime',
     headerTitle: 'First Task Start Time',
     contentPath: 'firstTaskStartTime',

http://git-wip-us.apache.org/repos/asf/tez/blob/8ce4621f/tez-ui/src/main/webapp/app/models/vertex.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/models/vertex.js b/tez-ui/src/main/webapp/app/models/vertex.js
index f0d9cca..a0ffd34 100644
--- a/tez-ui/src/main/webapp/app/models/vertex.js
+++ b/tez-ui/src/main/webapp/app/models/vertex.js
@@ -145,5 +145,12 @@ export default AMTimelineModel.extend({
   dagID: DS.attr('string'),
   dag: DS.attr('object'), // Auto-loaded by need
 
+  description: Ember.computed("dag.vertices", "name", function () {
+    try {
+      let vertex = this.get("dag.vertices").findBy("vertexName", this.get("name"));
+      return JSON.parse(vertex.userPayloadAsText).desc;
+    }catch(e) {}
+  }),
+
   servicePlugin: DS.attr('object'),
 });

http://git-wip-us.apache.org/repos/asf/tez/blob/8ce4621f/tez-ui/src/main/webapp/app/styles/details-page.less
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/styles/details-page.less b/tez-ui/src/main/webapp/app/styles/details-page.less
index 54380e2..48f2b82 100644
--- a/tez-ui/src/main/webapp/app/styles/details-page.less
+++ b/tez-ui/src/main/webapp/app/styles/details-page.less
@@ -63,3 +63,9 @@
     padding: 5px;
   }
 }
+
+.panel {
+  .panel-body {
+    word-wrap: break-word;
+  }
+}

http://git-wip-us.apache.org/repos/asf/tez/blob/8ce4621f/tez-ui/src/main/webapp/app/templates/vertex/index.hbs
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/templates/vertex/index.hbs b/tez-ui/src/main/webapp/app/templates/vertex/index.hbs
index f7bc5c4..ff4f4fb 100644
--- a/tez-ui/src/main/webapp/app/templates/vertex/index.hbs
+++ b/tez-ui/src/main/webapp/app/templates/vertex/index.hbs
@@ -152,6 +152,17 @@
     </table>
   {{/if}}
 
+  {{#if model.description}}
+    <div class="panel panel-info">
+      <div class="panel-heading">
+        Description
+      </div>
+      <div class="panel-body">
+        {{{model.description}}}
+      </div>
+    </div>
+  {{/if}}
+
   {{#if model.diagnostics}}
     <div class="panel panel-danger">
       <div class="panel-heading">

http://git-wip-us.apache.org/repos/asf/tez/blob/8ce4621f/tez-ui/src/main/webapp/tests/unit/controllers/dag/graphical-test.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/tests/unit/controllers/dag/graphical-test.js b/tez-ui/src/main/webapp/tests/unit/controllers/dag/graphical-test.js
index 6b7ecb6..9c3e79a 100644
--- a/tez-ui/src/main/webapp/tests/unit/controllers/dag/graphical-test.js
+++ b/tez-ui/src/main/webapp/tests/unit/controllers/dag/graphical-test.js
@@ -40,6 +40,7 @@ test('Basic creation test', function(assert) {
   assert.ok(controller.columnSelectorTitle);
   assert.ok(controller.breadcrumbs);
   assert.ok(controller.columns);
+  assert.equal(controller.columns.length, 14);
 
   assert.ok(controller.redirect);
   assert.ok(controller.actions.entityClicked);

http://git-wip-us.apache.org/repos/asf/tez/blob/8ce4621f/tez-ui/src/main/webapp/tests/unit/controllers/dag/swimlane-test.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/tests/unit/controllers/dag/swimlane-test.js b/tez-ui/src/main/webapp/tests/unit/controllers/dag/swimlane-test.js
index 48c96a2..6f20795 100644
--- a/tez-ui/src/main/webapp/tests/unit/controllers/dag/swimlane-test.js
+++ b/tez-ui/src/main/webapp/tests/unit/controllers/dag/swimlane-test.js
@@ -39,6 +39,7 @@ test('Basic creation test', function(assert) {
   assert.ok(controller.zoom);
   assert.ok(controller.breadcrumbs);
   assert.ok(controller.columns);
+  assert.equal(controller.columns.length, 13);
   assert.ok(controller.processes);
 
   assert.ok(controller.dataAvailable);

http://git-wip-us.apache.org/repos/asf/tez/blob/8ce4621f/tez-ui/src/main/webapp/tests/unit/models/vertex-test.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/tests/unit/models/vertex-test.js b/tez-ui/src/main/webapp/tests/unit/models/vertex-test.js
index a4c1ce9..c5c6cd2 100644
--- a/tez-ui/src/main/webapp/tests/unit/models/vertex-test.js
+++ b/tez-ui/src/main/webapp/tests/unit/models/vertex-test.js
@@ -44,6 +44,11 @@ test('Basic creation test', function(assert) {
 
   assert.ok(model.finalStatus);
 
+  assert.ok(model.dagID);
+  assert.ok(model.dag);
+
+  assert.ok(model.description);
+
   assert.ok(model.servicePlugin);
 });
 
@@ -69,3 +74,25 @@ test('pendingTasks test', function(assert) {
     assert.equal(model.get("pendingTasks"), 1);
   });
 });
+
+test('description test', function(assert) {
+  let testVertexName = "TestVertexName",
+      testDesc = "VertexDecsription",
+      model = this.subject({
+        name: testVertexName
+      });
+
+  assert.equal(model.get("description"), undefined);
+
+  Ember.run(function () {
+    model.set("dag", Ember.Object.create({
+      vertices: [{}, {
+        vertexName: testVertexName,
+        userPayloadAsText: JSON.stringify({
+          desc: testDesc
+        })
+      }, {}]
+    }));
+    assert.equal(model.get("description"), testDesc);
+  });
+});


Mime
View raw message