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

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

commit 483e7e11402d126078733487b6de3659b12bef4d
Author: Venkata Sairam <venkatasairam.la...@gmail.com>
AuthorDate: Tue Mar 12 15:35:12 2019 +0530

    Global Configurations defined in workflow XML are being lost during Import 
workflow (or) during Reset workflow
---
 .../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