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 2014/11/11 07:06:58 UTC

[1/3] tez git commit: TEZ-1741. App view. (Sreenath Somarajapuram via hitesh)

Repository: tez
Updated Branches:
  refs/heads/TEZ-8 b4be9ca7d -> 7ef637b1e


TEZ-1741. App 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/28ef6ec8
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/28ef6ec8
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/28ef6ec8

Branch: refs/heads/TEZ-8
Commit: 28ef6ec8f134552f2030cd8b507fe50fc7dee019
Parents: b4be9ca
Author: Hitesh Shah <hi...@apache.org>
Authored: Mon Nov 10 22:01:29 2014 -0800
Committer: Hitesh Shah <hi...@apache.org>
Committed: Mon Nov 10 22:01:29 2014 -0800

----------------------------------------------------------------------
 CHANGES.txt                                     |   1 +
 tez-ui/src/main/webapp/app/scripts/app.js       |  12 +-
 .../app/scripts/controllers/dags_controller.js  |  12 +-
 .../controllers/tez-app-configs-controller.js   |  89 ++++++++++++
 .../scripts/controllers/tez-app-controller.js   |  41 ++++++
 .../controllers/tez-app-dags-controller.js      | 138 +++++++++++++++++++
 .../app/scripts/models/TimelineRestAdapter.js   |  95 ++++++++++++-
 .../src/main/webapp/app/scripts/models/dag.js   |  39 ++++++
 tez-ui/src/main/webapp/app/scripts/router.js    |  61 +++++++-
 .../src/main/webapp/app/templates/tez-app.hbs   |  43 ++++++
 .../webapp/app/templates/tez-app/configs.hbs    |  46 +++++++
 .../main/webapp/app/templates/tez-app/dags.hbs  |  46 +++++++
 .../main/webapp/app/templates/tez-app/index.hbs |  80 +++++++++++
 13 files changed, 693 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/28ef6ec8/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 9073a5e..9cc4e82 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -13,6 +13,7 @@ ALL CHANGES:
   TEZ-1720. Allow filters in all tables and also to pass in filters using url params.
   TEZ-1708. Make UI part of TEZ build process.
   TEZ-1617. Shim layer for Tez UI for use within Ambari.
+  TEZ-1741. App view.
 
 Release 0.5.2: Unreleased
 

http://git-wip-us.apache.org/repos/asf/tez/blob/28ef6ec8/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 2db916b..d735bcc 100644
--- a/tez-ui/src/main/webapp/app/scripts/app.js
+++ b/tez-ui/src/main/webapp/app/scripts/app.js
@@ -28,7 +28,8 @@ var App = window.App = Em.Application.createWithMixins(Bootstrap, {
 
   env: {
     standalone: window.parent === window,
-    timelineBaseUrl: "http://localhost:8188"
+    timelineBaseUrl: "http://localhost:8188",
+    RMWebUrl: "http://localhost:8088"
   }
 });
 
@@ -46,6 +47,15 @@ Ember.Application.initializer({
       host: App.env.timelineBaseUrl
     });
     application.ApplicationSerializer = App.TimelineSerializer.extend();
+
+    application.AppDetailAdapter = DS.RESTAdapter.extend({
+      namespace: 'ws/v1/applicationhistory',
+      host: App.env.timelineBaseUrl,
+      pathForType: function() {
+        return "apps";
+      },
+    });
+
   }
 });
 

http://git-wip-us.apache.org/repos/asf/tez/blob/28ef6ec8/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 896db7f..6887bce 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
@@ -144,7 +144,17 @@ App.DagsController = Em.ObjectController.extend(App.PaginatedContentMixin, {
         }
       }
     });
-    var appIdCol = columnHelper('Application ID', 'applicationId');
+    var appIdCol = App.ExTable.ColumnDefinition.create({
+      textAlign: 'text-align-left',
+      headerCellName: 'Application ID',
+      tableCellViewClass: Em.Table.TableCell.extend({
+        template: Em.Handlebars.compile(
+          "{{#link-to 'tez-app' view.cellContent class='ember-table-content'}}{{view.cellContent}}{{/link-to}}")
+      }),
+      getCellContent: function(row) {
+        return  row.get('applicationId')
+      }
+    });
     return [nameCol, idCol, userCol, statusCol, submittedTimeCol, runTimeCol, appIdCol];
   }.property(),
 

http://git-wip-us.apache.org/repos/asf/tez/blob/28ef6ec8/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
new file mode 100644
index 0000000..6843733
--- /dev/null
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-configs-controller.js
@@ -0,0 +1,89 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+App.TezAppConfigsController = Em.ObjectController.extend(App.PaginatedContentMixin, {
+  needs: "tezApp",
+  count: 10,
+
+  key: null,
+  value: null,
+
+  loadEntities: function() {
+    var that = this,
+    count = 0,
+    filter = this.getFilterProperties(),
+    configs = configs = this.get('configs').content,
+    filtered = [],
+    i = 0;
+
+    if(filter.fromId) {
+      while(i < configs.length && configs[i].id != filter.fromId) {
+        i++;
+      }
+    }
+
+    // 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)) {
+        filtered.push(configs[i]);
+      }
+    }
+
+    this.set('entities', filtered);
+    this.set('loading', false);
+  },
+
+  loadData: function() {
+    var filters = {
+      primary: {
+        key: this.key,
+        value: this.value
+      },
+    };
+    this.setFiltersAndLoadEntities(filters);
+  },
+
+  actions : {
+    filterUpdated: function(filterID, value) {
+      // any validations required goes here.
+      if (!!value) {
+        this.set(filterID, value);
+      } else {
+        this.set(filterID, null);
+      }
+      this.loadData();
+    }
+  },
+
+  columns: function() {
+    var columnHelper = function(displayText, columnId) {
+      return App.ExTable.ColumnDefinition.createWithMixins(App.ExTable.FilterColumnMixin, {
+        textAlign: 'text-align-left',
+        headerCellName: displayText,
+        filterID: columnId,
+        contentPath: columnId
+      });
+    }
+
+    return [
+        columnHelper("Conf key", 'key'),
+        columnHelper("Conf value", 'value'),
+    ];
+  }.property(),
+
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tez/blob/28ef6ec8/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-controller.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-controller.js b/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-controller.js
new file mode 100644
index 0000000..74e985c
--- /dev/null
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-controller.js
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+App.TezAppController = Em.ObjectController.extend(App.Helpers.DisplayHelper, {
+  controllerName: 'AppController',
+
+  pageTitle: 'App',
+
+  loading: true,
+
+  RMWebUrl: App.env.RMWebUrl,
+
+  updateLoading: function() {
+    this.set('loading', false);
+  }.observes('content'),
+
+  pageSubTitle: function() {
+    return this.get('id');
+  }.property('id'),
+
+  childDisplayViews: [
+    Ember.Object.create({title: 'Details', linkTo: 'tez-app.index'}),
+    Ember.Object.create({title: 'Dags', linkTo: 'tez-app.dags'}),
+    Ember.Object.create({title: 'Configs', linkTo: 'tez-app.configs'}),
+  ],
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tez/blob/28ef6ec8/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
new file mode 100644
index 0000000..d07478c
--- /dev/null
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-dags-controller.js
@@ -0,0 +1,138 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+App.TezAppDagsController = Em.ObjectController.extend(App.PaginatedContentMixin, {
+  needs: "tezApp",
+
+  // required by the PaginatedContentMixin
+  childEntityType: 'dag',
+
+  queryParams: {
+    status_filter: 'status',
+    user_filter: 'user'
+  },
+  status_filter: null,
+  user_filter: null,
+
+  loadData: function() {
+    console.log(new Error().stack);
+    var filters = {
+      primary: {
+        applicationId: this.get('appId'),
+        user: this.user_filter
+      },
+      secondary: {
+        status: this.status_filter
+      }
+    };
+    this.setFiltersAndLoadEntities(filters);
+  },
+
+  actions : {
+    filterUpdated: function(filterID, value) {
+      // any validations required goes here.
+      if (!!value) {
+        this.set(filterID, value);
+      } else {
+        this.set(filterID, null);
+      }
+      this.loadData();
+    }
+  },
+
+  /* table view for dags */
+  columns: function() {
+    var columnHelper = function(columnName, valName) {
+      return App.ExTable.ColumnDefinition.create({
+        textAlign: 'text-align-left',
+        headerCellName: columnName,
+        contentPath: valName
+      });
+    }
+
+    var nameCol = App.ExTable.ColumnDefinition.create({
+      textAlign: 'text-align-left',
+      headerCellName: 'Dag Name',
+      tableCellViewClass: Em.Table.TableCell.extend({
+        template: Em.Handlebars.compile(
+          "{{#link-to 'dag' view.cellContent.id class='ember-table-content'}}{{view.cellContent.name}}{{/link-to}}")
+      }),
+      getCellContent: function(row) {
+        return {
+          id: row.get('id'),
+          name: row.get('name')
+        };
+      }
+    });
+    var idCol = App.ExTable.ColumnDefinition.create({
+      textAlign: 'text-align-left',
+      headerCellName: 'Dag ID',
+      tableCellViewClass: Em.Table.TableCell.extend({
+        template: Em.Handlebars.compile(
+          "{{#link-to 'dag' view.cellContent class='ember-table-content'}}{{view.cellContent}}{{/link-to}}")
+      }),
+      getCellContent: function(row) {
+        return row.get('id')
+      }
+    });
+    var userCol = App.ExTable.ColumnDefinition.createWithMixins(App.ExTable.FilterColumnMixin, {
+      textAlign: 'text-align-left',
+      headerCellName: 'Submitter',
+      filterID: 'user_filter',
+      contentPath: 'user'
+    }); 
+    var statusCol = App.ExTable.ColumnDefinition.createWithMixins(App.ExTable.FilterColumnMixin,{
+      textAlign: 'text-align-left',
+      headerCellName: 'Status',
+      filterID: 'status_filter',
+      tableCellViewClass: Em.Table.TableCell.extend({
+        template: Em.Handlebars.compile(
+          '<span class="ember-table-content">&nbsp;\
+          <i {{bind-attr class=":task-status view.cellContent.statusIcon"}}></i>\
+          &nbsp;&nbsp;{{view.cellContent.status}}</span>')
+      }),
+      getCellContent: function(row) {
+        return { 
+          status: row.get('status'),
+          statusIcon: App.Helpers.misc.getStatusClassForEntity(row)
+        };
+      }
+    });
+    var submittedTimeCol = App.ExTable.ColumnDefinition.create({
+      textAlign: 'text-align-left',
+      headerCellName: 'Submitted Time',
+      getCellContent: function(row) {
+        return App.Helpers.date.dateFormat(row.get('submittedTime'));
+      }
+    });
+    var runTimeCol = App.ExTable.ColumnDefinition.create({
+      textAlign: 'text-align-left',
+      headerCellName: 'Run Time',
+      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];
+  }.property(),
+
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tez/blob/28ef6ec8/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 f29b467..468b906 100644
--- a/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js
+++ b/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js
@@ -16,10 +16,11 @@
  */
 
 var typeToPathMap = {
-	dag: 'TEZ_DAG_ID',
-	vertex: 'TEZ_VERTEX_ID',
+  dag: 'TEZ_DAG_ID',
+  vertex: 'TEZ_VERTEX_ID',
   task: 'TEZ_TASK_ID',
-	taskAttempt: 'TEZ_TASK_ATTEMPT_ID'
+  taskAttempt: 'TEZ_TASK_ATTEMPT_ID',
+  tezApp: 'TEZ_APPLICATION'
 };
 
 App.TimelineRESTAdapter = DS.RESTAdapter.extend({
@@ -330,3 +331,91 @@ App.VertexSerializer = App.TimelineSerializer.extend({
     return Em.JsonMapper.map(hash, timelineJsonToVertexMap);
   },
 });
+
+var timelineJsonToAppDetailMap = {
+  id: 'appId',
+  attemptId: 'currentAppAttemptId',
+
+  name: 'name',
+  queue: 'queue',
+  user: 'user',
+  type: 'type',
+
+  startedTime: 'startedTime',
+  elapsedTime: 'elapsedTime',
+  finishedTime: 'finishedTime',
+  submittedTime: 'submittedTime',
+
+  appState: 'appState',
+
+  finalAppStatus: 'finalAppStatus',
+  diagnostics: 'otherinfo.diagnostics',
+};
+
+App.AppDetailSerializer = App.TimelineSerializer.extend({
+  normalize: function(type, hash, prop) {
+    return Em.JsonMapper.map(hash, timelineJsonToAppDetailMap);
+  },
+});
+
+var timelineJsonToTezAppMap = {
+  id: 'entity',
+
+  appId: 'appId',
+
+  entityType: 'entitytype',
+
+  startedTime: 'startedTime',
+  domain: 'domain',
+
+  dags: 'relatedentities.TEZ_DAG_ID',
+  configs: 'configs'
+};
+
+App.TezAppSerializer = App.TimelineSerializer.extend({
+  _normalizeSinglePayload: function(rawPayload){
+    var configs = rawPayload.otherinfo.config,
+    appId = rawPayload.entity.substr(4),
+    kVData = [],
+    id;
+
+    rawPayload.appId = appId;
+    rawPayload.configs = [];
+
+    for(var key in configs) {
+      id = appId + key;
+      rawPayload.configs.push(id);
+      kVData.push({
+        id: id,
+        key: key,
+        value: configs[key]
+      });
+    }
+
+    return {
+      tezApp: rawPayload,
+      kVData: kVData
+    };
+  },
+  normalizePayload: function(rawPayload) {
+    if (!!rawPayload.tezApps) {
+      var normalizedPayload = {
+        tezApps: [],
+        kVData: []
+      },
+      push = Array.prototype.push;
+      rawPayload.tezApps.forEach(function(app){
+        var n = this._normalizeSinglePayload(app);
+        normalizedPayload.tezApps.push(n.tezApp);
+        push.apply(normalizedPayload.kVData,n.kVData);
+      });
+      return normalizedPayload;
+    }
+    else {
+      return this._normalizeSinglePayload(rawPayload.tezApp)
+    }
+  },
+  normalize: function(type, hash, prop) {
+    return Em.JsonMapper.map(hash, timelineJsonToTezAppMap);
+  },
+});

http://git-wip-us.apache.org/repos/asf/tez/blob/28ef6ec8/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 1bd3182..2dbb0d7 100644
--- a/tez-ui/src/main/webapp/app/scripts/models/dag.js
+++ b/tez-ui/src/main/webapp/app/scripts/models/dag.js
@@ -217,6 +217,40 @@ App.Vertex = DS.Model.extend({
   }.property('duration')
 });
 
+App.AppDetail = DS.Model.extend({
+  attemptId: DS.attr('string'),
+
+  user: DS.attr('string'),
+  name: DS.attr('string'),
+  queue: DS.attr('string'),
+  type: DS.attr('string'),
+
+  appState: DS.attr('string'),
+  finalAppStatus: DS.attr('string'),
+  progress: DS.attr('string'),
+
+  startedTime: DS.attr('number'),
+  elapsedTime: DS.attr('number'),
+  finishedTime: DS.attr('number'),
+  submittedTime: DS.attr('number'),
+
+  diagnostics: DS.attr('string'),
+});
+
+App.TezApp = DS.Model.extend({
+  appId: DS.attr('string'),
+  entityType: DS.attr('string'),
+  domain: DS.attr('string'),
+
+  startedTime: DS.attr('number'),
+
+  appDetail: DS.belongsTo('appDetail', { async: true }),
+  dags: DS.hasMany('dag', { async: true }),
+
+  configs: DS.hasMany('kVData', { async: false })
+});
+
+
 App.Task = App.AbstractEntity.extend({
   status: DS.attr('status'),
 
@@ -235,6 +269,11 @@ App.Task = App.AbstractEntity.extend({
   counterGroups: DS.hasMany('counterGroup', { inverse: 'parent' })
 });
 
+App.KVDatum = DS.Model.extend({
+  key: DS.attr('string'),
+  value: DS.attr('string'),
+});
+
 App.VertexState = {
   NEW: "NEW",
   INITIALIZING: "INITIALIZING",

http://git-wip-us.apache.org/repos/asf/tez/blob/28ef6ec8/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 c2bcca8..5da59db 100644
--- a/tez-ui/src/main/webapp/app/scripts/router.js
+++ b/tez-ui/src/main/webapp/app/scripts/router.js
@@ -19,12 +19,17 @@
 App.Router.map(function() {
 	this.resource('dags', { path: '/' });
 	this.resource('dag', { path: '/dag/:dag_id'}, function() {
-		this.route('vertices'),
-		this.route('tasks'),
-		this.route('counters'),
-		this.route('swimlane')
+		this.route('vertices');
+		this.route('tasks');
+		this.route('counters');
+		this.route('swimlane');
 	});
 
+  this.resource('tez-app', {path: '/tez-app/:app_id'}, function(){
+    this.route('dags');
+    this.route('configs');
+  });
+
   this.resource('vertex', {path: '/vertex/:vertex_id'}, function(){
     this.route('tasks');
     this.route('counters');
@@ -226,4 +231,50 @@ App.TaskAttemptsRoute = Em.Route.extend({
     this._super(controller, model);
     controller.loadData();
   }
-});
\ No newline at end of file
+});
+
+App.TezAppRoute = Em.Route.extend({
+  model: function(params) {
+    var store = this.store;
+    return store.find('tezApp', 'tez_' + params.app_id).then(function(tezApp){
+      return store.find('appDetail', tezApp.get('appId')).then(function(appDetails){
+        tezApp.set('appDetail', appDetails);
+        return tezApp;
+      });
+    });
+  },
+});
+
+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
+    }
+  },
+
+  setupController: function(controller, model) {
+    this._super(controller, model);
+    controller.loadData();
+  }
+});
+
+App.TezAppConfigsRoute = Em.Route.extend({
+  setupController: function(controller, model) {
+    this._super(controller, model);
+    controller.loadData();
+  }
+});
+

http://git-wip-us.apache.org/repos/asf/tez/blob/28ef6ec8/tez-ui/src/main/webapp/app/templates/tez-app.hbs
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/templates/tez-app.hbs b/tez-ui/src/main/webapp/app/templates/tez-app.hbs
new file mode 100644
index 0000000..e4fba4e
--- /dev/null
+++ b/tez-ui/src/main/webapp/app/templates/tez-app.hbs
@@ -0,0 +1,43 @@
+{{!
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+}}
+
+{{partial "utils/pageHeader"}}
+{{#unless loading}}
+  <div class='type-table fill-full '>
+    <div class='align-left'>
+      <table class='detail-list'>
+        <tbody>
+          <tr>
+            <td>App Id</td>
+            <td><a href="{{unbound RMWebUrl}}/cluster/app/tez_{{unbound id}}">{{unbound id}}</a></td>
+          </tr>
+          <tr>
+            <td>Attempt Id</td>
+            <td>{{appDetail.attemptId}}</td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <div class='pill-container align-right'>
+      {{bs-pills contentBinding='childDisplayViews' selectedBinding='childDisplayViewSelected' size='lg'}}
+    </div>
+  </div>
+  {{outlet}}
+{{else}}
+    {{partial 'utils/loadingSpinner'}}
+{{/unless}}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tez/blob/28ef6ec8/tez-ui/src/main/webapp/app/templates/tez-app/configs.hbs
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/templates/tez-app/configs.hbs b/tez-ui/src/main/webapp/app/templates/tez-app/configs.hbs
new file mode 100644
index 0000000..4662279
--- /dev/null
+++ b/tez-ui/src/main/webapp/app/templates/tez-app/configs.hbs
@@ -0,0 +1,46 @@
+{{!
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+}}
+
+{{#unless loading}}
+  <div class='margin-small'>
+    <span class='align-right'>
+      {{page-nav-component
+        hasPrev=hasPrev
+        hasNext=hasNext
+        navNext='navigateNext'
+        navPrev='navigatePrev'
+        navFirst='navigateFirst'
+      }}
+    </span>
+    <div class='align-clear'> </div>
+  </div>
+
+  <div class='table-container'>
+  {{extended-table-component 
+    hasFooter=false
+    enableContentSelection=true
+    columnsBinding="columns"
+    contentBinding="sortedContent"
+    forceFillColumns=true
+    hasFilter=true
+    onFilterUpdated='filterUpdated'
+  }}
+  </div>
+{{else}}
+  {{partial 'utils/loadingSpinner'}}
+{{/unless}}

http://git-wip-us.apache.org/repos/asf/tez/blob/28ef6ec8/tez-ui/src/main/webapp/app/templates/tez-app/dags.hbs
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/templates/tez-app/dags.hbs b/tez-ui/src/main/webapp/app/templates/tez-app/dags.hbs
new file mode 100644
index 0000000..4662279
--- /dev/null
+++ b/tez-ui/src/main/webapp/app/templates/tez-app/dags.hbs
@@ -0,0 +1,46 @@
+{{!
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+}}
+
+{{#unless loading}}
+  <div class='margin-small'>
+    <span class='align-right'>
+      {{page-nav-component
+        hasPrev=hasPrev
+        hasNext=hasNext
+        navNext='navigateNext'
+        navPrev='navigatePrev'
+        navFirst='navigateFirst'
+      }}
+    </span>
+    <div class='align-clear'> </div>
+  </div>
+
+  <div class='table-container'>
+  {{extended-table-component 
+    hasFooter=false
+    enableContentSelection=true
+    columnsBinding="columns"
+    contentBinding="sortedContent"
+    forceFillColumns=true
+    hasFilter=true
+    onFilterUpdated='filterUpdated'
+  }}
+  </div>
+{{else}}
+  {{partial 'utils/loadingSpinner'}}
+{{/unless}}

http://git-wip-us.apache.org/repos/asf/tez/blob/28ef6ec8/tez-ui/src/main/webapp/app/templates/tez-app/index.hbs
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/templates/tez-app/index.hbs b/tez-ui/src/main/webapp/app/templates/tez-app/index.hbs
new file mode 100644
index 0000000..90a335b
--- /dev/null
+++ b/tez-ui/src/main/webapp/app/templates/tez-app/index.hbs
@@ -0,0 +1,80 @@
+{{!
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+}}
+
+<div class='type-table fill-full margin-small-horizontal'>
+  <div class='align-left'>
+    <table class='detail-list'>
+      <tbody>
+        <tr>
+          <td>App Name</td>
+          <td>
+            {{appDetail.name}}
+          </td>
+        </tr>
+        <tr>
+          <td>Queue</td>
+          <td>
+            {{appDetail.queue}}
+          </td>
+        </tr>
+        <tr>
+          <td>User</td>
+          <td>{{appDetail.user}}</td>
+        </tr>
+        <tr>
+          <td>Type</td>
+          <td>{{appDetail.type}}</td>
+        </tr>
+        <tr>
+          <td>App State</td>
+          <td>
+            {{appDetail.appState}}
+          </td>
+        </tr>
+        <tr>
+          <td>Final App Status</td>
+          <td>{{appDetail.finalAppStatus}}</td>
+        </tr>
+      </tbody>
+    </table>
+  </div>
+  <div class='align-right'>
+    <table class='detail-list'>
+      <tbody>
+        <tr>
+          <td>{{t common.time.start}}</td>
+          <td>{{formatUnixTimestamp appDetail.startedTime}}</td>
+        </tr>
+        <tr>
+          <td>{{t common.time.end}}</td>
+          <td>{{formatUnixTimestamp appDetail.finishedTime}}</td>
+        </tr>
+        <tr>
+          <td>{{t common.time.duration}}</td>
+          <td>{{formatDuration appDetail.startedTime appDetail.finishedTime}}</td>
+        </tr>
+      </tbody>
+    </table>
+  </div>
+</div>
+
+{{#if diagnostics}}
+  {{#bs-panel heading="Diagnostics" collapsible=false dismiss=false type='danger'}}
+    {{formatDiagnostics diagnostics}}
+  {{/bs-panel}}
+{{/if}}
\ No newline at end of file


[3/3] tez git commit: TEZ-1753. Queue in dags view. (Sreenath Somarajapuram via hitesh)

Posted by hi...@apache.org.
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/TEZ-8
Commit: 7ef637b1ee7638ec424743e3e0c057cba1b4b0dd
Parents: 40dc947
Author: Hitesh Shah <hi...@apache.org>
Authored: Mon Nov 10 22:06:13 2014 -0800
Committer: Hitesh Shah <hi...@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'),


[2/3] tez git commit: TEZ-1751. Log view & download links in task and task attempt view. (Sreenath Somarajapuram via hitesh)

Posted by hi...@apache.org.
TEZ-1751. Log view & download links in task and task attempt 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/40dc947a
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/40dc947a
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/40dc947a

Branch: refs/heads/TEZ-8
Commit: 40dc947a27f60362103e63f453294229e556e7a0
Parents: 28ef6ec
Author: Hitesh Shah <hi...@apache.org>
Authored: Mon Nov 10 22:04:38 2014 -0800
Committer: Hitesh Shah <hi...@apache.org>
Committed: Mon Nov 10 22:04:38 2014 -0800

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../webapp/app/scripts/controllers/dag_tasks.js | 52 +++++++++++++++++++-
 .../task_task_attempts_controller.js            | 25 +++++++++-
 .../controllers/vertex_tasks_controller.js      | 52 +++++++++++++++++++-
 .../app/scripts/models/TimelineRestAdapter.js   |  6 +++
 .../src/main/webapp/app/scripts/models/dag.js   |  6 +++
 .../webapp/app/scripts/models/task_attempt.js   |  3 ++
 7 files changed, 141 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/40dc947a/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 9cc4e82..e5a23ce 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -14,6 +14,7 @@ ALL CHANGES:
   TEZ-1708. Make UI part of TEZ build process.
   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.
 
 Release 0.5.2: Unreleased
 

http://git-wip-us.apache.org/repos/asf/tez/blob/40dc947a/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 43e6809..a7d3c38 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
@@ -42,6 +42,33 @@ App.DagTasksController = Em.ObjectController.extend(App.PaginatedContentMixin, {
     this.setFiltersAndLoadEntities(filters);
   },
 
+  loadEntities: function() {
+    var that = this,
+    store = this.get('store'),
+    fetcher;
+    childEntityType = this.get('childEntityType');
+
+    store.unloadAll(childEntityType);
+    store.findQuery(childEntityType, this.getFilterProperties()).then(function(entities){
+      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);
+      });
+      Em.RSVP.allSettled(pivotLoaders).then(function(){
+        that.set('loading', false);
+      });
+    }).catch(function(jqXHR){
+      if(console) console.log(jqXHR);
+      alert('failed');
+    });
+  },
+
   actions : {
     filterUpdated: function(filterID, value) {
       // any validations required goes here.
@@ -118,6 +145,29 @@ App.DagTasksController = Em.ObjectController.extend(App.PaginatedContentMixin, {
       contentPath: 'id'
     });
 
-		return [idCol, vertexCol, startTimeCol, runTimeCol, statusCol, actionsCol];
+    var logs = App.ExTable.ColumnDefinition.create({
+      textAlign: 'text-align-left',
+      headerCellName: 'Logs',
+      tableCellViewClass: Em.Table.TableCell.extend({
+        template: Em.Handlebars.compile(
+          '<span class="ember-table-content">\
+            {{#unless view.cellContent}}\
+              Not Available\
+            {{else}}\
+              <a href="//{{unbound view.cellContent}}">View</a>\
+              &nbsp;\
+              <a href="//{{unbound view.cellContent}}?start=0" download target="_blank" type="application/octet-stream">Download</a>\
+            {{/unless}}\
+          </span>')
+      }),
+      getCellContent: function(row) {
+        var attempt = row.get('pivotAttempt');
+        var logFile = attempt && (attempt.get('inProgressLog') || attempt.get('completedLog'));
+        if(logFile) logFile += "/syslog_" + attempt.get('id');
+        return logFile;
+      }
+    });
+
+		return [idCol, vertexCol, startTimeCol, runTimeCol, statusCol, actionsCol, logs];
 	}.property(),
 });
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tez/blob/40dc947a/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 f795319..1b48277 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
@@ -102,7 +102,28 @@ App.TaskAttemptsController = Em.ObjectController.extend(App.PaginatedContentMixi
       contentPath: 'containerId'
     });
 
-		return [idCol, startTimeCol, endTimeCol, statusCol, nodeIdCol, containerCol];
+    var logs = App.ExTable.ColumnDefinition.create({
+      textAlign: 'text-align-left',
+      headerCellName: 'Logs',
+      tableCellViewClass: Em.Table.TableCell.extend({
+        template: Em.Handlebars.compile(
+          '<span class="ember-table-content">\
+            {{#unless view.cellContent}}\
+              Not Available\
+            {{else}}\
+              <a href="//{{unbound view.cellContent}}">View</a>\
+              &nbsp;\
+              <a href="//{{unbound view.cellContent}}?start=0" download target="_blank" type="application/octet-stream">Download</a>\
+            {{/unless}}\
+          </span>')
+      }),
+      getCellContent: function(row) {
+        var logFile = row.get('inProgressLog') || row.get('completedLog');
+        if(logFile) logFile += "/syslog_" + row.get('id');
+        return logFile;
+      }
+    });
+    return [idCol, startTimeCol, endTimeCol, statusCol, nodeIdCol, containerCol, logs];
 	}.property(),
 });
 
@@ -114,4 +135,4 @@ App.TaskAttemptIndexController = Em.ObjectController.extend({
     return App.Helpers.misc.getStatusClassForEntity(this.get('model'));
   }.property('id', 'status', 'counterGroups'),
 
-});
\ No newline at end of file
+});

http://git-wip-us.apache.org/repos/asf/tez/blob/40dc947a/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 51f3f5e..a093d86 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
@@ -39,6 +39,33 @@ App.VertexTasksController = Em.ObjectController.extend(App.PaginatedContentMixin
     this.setFiltersAndLoadEntities(filters);
   },
 
+  loadEntities: function() {
+    var that = this,
+    store = this.get('store'),
+    fetcher;
+    childEntityType = this.get('childEntityType');
+
+    store.unloadAll(childEntityType);
+    store.findQuery(childEntityType, this.getFilterProperties()).then(function(entities){
+      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);
+      });
+      Em.RSVP.allSettled(pivotLoaders).then(function(){
+        that.set('loading', false);
+      });
+    }).catch(function(jqXHR){
+      if(console) console.log(jqXHR);
+      alert('failed');
+    });
+  },
+
   actions : {
     filterUpdated: function(filterID, value) {
       // any validations required goes here.
@@ -110,6 +137,29 @@ App.VertexTasksController = Em.ObjectController.extend(App.PaginatedContentMixin
       contentPath: 'node'
     });
 
-    return [idCol, vertexCol, startTimeCol, endTimeCol, statusCol];
+    var logs = App.ExTable.ColumnDefinition.create({
+      textAlign: 'text-align-left',
+      headerCellName: 'Logs',
+      tableCellViewClass: Em.Table.TableCell.extend({
+        template: Em.Handlebars.compile(
+          '<span class="ember-table-content">\
+            {{#unless view.cellContent}}\
+              Not Available\
+            {{else}}\
+              <a href="//{{unbound view.cellContent}}">View</a>\
+              &nbsp;\
+              <a href="//{{unbound view.cellContent}}?start=0" download target="_blank" type="application/octet-stream">Download</a>\
+            {{/unless}}\
+          </span>')
+      }),
+      getCellContent: function(row) {
+        var attempt = row.get('pivotAttempt');
+        var logFile = attempt && (attempt.get('inProgressLog') || attempt.get('completedLog'));
+        if(logFile) logFile += "/syslog_" + attempt.get('id');
+        return logFile;
+      }
+    });
+
+    return [idCol, vertexCol, startTimeCol, endTimeCol, statusCol, logs];
   }.property(),
 });
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tez/blob/40dc947a/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 468b906..c9e470a 100644
--- a/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js
+++ b/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js
@@ -157,6 +157,10 @@ var timelineJsonToTaskAttemptMap = {
   status: 'otherinfo.status',
   diagnostics: 'otherinfo.diagnostics',
   counterGroups: 'counterGroups',
+
+  inProgressLog: 'otherinfo.inProgressLogsURL',
+  completedLog: 'otherinfo.completedLogsURL',
+
   vertexID: 'primaryfilters.TEZ_VERTEX_ID.0',
   dagID: 'primaryfilters.TEZ_DAG_ID.0',
   containerId: { custom: function (source) {
@@ -223,6 +227,8 @@ var timelineJsonToTaskMap = {
   status: 'otherinfo.status',
   diagnostics: 'otherinfo.diagnostics',
   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'

http://git-wip-us.apache.org/repos/asf/tez/blob/40dc947a/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 2dbb0d7..05390c0 100644
--- a/tez-ui/src/main/webapp/app/scripts/models/dag.js
+++ b/tez-ui/src/main/webapp/app/scripts/models/dag.js
@@ -255,6 +255,10 @@ App.Task = App.AbstractEntity.extend({
   status: DS.attr('status'),
 
   dagID: DS.attr('string'),
+
+  successfulAttemptId: DS.attr('string'),
+
+  attempts: DS.attr('array'),
   
   vertexID: DS.attr('string'),
 
@@ -266,6 +270,8 @@ App.Task = App.AbstractEntity.extend({
 
   numAttempts: DS.attr('number'),
 
+  pivotAttempt: DS.belongsTo('taskAttempt'),
+
   counterGroups: DS.hasMany('counterGroup', { inverse: 'parent' })
 });
 

http://git-wip-us.apache.org/repos/asf/tez/blob/40dc947a/tez-ui/src/main/webapp/app/scripts/models/task_attempt.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/models/task_attempt.js b/tez-ui/src/main/webapp/app/scripts/models/task_attempt.js
index db1d3c1..d7acbe1 100644
--- a/tez-ui/src/main/webapp/app/scripts/models/task_attempt.js
+++ b/tez-ui/src/main/webapp/app/scripts/models/task_attempt.js
@@ -39,5 +39,8 @@ App.TaskAttempt = App.AbstractEntity.extend({
 
   dagID: DS.attr('string'),
 
+  inProgressLog: DS.attr('string'),
+  completedLog: DS.attr('string'),
+
   counterGroups: DS.hasMany('counterGroup', { inverse: 'parent' })
 });