ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject [16/50] [abbrv] ambari git commit: AMBARI-19956. Workflow Manager Flow Graph should show line transition to decision path and error node (Madhan Mohan Reddy via gauravn7).
Date Mon, 13 Feb 2017 22:13:24 GMT
AMBARI-19956. Workflow Manager Flow Graph should show line transition to decision path and
error node (Madhan Mohan Reddy via gauravn7).


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

Branch: refs/heads/branch-feature-AMBARI-12556
Commit: b15b60646c3d8a0b39579718f48e0076c26a6142
Parents: 1339d52
Author: Gaurav Nagar <grvngr@gmail.com>
Authored: Fri Feb 10 16:50:55 2017 +0530
Committer: Gaurav Nagar <grvngr@gmail.com>
Committed: Fri Feb 10 16:50:55 2017 +0530

----------------------------------------------------------------------
 .../resources/ui/app/components/job-details.js  | 43 ++++++++++++++++----
 1 file changed, 34 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b15b6064/contrib/views/wfmanager/src/main/resources/ui/app/components/job-details.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/job-details.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/job-details.js
index 6507c49..d1343b0 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/components/job-details.js
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/job-details.js
@@ -192,7 +192,7 @@ export default Ember.Component.extend({
     var dataNodes = [];
     var self=this;
     workflow.nodeVisitor.process(workflow.startNode, function(node) {
-      if (node.type === 'kill') {
+      if (node.type === 'kill' && !(node.forceRenderNode || self.getActionNode(node.name,
node.type))) {
         return;
       }
       var nodeActionStatus = self.getActionStatus(node.name, node.type);
@@ -206,18 +206,28 @@ export default Ember.Component.extend({
       });
         if (node.transitions.length > 0) {
           node.transitions.forEach(function(tran){
-            if (tran.targetNode.type === 'kill') {
-              return;
-            }
             var transitionBorderColor;
             var actionNode = self.getActionNode(node.name, node.type);
-            if (actionNode && (actionNode.transition===tran.targetNode.name ||actionNode.transition==='*')){
-              transitionBorderColor = Constants.successfulFlowColor;//green
+            if (tran.targetNode.type === 'kill' &&
+              !((actionNode && actionNode.transition===tran.targetNode.name) || (node.isPlaceholder())))
{
+              return;
+            }
+             if (tran.getTargetNode(true).isKillNode()  && !tran.isOnError()){
+              tran.targetNode.forceRenderNode = true;
+             }
+            if (actionNode && (actionNode.transition===tran.targetNode.name ||actionNode.transition==='*'
|| (tran.targetNode.isPlaceholder() && actionNode.transition===tran.getTargetNode(true).name)))
{
+              transitionBorderColor = Constants.successfulFlowColor;
+              if (tran.targetNode.isPlaceholder()) {
+                tran.targetNode.successfulFlow = true;
+              }
             }else{
-              transitionBorderColor = Constants.defaultFlowColor;//grey
+              transitionBorderColor = Constants.defaultFlowColor;
             }
             if (!actionNode){
-              transitionBorderColor = Constants.defaultFlowColor;//grey
+              transitionBorderColor = Constants.defaultFlowColor;
+              if (node.isPlaceholder() && node.successfulFlow) {
+                transitionBorderColor = Constants.successfulFlowColor;
+              }
             }
             dataNodes.push(
               {
@@ -225,6 +235,7 @@ export default Ember.Component.extend({
                   id: tran.sourceNodeId + '_to_' + tran.targetNode.id,
                   source:tran.sourceNodeId,
                   target: tran.targetNode.id,
+                  transition: tran,
                   borderColor: transitionBorderColor
                 }
               }
@@ -268,6 +279,14 @@ export default Ember.Component.extend({
             }
           },
           {
+            selector: 'node[type = "placeholder"]',
+            style: {
+              width: 1,
+              height: 1,
+              label: ''
+            }
+          },
+          {
             selector: 'node[shape = "roundrectangle"]',
             style: {
               width: 100,
@@ -294,7 +313,13 @@ export default Ember.Component.extend({
               width: 1,
               'line-color': 'data(borderColor)',
               'curve-style': 'bezier',
-      				'target-arrow-shape': 'triangle',
+              'target-arrow-shape': function(target){
+                if (target.data().transition && target.data().transition.getTargetNode(false)
&& !target.data().transition.getTargetNode(false).isPlaceholder()) {
+                  return "triangle";
+                }else{
+                  return "none";
+                }
+              },
               'target-arrow-color': 'data(borderColor)'
             }
           }


Mime
View raw message