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

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

commit f3c4e5687a5cf7ae6529a376d22a9ea9e53ef411
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