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 6655A200C24 for ; Thu, 23 Feb 2017 08:04:12 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 64DCF160B62; Thu, 23 Feb 2017 07:04:12 +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 A7880160B50 for ; Thu, 23 Feb 2017 08:04:11 +0100 (CET) Received: (qmail 4598 invoked by uid 500); 23 Feb 2017 07:04:10 -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 4588 invoked by uid 99); 23 Feb 2017 07:04:10 -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, 23 Feb 2017 07:04:10 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 88DBCDFE1E; Thu, 23 Feb 2017 07:04:10 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: pallavkul@apache.org To: commits@ambari.apache.org Message-Id: <82958b8045e14d1ab84644a8c8cab04f@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: ambari git commit: AMBARI-20134. Improper action node name after importing the asset (Venkata Sairam via pallavkul) Date: Thu, 23 Feb 2017 07:04:10 +0000 (UTC) archived-at: Thu, 23 Feb 2017 07:04:12 -0000 Repository: ambari Updated Branches: refs/heads/trunk 03d0587e2 -> 82230d60a AMBARI-20134. Improper action node name after importing the asset (Venkata Sairam via pallavkul) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/82230d60 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/82230d60 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/82230d60 Branch: refs/heads/trunk Commit: 82230d60a8d417809e967e55983c37a8553258a0 Parents: 03d0587 Author: pallavkul Authored: Thu Feb 23 12:28:59 2017 +0530 Committer: pallavkul Committed: Thu Feb 23 12:31:10 2017 +0530 ---------------------------------------------------------------------- .../src/main/resources/ui/app/components/flow-designer.js | 5 +++-- .../wfmanager/src/main/resources/ui/app/domain/workflow.js | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/82230d60/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js index b2b9c68..f97add8 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js @@ -449,7 +449,8 @@ export default Ember.Component.extend(FindNodeMixin, Validations, { this.createSnapshot(); var transition = this.get("currentTransition").source.transitions.findBy('targetNode.id',currentTransition.targetNode.id); transition.source=this.get("currentTransition").source; - var actionNode = this.get("workflow").addNode(transition,actionNodeType); + this.generateUniqueNodeId(actionNodeType); + var actionNode = this.get("workflow").addNode(transition,actionNodeType, {}, ""); this.rerender(); this.doValidation(); this.scrollToNewPosition(); @@ -724,7 +725,7 @@ export default Ember.Component.extend(FindNodeMixin, Validations, { this.set("configForSave", {json : workflowJson, xml : workflowXml,isDraft : isDraft}); this.set("showingSaveWorkflow",true); }, - openJobConfig (){ + openJobConfig () { this.get('workflowContext').clearErrors(); var workflowGenerator=WorkflowGenerator.create({workflow:this.get("workflow"), workflowContext:this.get('workflowContext')}); http://git-wip-us.apache.org/repos/asf/ambari/blob/82230d60/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js index 0fc5d6c..be8d8de 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js @@ -141,7 +141,9 @@ var Workflow= Ember.Object.extend(FindNodeMixin,{ computedTarget=target.getTargets()[0]; } var generatedNode=this.generatedNode(computedTarget,type,settings); - generatedNode.name = generatedNode.name+ "_"+ id; + if(id){ + generatedNode.name = generatedNode.name+ "_"+ id; + } var sourceNode=transition.source; if (sourceNode && sourceNode.isPlaceholder()) { var orignalTransition=this.findTransitionTo(this.startNode,sourceNode.id);