You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by vs...@apache.org on 2019/03/13 05:21:05 UTC
[ambari] branch branch-2.6 updated: Global Configurations defined
in workflow XML are being lost during Import workflow (or) during Reset
workflow (#2858)
This is an automated email from the ASF dual-hosted git repository.
vsairam pushed a commit to branch branch-2.6
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/branch-2.6 by this push:
new 6c79b47 Global Configurations defined in workflow XML are being lost during Import workflow (or) during Reset workflow (#2858)
6c79b47 is described below
commit 6c79b47e053140a34b49241a629602a1423e0ebe
Author: Venkata Sairam Lanka <ve...@gmail.com>
AuthorDate: Wed Mar 13 10:50:59 2019 +0530
Global Configurations defined in workflow XML are being lost during Import workflow (or) during Reset workflow (#2858)
---
.../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};
},