You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by nc...@apache.org on 2017/01/30 15:40:48 UTC

[27/30] ambari git commit: AMBARI-19709:XML generated for bundle's is not as per oozie xsd (Padma Priya N via gauravn7)

AMBARI-19709:XML generated for bundle's is not as per oozie xsd (Padma Priya N via gauravn7)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/af6ba590
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/af6ba590
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/af6ba590

Branch: refs/heads/branch-dev-patch-upgrade
Commit: af6ba590d20b75e6a276a9e0a81f416fefc8cfd9
Parents: da7202d
Author: Gaurav Nagar <gr...@gmail.com>
Authored: Mon Jan 30 17:42:14 2017 +0530
Committer: Gaurav Nagar <gr...@gmail.com>
Committed: Mon Jan 30 17:42:54 2017 +0530

----------------------------------------------------------------------
 .../src/main/resources/ui/app/components/bundle-config.js      | 2 +-
 .../resources/ui/app/domain/bundle/bundle-xml-generator.js     | 4 ++--
 .../main/resources/ui/app/domain/bundle/bundle-xml-importer.js | 6 ++----
 3 files changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/af6ba590/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js
index 8b4c3d8..fe6dfd1 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js
@@ -160,7 +160,7 @@ export default Ember.Component.extend(Ember.Evented, Validations, {
       throw new Error(e);
     }.bind(this));
   },
-  getBundleFromJSON(filePath){
+  getBundleFromJSON(draftBundle){
     this.set('bundle', JSON.parse(draftBundle));
   },
   getBundleFromHdfs(filePath){

http://git-wip-us.apache.org/repos/asf/ambari/blob/af6ba590/contrib/views/wfmanager/src/main/resources/ui/app/domain/bundle/bundle-xml-generator.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/bundle/bundle-xml-generator.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/bundle/bundle-xml-generator.js
index 7dc05a9..f2dcef9 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/bundle/bundle-xml-generator.js
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/bundle/bundle-xml-generator.js
@@ -25,8 +25,8 @@ var BundleGenerator= Ember.Object.extend({
     bundleApp._xmlns = "uri:oozie:bundle:"+this.bundle.schemaVersions.bundleVersion;
     bundleApp._name = this.bundle.name;
     if(!Ember.isEmpty(this.bundle.kickOffTime.value)){
-      bundleApp["control"] = {};
-      bundleApp["control"]["kick-off-time"] = this.bundle.kickOffTime.value;
+      bundleApp["controls"] = {};
+      bundleApp["controls"]["kick-off-time"] = this.bundle.kickOffTime.value;
     }
     this.generateCoordinatorsJson(bundleApp);
     var xmlAsStr = this.get("x2js").json2xml_str(xmlJson);

http://git-wip-us.apache.org/repos/asf/ambari/blob/af6ba590/contrib/views/wfmanager/src/main/resources/ui/app/domain/bundle/bundle-xml-importer.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/bundle/bundle-xml-importer.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/bundle/bundle-xml-importer.js
index a2053c9..b3eed4b 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/bundle/bundle-xml-importer.js
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/bundle/bundle-xml-importer.js
@@ -49,10 +49,8 @@ var BundleXmlImporter= Ember.Object.extend({
     } else {
       bundle.schemaVersions.bundleVersion = bundleVersion;
     }
-    if(bundleApp.control && bundleApp.control["kick-off-time"]) {
-      bundle.kickOffTime = this.extractDateField(bundleApp["control"]["kick-off-time"]);
-    }else{
-
+    if(bundleApp.controls && bundleApp.controls["kick-off-time"]) {
+      bundle.kickOffTime = this.extractDateField(bundleApp["controls"]["kick-off-time"]);
     }
     this.processCoordinatorsJson(bundleApp, bundle);
     return {bundle: bundle, errors: errors};