ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vsai...@apache.org
Subject ambari git commit: AMBARI-21266.Workflow submission fails when action node names contain white space(Venkata Sairam)
Date Thu, 22 Jun 2017 03:56:25 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 33955935d -> c4605d255


AMBARI-21266.Workflow submission fails when action node names contain white space(Venkata
Sairam)


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

Branch: refs/heads/branch-2.5
Commit: c4605d25586bea3e131f6d847ba0efbe1aceb64c
Parents: 3395593
Author: Venkata Sairam <venkatasairam.lanka@gmail.com>
Authored: Thu Jun 22 09:25:17 2017 +0530
Committer: Venkata Sairam <venkatasairam.lanka@gmail.com>
Committed: Thu Jun 22 09:26:14 2017 +0530

----------------------------------------------------------------------
 .../src/main/resources/ui/app/domain/workflow-xml-generator.js    | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/c4605d25/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-xml-generator.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-xml-generator.js
b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-xml-generator.js
index a6e1eeb..4d63cbd 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-xml-generator.js
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-xml-generator.js
@@ -115,6 +115,9 @@ var WorkflowGenerator= Ember.Object.extend({
       if (jobHandler){
 
         jobHandler.setContext(this.workflowContext);
+        if(/\s/g.test(node.name)) {
+          this.workflowContext.addError({node : node, message : "Action name cannot contain
white space."});
+        }
         if (!self.ignoreErrors && !node.get("domain")){
             this.workflowContext.addError({node : node, message : "Action Properties are
empty"});
         }else{


Mime
View raw message