tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hit...@apache.org
Subject [2/2] tez git commit: TEZ-2069. Tez UI: appId should link to application in dag details view. (Sreenath Somarajapuram via hitesh)
Date Tue, 10 Feb 2015 20:44:51 GMT
TEZ-2069. Tez UI: appId should link to application in dag details view. (Sreenath Somarajapuram
via hitesh)

(cherry picked from commit 48055300dbcb7dc4c5d0f8105fcb4b772aae176a)


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

Branch: refs/heads/branch-0.6
Commit: e8610693f73454d0fc2deecb16f9026cc86cb43d
Parents: f661803
Author: Hitesh Shah <hitesh@apache.org>
Authored: Tue Feb 10 12:42:05 2015 -0800
Committer: Hitesh Shah <hitesh@apache.org>
Committed: Tue Feb 10 12:44:38 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/e8610693/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 02b8c24..a8a00f5 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -6,6 +6,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-1917. Examples should extend TezExampleBase.

http://git-wip-us.apache.org/repos/asf/tez/blob/e8610693/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/e8610693/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>


Mime
View raw message