You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tez.apache.org by hi...@apache.org on 2015/02/10 21:44:10 UTC

[2/2] tez git commit: TEZ-2069. Tez UI: appId should link to application in dag details view. (Sreenath Somarajapuram via hitesh)

TEZ-2069. Tez UI: appId should link to application in dag details view. (Sreenath Somarajapuram via hitesh)


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

Branch: refs/heads/master
Commit: 48055300dbcb7dc4c5d0f8105fcb4b772aae176a
Parents: 4ce0b74
Author: Hitesh Shah <hi...@apache.org>
Authored: Tue Feb 10 12:42:05 2015 -0800
Committer: Hitesh Shah <hi...@apache.org>
Committed: Tue Feb 10 12:42:05 2015 -0800

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../app/scripts/controllers/dag_controller.js   | 44 +++++++++++++-------
 tez-ui/src/main/webapp/app/templates/dag.hbs    |  8 +++-
 3 files changed, 36 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/48055300/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index cb4c468..4da24a7 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -57,6 +57,7 @@ Release 0.6.1: Unreleased
 INCOMPATIBLE CHANGES
 
 ALL CHANGES:
+  TEZ-2069. Tez UI: appId should link to application in dag details view.
   TEZ-2063. Tez UI: Flaky log url in tasks table.
   TEZ-2062. Tez UI: Showing 50 elements not working properly.
   TEZ-2056. Tez UI: fix VertexID filter,show only tez configs by default,fix appattemptid.

http://git-wip-us.apache.org/repos/asf/tez/blob/48055300/tez-ui/src/main/webapp/app/scripts/controllers/dag_controller.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/dag_controller.js b/tez-ui/src/main/webapp/app/scripts/controllers/dag_controller.js
index 1fdf053..b17157f 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/dag_controller.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/dag_controller.js
@@ -17,19 +17,18 @@
  */
 
 App.DagController = Em.ObjectController.extend(App.Helpers.DisplayHelper, {
-	controllerName: 'DagController',
+  controllerName: 'DagController',
+  pageTitle: 'Dag',
+  loading: true,
 
-	pageTitle: 'Dag',
-
-	loading: true,
-
-	updateLoading: function() {
+  updateLoading: function() {
     var that = this;
     var loaders = [];
+    var applicationId = this.get('applicationId');
     if (this.get('status') === 'RUNNING') {
       // update the progress info if available. this need not block the UI
       var aminfoLoader = that.store.find('dagProgress', that.get('id'), {
-        appId: that.get('applicationId'),
+        appId: applicationId,
         dagIdx: that.get('idx')
       }).then(function(dagProgressInfo) {
         that.set('progress', dagProgressInfo.get('progress'));
@@ -38,19 +37,32 @@ App.DagController = Em.ObjectController.extend(App.Helpers.DisplayHelper, {
       });
       loaders.push(aminfoLoader);
     }
+    var appDetailLoader = this.store.find('appDetail', applicationId)
+      .then(function(app){
+        that.set('appDetail', app);
+      });
+    var tezAppLoader = this.store.find('tezApp', 'tez_' + applicationId)
+      .then(function(app){
+        that.set('tezApp', app);
+      });
+
     Em.RSVP.allSettled(loaders).then(function(){
       that.set('loading', false);
     });
   }.observes('content'),
 
-	childDisplayViews: [
-		Ember.Object.create({title: 'Details', linkTo: 'dag.index'}),
-		Ember.Object.create({title: 'View', linkTo: 'dag.view'}),
-		Ember.Object.create({title: 'Vertices', linkTo: 'dag.vertices'}),
-		Ember.Object.create({title: 'Tasks', linkTo: 'dag.tasks'}),
-		Ember.Object.create({title: 'Task Attempts', linkTo: 'dag.taskAttempts'}),
-		Ember.Object.create({title: 'Counters', linkTo: 'dag.counters'}),
-		Ember.Object.create({title: 'Swimlane', linkTo: 'dag.swimlane'})
-	],
+  enableAppIdLink: function() {
+    return !!(this.get('tezApp') && this.get('appDetail'));
+  }.property('applicationId', 'appDetail', 'tezApp'),
+
+  childDisplayViews: [
+    Ember.Object.create({title: 'Details', linkTo: 'dag.index'}),
+    Ember.Object.create({title: 'View', linkTo: 'dag.view'}),
+    Ember.Object.create({title: 'Vertices', linkTo: 'dag.vertices'}),
+    Ember.Object.create({title: 'Tasks', linkTo: 'dag.tasks'}),
+    Ember.Object.create({title: 'Task Attempts', linkTo: 'dag.taskAttempts'}),
+    Ember.Object.create({title: 'Counters', linkTo: 'dag.counters'}),
+    Ember.Object.create({title: 'Swimlane', linkTo: 'dag.swimlane'})
+  ],
 
 });

http://git-wip-us.apache.org/repos/asf/tez/blob/48055300/tez-ui/src/main/webapp/app/templates/dag.hbs
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/templates/dag.hbs b/tez-ui/src/main/webapp/app/templates/dag.hbs
index 6980401..b34aebe 100644
--- a/tez-ui/src/main/webapp/app/templates/dag.hbs
+++ b/tez-ui/src/main/webapp/app/templates/dag.hbs
@@ -33,7 +33,13 @@
           </tr>
           <tr>
             <td>{{t 'common.applicationId'}}</td>
-            <td>{{applicationId}}</td>
+            <td>
+              {{#if enableAppIdLink}}
+                {{#link-to 'tez-app' applicationId class='ember-table-content'}}{{applicationId}}{{/link-to}}
+              {{else}}
+                <span class='ember-table-content'>{{applicationId}}</span>
+              {{/if}}
+            </td>
           </tr>
           <tr>
             <td>{{t 'common.user'}}</td>