You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sr...@apache.org on 2014/02/11 21:51:36 UTC

git commit: AMBARI-4610. Tez DAG edges should be should show edge-type (srimanth)

Updated Branches:
  refs/heads/trunk e4ac9eda7 -> 91af8962d


AMBARI-4610. Tez DAG edges should be should show edge-type (srimanth)


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

Branch: refs/heads/trunk
Commit: 91af8962d1c85077328ad29f09720582cdf64908
Parents: e4ac9ed
Author: Srimanth Gunturi <sg...@hortonworks.com>
Authored: Tue Feb 11 10:17:50 2014 -0800
Committer: Srimanth Gunturi <sg...@hortonworks.com>
Committed: Tue Feb 11 12:51:05 2014 -0800

----------------------------------------------------------------------
 ambari-web/app/styles/application.less           | 10 +++++++++-
 .../main/jobs/hive_job_details_tez_dag.hbs       |  2 +-
 .../main/jobs/hive_job_details_tez_dag_view.js   | 19 +++++++++++++++++--
 3 files changed, 27 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/91af8962/ambari-web/app/styles/application.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less
index d947bf0..15fb52a 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -5529,7 +5529,15 @@ i.icon-asterisks {
     path.link {
       fill: none;
       stroke: #666;
-      stroke-width: 1.5px;
+      stroke-width: 5px;
+      opacity: 0.6;
+    }
+    path.link.type-broadcast {
+      stroke: teal;
+    }
+    path.link.type-scatter-gather {
+      stroke: orange;
+      stroke-dasharray: 10,3;
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/91af8962/ambari-web/app/templates/main/jobs/hive_job_details_tez_dag.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/jobs/hive_job_details_tez_dag.hbs b/ambari-web/app/templates/main/jobs/hive_job_details_tez_dag.hbs
index 28787ee..c4b71df 100644
--- a/ambari-web/app/templates/main/jobs/hive_job_details_tez_dag.hbs
+++ b/ambari-web/app/templates/main/jobs/hive_job_details_tez_dag.hbs
@@ -19,7 +19,7 @@
 <div id="tez-dag-section-body-dag">
   <svg id="tez-dag-svg" stroke="black" strokeWidth="2">
     <defs>
-      <marker id="arrow" viewBox="0 -5 10 10" refX="6" markerWidth="10" markerHeight="10" orient="auto">
+      <marker id="arrow" viewBox="0 -5 10 10" refX="4" markerWidth="3" markerHeight="3" orient="auto">
         <path d="M0,-5L10,0L0,5"></path>
       </marker>
       <filter id="shadow" width="200%" height="200%">

http://git-wip-us.apache.org/repos/asf/ambari/blob/91af8962/ambari-web/app/views/main/jobs/hive_job_details_tez_dag_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/jobs/hive_job_details_tez_dag_view.js b/ambari-web/app/views/main/jobs/hive_job_details_tez_dag_view.js
index 21c3472..f90ccfe 100644
--- a/ambari-web/app/views/main/jobs/hive_job_details_tez_dag_view.js
+++ b/ambari-web/app/views/main/jobs/hive_job_details_tez_dag_view.js
@@ -367,11 +367,26 @@ App.MainHiveJobDetailsTezDagView = Em.View.extend({
     }).target(function(d) {
       return {
         x : d.target.incomingX,
-        y : d.target.incomingY - 10
+        y : d.target.incomingY - 12
       }
     });
     var link = svgLayer.selectAll(".link").data(dagVisualModel.links).enter().append("g").attr("class", "link").attr("marker-end", "url(#arrow)");
-    link.append("path").attr("class", "link").attr("d", diagonal);
+    link.append("path").attr("class", function(l) {
+      var classes = "link ";
+      switch (l.edgeType) {
+      case App.TezDagVertexType.BROADCAST:
+        classes += "type-broadcast ";
+        break;
+      case App.TezDagVertexType.SCATTER_GATHER:
+        classes += "type-scatter-gather ";
+        break;
+      default:
+        break;
+      }
+      return classes;
+    }).attr("d", diagonal).append("title").text(function(l) {
+      return l.edgeType;
+    });
     // Create Nodes
     var node = svgLayer.selectAll(".node").data(dagVisualModel.nodes).enter().append("g").attr("class", "node");
     node.append("rect").attr("class", "background").attr("width", function(n) {