Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 83C5E200CBD for ; Thu, 22 Jun 2017 05:56:27 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 824CD160BF0; Thu, 22 Jun 2017 03:56:27 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id C4BF8160BD5 for ; Thu, 22 Jun 2017 05:56:26 +0200 (CEST) Received: (qmail 43158 invoked by uid 500); 22 Jun 2017 03:56:25 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 43149 invoked by uid 99); 22 Jun 2017 03:56:25 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Jun 2017 03:56:25 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 7C8C8DFC2E; Thu, 22 Jun 2017 03:56:25 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: vsairam@apache.org To: commits@ambari.apache.org Message-Id: <4634befe3bc54828b1bf224964a69176@git.apache.org> X-Mailer: ASF-Git Admin Mailer 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 +0000 (UTC) archived-at: Thu, 22 Jun 2017 03:56:27 -0000 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 Authored: Thu Jun 22 09:25:17 2017 +0530 Committer: Venkata Sairam 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{