tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jeag...@apache.org
Subject [30/53] tez git commit: TEZ-1753. Queue in dags view. (Sreenath Somarajapuram via hitesh)
Date Wed, 10 Dec 2014 03:33:53 GMT
TEZ-1753. Queue in dags 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/7ef637b1
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/7ef637b1
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/7ef637b1

Branch: refs/heads/master
Commit: 7ef637b1ee7638ec424743e3e0c057cba1b4b0dd
Parents: 40dc947
Author: Hitesh Shah <hitesh@apache.org>
Authored: Mon Nov 10 22:06:13 2014 -0800
Committer: Hitesh Shah <hitesh@apache.org>
Committed: Mon Nov 10 22:06:13 2014 -0800

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../app/scripts/controllers/dags_controller.js  | 35 +++++++++++++++++++-
 .../src/main/webapp/app/scripts/models/dag.js   |  1 +
 3 files changed, 36 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/7ef637b1/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index e5a23ce..c3b1412 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -15,6 +15,7 @@ ALL CHANGES:
   TEZ-1617. Shim layer for Tez UI for use within Ambari.
   TEZ-1741. App view.
   TEZ-1751. Log view & download links in task and task attempt view.
+  TEZ-1753. Queue in dags view.
 
 Release 0.5.2: Unreleased
 

http://git-wip-us.apache.org/repos/asf/tez/blob/7ef637b1/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 6887bce..9997202 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
@@ -61,6 +61,32 @@ App.DagsController = Em.ObjectController.extend(App.PaginatedContentMixin,
{
     this.setFiltersAndLoadEntities(filters);
   },
 
+  loadEntities: function() {
+    var that = this,
+    store = this.get('store'),
+    childEntityType = this.get('childEntityType'),
+    fetcher;
+
+    store.unloadAll(childEntityType);
+    store.findQuery(childEntityType, this.getFilterProperties()).then(function(entities){
+      var loaders = [];
+      that.set('entities', entities);
+      entities.forEach(function (dag) {
+        // Pivot attempt selection logic
+        fetcher = store.find('appDetail', dag.get('applicationId') );
+        fetcher.then(function (app) {
+          dag.set('app', app);
+        });
+        loaders.push(fetcher);
+      });
+      Em.RSVP.allSettled(loaders).then(function(){
+        that.set('loading', false);
+      });
+    }).catch(function(jqXHR){
+      alert('failed');
+    });
+  },
+
   countUpdated: function() {
     this.loadData();
   }.observes('count'),
@@ -155,7 +181,14 @@ App.DagsController = Em.ObjectController.extend(App.PaginatedContentMixin,
{
         return  row.get('applicationId')
       }
     });
-    return [nameCol, idCol, userCol, statusCol, submittedTimeCol, runTimeCol, appIdCol];
+    var queue = App.ExTable.ColumnDefinition.create({
+      textAlign: 'text-align-left',
+      headerCellName: 'Queue',
+      getCellContent: function(row) {
+        return (row.get('app') && row.get('app').get('queue')) || 'Not Available';
+      }
+    });
+    return [nameCol, idCol, userCol, statusCol, submittedTimeCol, runTimeCol, appIdCol, queue];
   }.property(),
 
 

http://git-wip-us.apache.org/repos/asf/tez/blob/7ef637b1/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 05390c0..fbd8da6 100644
--- a/tez-ui/src/main/webapp/app/scripts/models/dag.js
+++ b/tez-ui/src/main/webapp/app/scripts/models/dag.js
@@ -36,6 +36,7 @@ App.Dag = App.AbstractEntity.extend({
 
 	// application ID of this dag.
 	applicationId: DS.attr('string'),
+  app: DS.belongsTo('appDetail', {async: true}),
 
 	// status
 	status: DS.attr('string'),


Mime
View raw message