Repository: ambari
Updated Branches:
  refs/heads/trunk 1f70d0627 -> 9c6932286


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/9c693228
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9c693228
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9c693228

Branch: refs/heads/trunk
Commit: 9c6932286fd3860627a6c41ab997293b0caef5a1
Parents: 1f70d06
Author: Venkata Sairam <venkatasairam.la...@gmail.com>
Authored: Thu Jun 22 09:25:17 2017 +0530
Committer: Venkata Sairam <venkatasairam.la...@gmail.com>
Committed: Thu Jun 22 09:25:17 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/9c693228/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{

Reply via email to