tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jeag...@apache.org
Subject [33/53] tez git commit: TEZ-1768. follow up jira to address minor issues in Tez-ui. (Prakash Ramachandran via hitesh)
Date Wed, 10 Dec 2014 03:33:56 GMT
TEZ-1768. follow up jira to address minor issues in Tez-ui. (Prakash Ramachandran via hitesh)


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

Branch: refs/heads/master
Commit: 2ce8ebe60e086f56cfe9148db5c42dfee0499c3c
Parents: ac20265
Author: Hitesh Shah <hitesh@apache.org>
Authored: Fri Nov 14 10:56:34 2014 -0800
Committer: Hitesh Shah <hitesh@apache.org>
Committed: Fri Nov 14 10:56:34 2014 -0800

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 tez-ui/src/main/webapp/app/scripts/app.js       |  5 +-
 .../app/scripts/components/counter-table.js     | 23 +++--
 .../webapp/app/scripts/controllers/dag_tasks.js | 28 +++++--
 .../app/scripts/controllers/dag_vertices.js     | 21 +++--
 .../app/scripts/controllers/dags_controller.js  | 41 ++++++---
 .../task_task_attempts_controller.js            | 15 +++-
 .../controllers/tez-app-configs-controller.js   |  7 +-
 .../controllers/tez-app-dags-controller.js      | 10 +--
 .../controllers/vertex_tasks_controller.js      | 51 +++++++-----
 .../src/main/webapp/app/scripts/helpers/misc.js |  5 ++
 .../app/scripts/models/TimelineRestAdapter.js   | 32 +++----
 .../src/main/webapp/app/scripts/models/dag.js   | 20 +++++
 tez-ui/src/main/webapp/app/scripts/router.js    | 88 +++++---------------
 tez-ui/src/main/webapp/app/templates/dag.hbs    |  2 +-
 15 files changed, 185 insertions(+), 164 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/2ce8ebe6/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index c5a6ae3..d2d7a21 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -18,6 +18,7 @@ ALL CHANGES:
   TEZ-1753. Queue in dags view.
   TEZ-1765. Allow dropdown lists in table filters.
   TEZ-1606. Counters View for DAG, Vertex, and Task.
+  TEZ-1768. follow up jira to address minor issues in Tez-ui.
 
 Release 0.5.2: Unreleased
 

http://git-wip-us.apache.org/repos/asf/tez/blob/2ce8ebe6/tez-ui/src/main/webapp/app/scripts/app.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/app.js b/tez-ui/src/main/webapp/app/scripts/app.js
index d735bcc..c08c21f 100644
--- a/tez-ui/src/main/webapp/app/scripts/app.js
+++ b/tez-ui/src/main/webapp/app/scripts/app.js
@@ -33,9 +33,6 @@ var App = window.App = Em.Application.createWithMixins(Bootstrap, {
   }
 });
 
-require('scripts/router');
-require('scripts/store');
-
 App.Helpers = Em.Namespace.create();
 App.Mappers = Em.Namespace.create();
 
@@ -64,6 +61,8 @@ Ember.Application.initializer({
 require('scripts/translations');
 require('scripts/mixins/*');
 require('scripts/helpers/*');
+require('scripts/router');
+require('scripts/store');
 require('scripts/views/**/*');
 require('scripts/models/**/*');
 require('scripts/mappers/server_data_mapper.js');

http://git-wip-us.apache.org/repos/asf/tez/blob/2ce8ebe6/tez-ui/src/main/webapp/app/scripts/components/counter-table.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/components/counter-table.js b/tez-ui/src/main/webapp/app/scripts/components/counter-table.js
index 80c26dc..ca58f52 100644
--- a/tez-ui/src/main/webapp/app/scripts/components/counter-table.js
+++ b/tez-ui/src/main/webapp/app/scripts/components/counter-table.js
@@ -35,20 +35,17 @@ App.CounterTableComponent = Em.Component.extend({
         counters: []
       };
 
-      var counters = cg.get('counters');
-
-      if (filterStringRegex.test(tmpcg.displayName)) {
-        // if counter group name matches, match all counters for the group
-        tmpcg.counters = counters;
-      } else {
-        counters.forEach(function(counter) {
-          if (filterStringRegex.test(counter.get('displayName'))) {
-            tmpcg.counters.push(counter);
-          }
-        });
+      var counters = cg.get('counters') || [];
+      counters.forEach(function(counter) {
+        if (filterStringRegex.test(counter.get('displayName'))) {
+          tmpcg.counters.push(counter);
+        }
+      });
+
+      // show counter groups only if filter match is not empty.
+      if (tmpcg.counters.length > 0) {
+        filtered.push(tmpcg);
       }
-
-      filtered.push(tmpcg);
     })
 
     return filtered;

http://git-wip-us.apache.org/repos/asf/tez/blob/2ce8ebe6/tez-ui/src/main/webapp/app/scripts/controllers/dag_tasks.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/dag_tasks.js b/tez-ui/src/main/webapp/app/scripts/controllers/dag_tasks.js
index b41dbda..e925414 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/dag_tasks.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/dag_tasks.js
@@ -53,12 +53,15 @@ App.DagTasksController = Em.ObjectController.extend(App.PaginatedContentMixin,
{
       that.set('entities', entities);
       var pivotLoaders = [];
       entities.forEach(function (task) {
-        // Pivot attempt selection logic
-        fetcher = store.find('taskAttempt', task.get('successfulAttemptId') || task.get('attempts').lastObject
);
-        fetcher.then(function (attempt) {
-          task.set('pivotAttempt', attempt);
-        });
-        pivotLoaders.push(fetcher);
+        var taskAttemptId = task.get('successfulAttemptId') || task.get('attempts').lastObject;
+        if (!!taskAttemptId) {
+          // Pivot attempt selection logic
+          fetcher = store.find('taskAttempt', taskAttemptId);
+          fetcher.then(function (attempt) {
+            task.set('pivotAttempt', attempt);
+          });
+          pivotLoaders.push(fetcher);
+        }
       });
       Em.RSVP.allSettled(pivotLoaders).then(function(){
         that.set('loading', false);
@@ -104,8 +107,15 @@ App.DagTasksController = Em.ObjectController.extend(App.PaginatedContentMixin,
{
       }
     });
 
-    var runTimeCol = App.ExTable.ColumnDefinition.create({
-      headerCellName: 'Run Time',
+    var endTimeCol = App.ExTable.ColumnDefinition.create({
+      headerCellName: 'End Time',
+      getCellContent: function(row) {
+        return App.Helpers.date.dateFormat(row.get('endTime'));
+      }
+    });
+
+    var durationCol = App.ExTable.ColumnDefinition.create({
+      headerCellName: 'Duration',
       getCellContent: function(row) {
         var st = row.get('startTime');
         var et = row.get('endTime');
@@ -170,6 +180,6 @@ App.DagTasksController = Em.ObjectController.extend(App.PaginatedContentMixin,
{
       }
     });
 
-		return [idCol, vertexCol, startTimeCol, runTimeCol, statusCol, actionsCol, logs];
+		return [idCol, vertexCol, startTimeCol, endTimeCol, durationCol, statusCol, actionsCol,
logs];
 	}.property(),
 });
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tez/blob/2ce8ebe6/tez-ui/src/main/webapp/app/scripts/controllers/dag_vertices.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/dag_vertices.js b/tez-ui/src/main/webapp/app/scripts/controllers/dag_vertices.js
index 91777ab..f1d6347 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/dag_vertices.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/dag_vertices.js
@@ -73,20 +73,23 @@ App.DagVerticesController = Em.ObjectController.extend(App.PaginatedContentMixin
     });
 
     var startTimeCol = App.ExTable.ColumnDefinition.create({
-      headerCellName: 'Submission Time',
+      headerCellName: 'Start Time',
       getCellContent: function(row) {
       	return App.Helpers.date.dateFormat(row.get('startTime'));
       }
     });
 
-    var runTimeCol = App.ExTable.ColumnDefinition.create({
-      headerCellName: 'Run Time',
+    var endTimeCol = App.ExTable.ColumnDefinition.create({
+      headerCellName: 'End Time',
       getCellContent: function(row) {
-        var st = row.get('startTime');
-        var et = row.get('endTime');
-        if (st && et) {
-          return App.Helpers.date.durationSummary(st, et);
-        }
+        return App.Helpers.date.dateFormat(row.get('endTime'));
+      }
+    });
+
+    var firstTaskStartTime = App.ExTable.ColumnDefinition.create({
+      headerCellName: 'First Task Start Time',
+      getCellContent: function(row) {
+        return App.Helpers.date.dateFormat(row.get('firstTaskStartTime'));
       }
     });
 
@@ -114,6 +117,6 @@ App.DagVerticesController = Em.ObjectController.extend(App.PaginatedContentMixin
       }
     });
 
-		return [idCol, nameCol, startTimeCol, runTimeCol, numTasksCol, statusCol];
+		return [idCol, nameCol, startTimeCol, endTimeCol, firstTaskStartTime, statusCol, numTasksCol];
 	}.property(),
 });
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tez/blob/2ce8ebe6/tez-ui/src/main/webapp/app/scripts/controllers/dags_controller.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/dags_controller.js b/tez-ui/src/main/webapp/app/scripts/controllers/dags_controller.js
index 63f2f0d..cdc65ff 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/dags_controller.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/dags_controller.js
@@ -31,7 +31,9 @@ App.DagsController = Em.ObjectController.extend(App.PaginatedContentMixin,
{
     count: true,
     fromID: true,
     status_filter: 'status',
-    user_filter: 'user'
+    user_filter: 'user',
+    appId_filter: 'appid',
+    dagName_filter: 'dag_name'
   },
 
   // paging related values. These are bound automatically to the values in url. via the queryParams
@@ -44,15 +46,21 @@ App.DagsController = Em.ObjectController.extend(App.PaginatedContentMixin,
{
 
   user_filter: null,
 
+  appId_filter: null,
+
+  dagName_filter: null,
+
   fields: 'events,primaryfilters,otherinfo',
 
   // The dropdown contents for number of items to show.
-  countOptions: [5, 10, 25, 50, 100],
+  countOptions: [5, 10, 25, 50],
 
   loadData: function() {
     var filters = {
       primary: {
-        user: this.user_filter
+        user: this.user_filter,
+        applicationId: this.appId_filter,
+        dagName: this.dagName_filter
       },
       secondary: {
         status: this.status_filter
@@ -114,12 +122,13 @@ App.DagsController = Em.ObjectController.extend(App.PaginatedContentMixin,
{
       });
     }
 
-    var nameCol = App.ExTable.ColumnDefinition.create({
+    var nameCol = App.ExTable.ColumnDefinition.createWithMixins(App.ExTable.FilterColumnMixin,
{
       textAlign: 'text-align-left',
       headerCellName: 'Dag Name',
+      filterID: 'dagName_filter',
       tableCellViewClass: Em.Table.TableCell.extend({
       	template: Em.Handlebars.compile(
-          "{{#link-to 'dag' view.cellContent.id class='ember-table-content'}}{{view.cellContent.name}}{{/link-to}}")
+          "{{#link-to 'dag.vertices' view.cellContent.id class='ember-table-content'}}{{view.cellContent.name}}{{/link-to}}")
       }),
       getCellContent: function(row) {
       	return {
@@ -154,16 +163,23 @@ App.DagsController = Em.ObjectController.extend(App.PaginatedContentMixin,
{
         };
       }
     });
-    var submittedTimeCol = App.ExTable.ColumnDefinition.create({
+    var startTime = App.ExTable.ColumnDefinition.create({
+      textAlign: 'text-align-left',
+      headerCellName: 'Start Time',
+      getCellContent: function(row) {
+        return App.Helpers.date.dateFormat(row.get('startTime'));
+      }
+    });
+    var endTime = App.ExTable.ColumnDefinition.create({
       textAlign: 'text-align-left',
-      headerCellName: 'Submitted Time',
+      headerCellName: 'End Time',
       getCellContent: function(row) {
-        return App.Helpers.date.dateFormat(row.get('submittedTime'));
+        return App.Helpers.date.dateFormat(row.get('endTime'));
       }
     });
-    var runTimeCol = App.ExTable.ColumnDefinition.create({
+    var durationCol = App.ExTable.ColumnDefinition.create({
       textAlign: 'text-align-left',
-      headerCellName: 'Run Time',
+      headerCellName: 'Duration',
       getCellContent: function(row) {
         var st = row.get('startTime');
         var et = row.get('endTime');
@@ -172,9 +188,10 @@ App.DagsController = Em.ObjectController.extend(App.PaginatedContentMixin,
{
         }
       }
     });
-    var appIdCol = App.ExTable.ColumnDefinition.create({
+    var appIdCol = App.ExTable.ColumnDefinition.createWithMixins(App.ExTable.FilterColumnMixin,
{
       textAlign: 'text-align-left',
       headerCellName: 'Application ID',
+      filterID: 'appId_filter',
       tableCellViewClass: Em.Table.TableCell.extend({
         template: Em.Handlebars.compile(
           "{{#link-to 'tez-app' view.cellContent class='ember-table-content'}}{{view.cellContent}}{{/link-to}}")
@@ -190,7 +207,7 @@ App.DagsController = Em.ObjectController.extend(App.PaginatedContentMixin,
{
         return (row.get('app') && row.get('app').get('queue')) || 'Not Available';
       }
     });
-    return [nameCol, idCol, userCol, statusCol, submittedTimeCol, runTimeCol, appIdCol, queue];
+    return [nameCol, idCol, userCol, statusCol, startTime, endTime, durationCol, appIdCol,
queue];
   }.property(),
 
 

http://git-wip-us.apache.org/repos/asf/tez/blob/2ce8ebe6/tez-ui/src/main/webapp/app/scripts/controllers/task_task_attempts_controller.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/task_task_attempts_controller.js
b/tez-ui/src/main/webapp/app/scripts/controllers/task_task_attempts_controller.js
index 244dd1d..1099d04 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/task_task_attempts_controller.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/task_task_attempts_controller.js
@@ -75,6 +75,17 @@ App.TaskAttemptsController = Em.ObjectController.extend(App.PaginatedContentMixi
       }
     });
 
+    var durationCol = App.ExTable.ColumnDefinition.create({
+      headerCellName: 'Duration',
+      getCellContent: function(row) {
+        var st = row.get('startTime');
+        var et = row.get('endTime');
+        if (st && et) {
+          return App.Helpers.date.durationSummary(st, et);
+        }
+      }
+    });
+
     var statusCol = App.ExTable.ColumnDefinition.createWithMixins(App.ExTable.FilterColumnMixin,{
       headerCellName: 'Status',
       filterID: 'status_filter',
@@ -125,8 +136,8 @@ App.TaskAttemptsController = Em.ObjectController.extend(App.PaginatedContentMixi
         return logFile;
       }
     });
-    return [idCol, startTimeCol, endTimeCol, statusCol, nodeIdCol, containerCol, logs];
-	}.property(),
+    return [idCol, startTimeCol, endTimeCol, durationCol, statusCol, nodeIdCol, containerCol,
logs];
+  }.property(),
 });
 
 

http://git-wip-us.apache.org/repos/asf/tez/blob/2ce8ebe6/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-configs-controller.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-configs-controller.js
b/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-configs-controller.js
index 6843733..a50f589 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-configs-controller.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-configs-controller.js
@@ -24,10 +24,9 @@ App.TezAppConfigsController = Em.ObjectController.extend(App.PaginatedContentMix
   value: null,
 
   loadEntities: function() {
-    var that = this,
     count = 0,
     filter = this.getFilterProperties(),
-    configs = configs = this.get('configs').content,
+    configs = this.get('configs').content,
     filtered = [],
     i = 0;
 
@@ -39,7 +38,7 @@ App.TezAppConfigsController = Em.ObjectController.extend(App.PaginatedContentMix
 
     // Filter the available data
     for(; i < configs.length && filtered.length < filter.limit; i++){
-      if((that.key === null || configs[i].get('key').indexOf(that.key) !=-1) && (that.value
=== null || configs[i].get('value').indexOf(that.value) != -1)) {
+      if((this.key === null || configs[i].get('key').indexOf(this.key) !=-1) && (this.value
=== null || configs[i].get('value').indexOf(this.value) != -1)) {
         filtered.push(configs[i]);
       }
     }
@@ -86,4 +85,4 @@ App.TezAppConfigsController = Em.ObjectController.extend(App.PaginatedContentMix
     ];
   }.property(),
 
-});
\ No newline at end of file
+});

http://git-wip-us.apache.org/repos/asf/tez/blob/2ce8ebe6/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-dags-controller.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-dags-controller.js b/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-dags-controller.js
index d07478c..e2855e1 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-dags-controller.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-dags-controller.js
@@ -30,7 +30,6 @@ App.TezAppDagsController = Em.ObjectController.extend(App.PaginatedContentMixin,
   user_filter: null,
 
   loadData: function() {
-    console.log(new Error().stack);
     var filters = {
       primary: {
         applicationId: this.get('appId'),
@@ -120,19 +119,18 @@ App.TezAppDagsController = Em.ObjectController.extend(App.PaginatedContentMixin,
         return App.Helpers.date.dateFormat(row.get('submittedTime'));
       }
     });
-    var runTimeCol = App.ExTable.ColumnDefinition.create({
+    var durationCol = App.ExTable.ColumnDefinition.create({
       textAlign: 'text-align-left',
-      headerCellName: 'Run Time',
+      headerCellName: 'Duration',
       getCellContent: function(row) {
         var st = row.get('startTime');
         var et = row.get('endTime');
-        console.log(st, et);
         if (st && et) {
           return App.Helpers.date.durationSummary(st, et);
         }
       }
     });
-    return [nameCol, idCol, userCol, statusCol, submittedTimeCol, runTimeCol];
+    return [nameCol, idCol, userCol, statusCol, submittedTimeCol, durationCol];
   }.property(),
 
-});
\ No newline at end of file
+});

http://git-wip-us.apache.org/repos/asf/tez/blob/2ce8ebe6/tez-ui/src/main/webapp/app/scripts/controllers/vertex_tasks_controller.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/vertex_tasks_controller.js b/tez-ui/src/main/webapp/app/scripts/controllers/vertex_tasks_controller.js
index 986dedd..e963225 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/vertex_tasks_controller.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/vertex_tasks_controller.js
@@ -50,12 +50,15 @@ App.VertexTasksController = Em.ObjectController.extend(App.PaginatedContentMixin
       that.set('entities', entities);
       var pivotLoaders = [];
       entities.forEach(function (task) {
-        // Pivot attempt selection logic
-        fetcher = store.find('taskAttempt', task.get('successfulAttemptId') || task.get('attempts').lastObject
);
-        fetcher.then(function (attempt) {
-          task.set('pivotAttempt', attempt);
-        });
-        pivotLoaders.push(fetcher);
+        var taskAttemptId = task.get('successfulAttemptId') || task.get('attempts').lastObject;
+        if (!!taskAttemptId){
+          // Pivot attempt selection logic
+          fetcher = store.find('taskAttempt',  taskAttemptId);
+          fetcher.then(function (attempt) {
+            task.set('pivotAttempt', attempt);
+          });
+          pivotLoaders.push(fetcher);
+        }
       });
       Em.RSVP.allSettled(pivotLoaders).then(function(){
         that.set('loading', false);
@@ -88,24 +91,22 @@ App.VertexTasksController = Em.ObjectController.extend(App.PaginatedContentMixin
       contentPath: 'id',
     });
 
-    var vertexCol = App.ExTable.ColumnDefinition.create({
-      headerCellName: 'Vertex ID',
-      contentPath: 'vertexID',
-      tableCellViewClass: Em.Table.TableCell.extend({
-        template: Em.Handlebars.compile(
-          "{{#link-to 'vertex' view.cellContent class='ember-table-content'}}{{view.cellContent}}{{/link-to}}")
-      }),
-    });
-
     var startTimeCol = App.ExTable.ColumnDefinition.create({
-      headerCellName: 'Submission Time',
+      headerCellName: 'Start Time',
       getCellContent: function(row) {
         return App.Helpers.date.dateFormat(row.get('startTime'));
       }
     });
 
     var endTimeCol = App.ExTable.ColumnDefinition.create({
-      headerCellName: 'Run Time',
+      headerCellName: 'End Time',
+      getCellContent: function(row) {
+        return App.Helpers.date.dateFormat(row.get('endTime'));
+      }
+    });
+
+    var durationCol = App.ExTable.ColumnDefinition.create({
+      headerCellName: 'duration',
       getCellContent: function(row) {
         var st = row.get('startTime');
         var et = row.get('endTime');
@@ -134,9 +135,17 @@ App.VertexTasksController = Em.ObjectController.extend(App.PaginatedContentMixin
       }
     });
 
-    var nodeCol = App.ExTable.ColumnDefinition.create({
-      headerCellName: 'Node',
-      contentPath: 'node'
+    var actionsCol = App.ExTable.ColumnDefinition.create({
+      headerCellName: 'Actions',
+      tableCellViewClass: Em.Table.TableCell.extend({
+        template: Em.Handlebars.compile(
+          '<span class="ember-table-content">\
+          {{#link-to "task.counters" view.cellContent}}counters{{/link-to}}&nbsp;\
+          {{#link-to "task.attempts" view.cellContent}}attempts{{/link-to}}\
+          </span>'
+          )
+      }),
+      contentPath: 'id'
     });
 
     var logs = App.ExTable.ColumnDefinition.create({
@@ -162,6 +171,6 @@ App.VertexTasksController = Em.ObjectController.extend(App.PaginatedContentMixin
       }
     });
 
-    return [idCol, vertexCol, startTimeCol, endTimeCol, statusCol, logs];
+    return [idCol, startTimeCol, endTimeCol, durationCol, statusCol, actionsCol, logs];
   }.property(),
 });
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tez/blob/2ce8ebe6/tez-ui/src/main/webapp/app/scripts/helpers/misc.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/helpers/misc.js b/tez-ui/src/main/webapp/app/scripts/helpers/misc.js
index 66651b5..aebde79 100644
--- a/tez-ui/src/main/webapp/app/scripts/helpers/misc.js
+++ b/tez-ui/src/main/webapp/app/scripts/helpers/misc.js
@@ -101,4 +101,9 @@ App.Helpers.misc = {
     { label: 'Killed', id: 'KILLED' },
   ],
 
+  defaultQueryParamsConfig: {
+    refreshModel: true,
+    replace: true
+  }
+
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tez/blob/2ce8ebe6/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js b/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js
index c9e470a..00ef215 100644
--- a/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js
+++ b/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js
@@ -148,8 +148,6 @@ App.DagSerializer = App.TimelineSerializer.extend({
   },
 });
 
-var containerIdRegex = /.*(container_.*?)\/.*/;
-var nodeIdRegex = /([^\/]*)\//;
 var timelineJsonToTaskAttemptMap = {
   id: 'entity',
   startTime: 'otherinfo.startTime',
@@ -163,21 +161,10 @@ var timelineJsonToTaskAttemptMap = {
 
   vertexID: 'primaryfilters.TEZ_VERTEX_ID.0',
   dagID: 'primaryfilters.TEZ_DAG_ID.0',
-  containerId: { custom: function (source) {
-    var inProgressLogsURL = Em.get(source, 'otherinfo.inProgressLogsURL');
-    var match = containerIdRegex.exec(inProgressLogsURL);
-    return match[1];
-  }},
-  nodeId: {
-    custom: function(source) {
-      var inProgressLogsURL = Em.get(source, 'otherinfo.inProgressLogsURL');
-      var match = nodeIdRegex.exec(inProgressLogsURL);
-      return match[1];
-    }
-  }
+  containerId: 'otherinfo.containerId',
+  nodeId: 'otherinfo.nodeId'
 };
 
-
 App.TaskAttemptSerializer = App.TimelineSerializer.extend({
   _normalizeSingleTaskAttemptPayload: function(taskAttempt) {
     var normalizedCounterGroupData = this.normalizeCounterGroupsHelper('taskAttempt', 
@@ -229,7 +216,6 @@ var timelineJsonToTaskMap = {
   counterGroups: 'counterGroups',
   successfulAttemptId: 'otherinfo.successfulAttemptId',
   attempts: 'relatedentities.TEZ_TASK_ATTEMPT_ID',
-  vertexID: 'primaryfilters.TEZ_VERTEX_ID.0',
   dagID: 'primaryfilters.TEZ_DAG_ID.0',
   numAttempts: 'relatedentities'
 };
@@ -281,6 +267,7 @@ var timelineJsonToVertexMap = {
   id: 'entity',
   name: 'otherinfo.vertexName',
   dagID: 'primaryfilters.TEZ_DAG_ID.0',
+  processorClassName: 'otherinfo.stats.processorClassName',
   counterGroups: 'counterGroups',
 
   startTime: 'otherinfo.startTime',
@@ -293,6 +280,19 @@ var timelineJsonToVertexMap = {
   sucessfulTasks: 'otherinfo.numSucceededTasks',
   numTasks: 'otherinfo.numTasks',
   killedTasks: 'otherinfo.numKilledTasks',
+
+  firstTaskStartTime: 'otherinfo.stats.firstTaskStartTime',
+  lastTaskFinishTime:  'otherinfo.stats.lastTaskFinishTime',
+
+  firstTasksToStart:  'otherinfo.stats.firstTasksToStart',
+  lastTasksToFinish:  'otherinfo.stats.lastTasksToFinish',
+
+  minTaskDuration:  'otherinfo.stats.minTaskDuration',
+  maxTaskDuration:  'otherinfo.stats.maxTaskDuration',
+  avgTaskDuration:  'otherinfo.stats.avgTaskDuration',
+
+  shortestDurationTasks:  'otherinfo.stats.shortestDurationTasks',
+  longestDurationTasks:  'otherinfo.stats.longestDurationTasks'
 };
 
 App.VertexSerializer = App.TimelineSerializer.extend({

http://git-wip-us.apache.org/repos/asf/tez/blob/2ce8ebe6/tez-ui/src/main/webapp/app/scripts/models/dag.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/models/dag.js b/tez-ui/src/main/webapp/app/scripts/models/dag.js
index fbd8da6..8a74b4b 100644
--- a/tez-ui/src/main/webapp/app/scripts/models/dag.js
+++ b/tez-ui/src/main/webapp/app/scripts/models/dag.js
@@ -118,6 +118,26 @@ App.Vertex = DS.Model.extend({
 
   endTime: DS.attr('number'),
 
+  firstTaskStartTime: DS.attr('number'),
+
+  firstTasksToStart: DS.attr('string'),
+
+  lastTaskFinishTime: DS.attr('number'),
+
+  lastTasksToFinish: DS.attr('string'),
+
+  minTaskDuration: DS.attr('number'),
+
+  maxTaskDuration: DS.attr('number'),
+
+  avgTaskDuration: DS.attr('number'),
+
+  shortestDurationTasks: DS.attr('string'),
+
+  longestDurationTasks: DS.attr('string'),
+
+  processorClassName: DS.attr('string'),
+
   /**
    * Provides the duration of this job. If the job has not started, duration
    * will be given as 0. If the job has not ended, duration will be till now.

http://git-wip-us.apache.org/repos/asf/tez/blob/2ce8ebe6/tez-ui/src/main/webapp/app/scripts/router.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/router.js b/tez-ui/src/main/webapp/app/scripts/router.js
index 2d86d7d..50615a5 100644
--- a/tez-ui/src/main/webapp/app/scripts/router.js
+++ b/tez-ui/src/main/webapp/app/scripts/router.js
@@ -75,22 +75,12 @@ App.DagCountersRoute = App.VertexCountersRoute =
 
 App.DagsRoute = Em.Route.extend({
   queryParams:  {
-    count: {
-      refreshModel: true,
-      replace: true
-    },
-    fromID: {
-      refreshModel: true,
-      replace: true
-    },
-    user: {
-      refreshModel: true,
-      replace: true
-    },
-    status: {
-    refreshModel: true,
-      replace: true
-    }
+    count: App.Helpers.misc.defaultQueryParamsConfig,
+    fromID: App.Helpers.misc.defaultQueryParamsConfig,
+    user: App.Helpers.misc.defaultQueryParamsConfig,
+    status: App.Helpers.misc.defaultQueryParamsConfig,
+    appid: App.Helpers.misc.defaultQueryParamsConfig,
+    dag_name: App.Helpers.misc.defaultQueryParamsConfig
   },
 
   setupController: function(controller, model) {
@@ -125,18 +115,9 @@ App.DagSwimlaneRoute = Em.Route.extend({
 
 App.TasksRoute = Em.Route.extend({
   queryParams: {
-    status: {
-      refreshModel: true,
-      replace: true
-    },
-    parentType: {
-      refreshModel: true,
-      replace: true
-    },
-    parentID: {
-      refreshModel: true,
-      replace: true
-    }
+    status: App.Helpers.misc.defaultQueryParamsConfig,
+    parentType: App.Helpers.misc.defaultQueryParamsConfig,
+    parentID: App.Helpers.misc.defaultQueryParamsConfig
   },
 
   setupController: function(controller, model) {
@@ -168,11 +149,9 @@ App.VertexRoute = Em.Route.extend({
 App.VertexSwimlaneRoute = Em.Route.extend({
   model: function(params) {
     var model = this.modelFor('vertex');
-    var queryParams = {'primaryFilter': 'TEZ_DAG_ID:' + model.get('dagID') };
+    var queryParams = {'primaryFilter': 'TEZ_VERTEX_ID:' + model.id };
     this.store.unloadAll('task_attempt');
-    return this.store.filter('task_attempt', queryParams, function(ta) {
-      return ta.get('vertexID') == model.id;
-    });
+    return this.store.find('task_attempt', queryParams);
   },
 
   setupController: function(controller, model) {
@@ -182,14 +161,8 @@ App.VertexSwimlaneRoute = Em.Route.extend({
 
 App.DagTasksRoute = Em.Route.extend({
   queryParams: {
-    status: {
-      refreshModel: true,
-      replace: true
-    },
-    vertex_id: {
-      refreshModel: true,
-      replace: true
-    }
+    status: App.Helpers.misc.defaultQueryParamsConfig,
+    vertex_id: App.Helpers.misc.defaultQueryParamsConfig 
   },
 
   setupController: function(controller, model) {
@@ -200,10 +173,7 @@ App.DagTasksRoute = Em.Route.extend({
 
 App.DagVerticesRoute = Em.Route.extend({
   queryParams: {
-    status: {
-      refreshModel: true,
-      replace: true
-    }
+    status: App.Helpers.misc.defaultQueryParamsConfig 
   },
 
   setupController: function(controller, model) {
@@ -214,10 +184,7 @@ App.DagVerticesRoute = Em.Route.extend({
 
 App.VertexTasksRoute = Em.Route.extend({
   queryParams: {
-    status: {
-      refreshModel: true,
-      replace: true
-    }
+    status: App.Helpers.misc.defaultQueryParamsConfig
   },
 
   setupController: function(controller, model) {
@@ -228,10 +195,7 @@ App.VertexTasksRoute = Em.Route.extend({
 
 App.TaskAttemptsRoute = Em.Route.extend({
   queryParams: {
-    status: {
-      refreshModel: true,
-      replace: true
-    }
+    status: App.Helpers.misc.defaultQueryParamsConfig 
   },
 
   setupController: function(controller, model) {
@@ -254,22 +218,10 @@ App.TezAppRoute = Em.Route.extend({
 
 App.TezAppDagsRoute = Em.Route.extend({
   queryParams:  {
-    count: {
-      refreshModel: true,
-      replace: true
-    },    
-    fromID: {
-      refreshModel: true,
-      replace: true
-    },
-    user: {
-      refreshModel: true,
-      replace: true
-    },
-    status: {
-      refreshModel: true,
-      replace: true
-    }
+    count: App.Helpers.misc.defaultQueryParamsConfig,    
+    fromID: App.Helpers.misc.defaultQueryParamsConfig,
+    user: App.Helpers.misc.defaultQueryParamsConfig,
+    status: App.Helpers.misc.defaultQueryParamsConfig
   },
 
   setupController: function(controller, model) {

http://git-wip-us.apache.org/repos/asf/tez/blob/2ce8ebe6/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 3908f2f..35ea965 100644
--- a/tez-ui/src/main/webapp/app/templates/dag.hbs
+++ b/tez-ui/src/main/webapp/app/templates/dag.hbs
@@ -6,7 +6,7 @@
 			<table class='detail-list'>
 				<tbody>
 					<tr>
-						<td>{{t common.id}}</td>
+						<td>Dag ID</td>
 						<td>{{id}}</td>
 					</tr>
 					<tr>


Mime
View raw message