This is an automated email from the ASF dual-hosted git repository.

vsairam pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/branch-2.7 by this push:
     new 98fc890  Global Configurations defined in workflow XML are being lost 
during Import workflow (or) during Reset workflow (#2857)
98fc890 is described below

commit 98fc8906434a7db995e578a6bb75cb5c0f701f74
Author: Venkata Sairam Lanka <venkatasairam.la...@gmail.com>
AuthorDate: Wed Mar 13 10:50:53 2019 +0530

    Global Configurations defined in workflow XML are being lost during Import 
workflow (or) during Reset workflow (#2857)
---
 .../src/main/resources/ui/app/domain/workflow-importer.js        | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git 
a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-importer.js 
b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-importer.js
index 2afc304..dfc6875 100644
--- 
a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-importer.js
+++ 
b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-importer.js
@@ -63,6 +63,15 @@ var WorkflowImporter= Ember.Object.extend({
     var nodeMap=this.setupNodeMap(workflowAppJson,workflow,Ember.$(xmlDoc));
     this.setupTransitions(workflowAppJson,nodeMap);
     workflow.set("startNode",nodeMap.get("start").node);
+    let globalProperties = 
workflowJson["workflow-app"].global.configuration.property;
+    if(workflowJson["workflow-app"].global) {
+      if(Ember.isArray(globalProperties)) {
+        workflow.set("globalSetting", workflowJson["workflow-app"].global);
+      } else  {
+        workflow.set("globalSetting", {configuration : { 
property:[globalProperties] }} );
+      }
+    }
+
     this.populateKillNodes(workflow,nodeMap);
     return {workflow: workflow, errors: errors};
   },

Reply via email to