ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject [10/34] ambari git commit: AMBARI-20719.Need to show decision conditions for decision node in Flow Graph tab(M Madhan Mohan Reddy via venkatasairam.lanka)
Date Mon, 17 Apr 2017 20:18:04 GMT
AMBARI-20719.Need to show decision conditions for decision node in Flow Graph tab(M Madhan
Mohan Reddy via venkatasairam.lanka)


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

Branch: refs/heads/branch-feature-AMBARI-12556
Commit: a5dc75ecee205c5cb8a1600c0e00232426256209
Parents: 3e01abd
Author: Venkata Sairam <venkatasairam.lanka@gmail.com>
Authored: Thu Apr 13 16:58:13 2017 +0530
Committer: Venkata Sairam <venkatasairam.lanka@gmail.com>
Committed: Thu Apr 13 16:58:13 2017 +0530

----------------------------------------------------------------------
 .../resources/ui/app/components/job-details.js  | 30 +++++++++++++++++++-
 .../components/workflow-job-details.hbs         |  6 ++++
 2 files changed, 35 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/a5dc75ec/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 e74c873..70ba41c 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
@@ -327,7 +327,18 @@ export default Ember.Component.extend({
                   return "none";
                 }
               },
-              'target-arrow-color': 'data(borderColor)'
+              'target-arrow-color': 'data(borderColor)',
+              'color': '#262626',
+              'font-size': 12,
+              label: function(target) {
+                if (!target.data().transition || !target.data().transition.condition) {
+                  return "";
+                }else if (target.data().transition.condition.length>5){
+                  return target.data().transition.condition.slice(0, 5)+"...";
+                }else{
+                  return target.data().transition.condition;
+                }
+              }
             }
           }
         ],
@@ -354,6 +365,23 @@ export default Ember.Component.extend({
         var node = event.cyTarget;
         this.showActionNodeDetail(node, xmlString);
       }.bind(this));
+
+      cy.on('mousemove', 'edge', function(event) {
+        this.get("context").$(".overlay-transition-content, .decision-condition-label").hide();
+        if (event.cyTarget.data().transition && event.cyTarget.data().transition.condition)
{
+          this.get("context").$(".decision-condition-body").html(event.cyTarget.data().transition.condition);
+          this.get("context").$(".overlay-transition-content").css({
+            top: event.originalEvent.offsetY + 10,
+            left: event.originalEvent.offsetX + 15
+          });
+          this.get("context").$(".overlay-transition-content, .decision-condition-label").show();
+        }
+      }.bind(this));
+
+      cy.on('mouseout', 'edge',function(event) {
+        this.get("context").$(".overlay-transition-content").hide();
+      }.bind(this));
+
       this.set("model.inProgress", false);
     },
     importSampleWorkflow (){

http://git-wip-us.apache.org/repos/asf/ambari/blob/a5dc75ec/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-job-details.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-job-details.hbs
b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-job-details.hbs
index 0c5257e..9c940a2 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-job-details.hbs
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-job-details.hbs
@@ -203,6 +203,12 @@
               <div class="cy-note"><div class="pull-right">Click on node to get
details</div></div>
             {{/if}}
             <div id="cy" class="cy-panel"></div>
+            <div class="overlay-transition-content">
+              <div class="decision-condition-label">
+                <div class="decision-condition-header">Condition</div>
+                <div class="decision-condition-body"></div>
+              </div>
+            </div>
           </div>
           <div class="col-xs-4">
             {{#if model.nodeName}}


Mime
View raw message