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 <[email protected]> Authored: Thu Jun 22 09:25:17 2017 +0530 Committer: Venkata Sairam <[email protected]> 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{
