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

tez git commit: TEZ-1983. Tez UI swimlane task attempt link is broken (jeagles)

Repository: tez
Updated Branches:
  refs/heads/master 3cb20e368 -> 59ca1f008


TEZ-1983. Tez UI swimlane task attempt link is broken (jeagles)


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

Branch: refs/heads/master
Commit: 59ca1f008c6f21acaa2d3444d5a014bfca86e6f9
Parents: 3cb20e3
Author: Jonathan Eagles <je...@gmail.com>
Authored: Wed Jan 21 09:31:30 2015 -0600
Committer: Jonathan Eagles <je...@gmail.com>
Committed: Wed Jan 21 09:31:30 2015 -0600

----------------------------------------------------------------------
 CHANGES.txt                                              |  1 +
 .../app/scripts/controllers/dag_swimlane_controller.js   |  6 ++++++
 .../src/main/webapp/app/scripts/views/swimlane_view.js   | 11 +++++------
 3 files changed, 12 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/59ca1f00/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index e885ea6..5f49b7b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -48,6 +48,7 @@ Release 0.6.1: Unreleased
 INCOMPATIBLE CHANGES
 
 ALL CHANGES:
+  TEZ-1983. Tez UI swimlane task attempt link is broken
 
 Release 0.6.0: Unreleased
 

http://git-wip-us.apache.org/repos/asf/tez/blob/59ca1f00/tez-ui/src/main/webapp/app/scripts/controllers/dag_swimlane_controller.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/dag_swimlane_controller.js b/tez-ui/src/main/webapp/app/scripts/controllers/dag_swimlane_controller.js
index a49d54d..9edb5dd 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/dag_swimlane_controller.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/dag_swimlane_controller.js
@@ -32,4 +32,10 @@ App.DagSwimlaneController = Em.ArrayController.extend({
 
     return filterParams;
   },
+
+  actions: {
+    taskAttemptClicked: function (id) {
+      this.transitionToRoute('taskAttempt', id);
+    },
+  },
 });

http://git-wip-us.apache.org/repos/asf/tez/blob/59ca1f00/tez-ui/src/main/webapp/app/scripts/views/swimlane_view.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/views/swimlane_view.js b/tez-ui/src/main/webapp/app/scripts/views/swimlane_view.js
index 058466f..80f1d57 100644
--- a/tez-ui/src/main/webapp/app/scripts/views/swimlane_view.js
+++ b/tez-ui/src/main/webapp/app/scripts/views/swimlane_view.js
@@ -20,6 +20,7 @@ App.SwimlanesView = Ember.View.extend({
 
   didInsertElement: function() {
     var task_attempts = this.get("content");
+    var controller = this.get("controller");
     var timeBegin = d3.min(task_attempts, function (d) { return d.get('startTime') });
     var timeEnd = d3.max(task_attempts, function (d) { return d.get('endTime') });
     var containers = d3.set(task_attempts.map(function (d) {return d.get('containerId')})).values().sort();
@@ -112,14 +113,12 @@ App.SwimlanesView = Ember.View.extend({
       .duration(200)
       .style("opacity", .9);
       div .html(
-        // TODO: Replace with correct route to task attempt
-        '<a href= "/task_attempt/' + d.get('id') + '">' +
         d.get('id') +
-          "</a>" +
-          "<br/>Start: " + moment(d.get('startTime')).format() +
-          "<br/>End: " + moment(d.get('endTime')).format())
+        "<br/>Start: " + moment(d.get('startTime')).format() +
+        "<br/>End: " + moment(d.get('endTime')).format())
         .style("left", (d3.event.pageX) + "px")
-        .style("top", (d3.event.pageY - 28) + "px");
+        .style("top", (d3.event.pageY - 28) + "px")
+        .on("click", function () {controller.send('taskAttemptClicked', d.get('id'))});
     });
 
     /*