ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jai...@apache.org
Subject ambari git commit: AMBARI-14028. Adding Ranger via Add Service wizard fails with NPE in ambari-server. (Jaimin)
Date Tue, 24 Nov 2015 00:14:19 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 7d45f1f71 -> bf82dfe69


AMBARI-14028. Adding Ranger via Add Service wizard fails with NPE in ambari-server. (Jaimin)


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

Branch: refs/heads/trunk
Commit: bf82dfe69e44ed0b87105a99dfef7ac533c9e6b4
Parents: 7d45f1f
Author: Jaimin Jetly <jaimin@hortonworks.com>
Authored: Mon Nov 23 16:13:58 2015 -0800
Committer: Jaimin Jetly <jaimin@hortonworks.com>
Committed: Mon Nov 23 16:14:07 2015 -0800

----------------------------------------------------------------------
 ambari-web/app/controllers/wizard/step8_controller.js | 11 ++++++++++-
 ambari-web/test/controllers/wizard/step8_test.js      |  7 +++----
 2 files changed, 13 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/bf82dfe6/ambari-web/app/controllers/wizard/step8_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step8_controller.js b/ambari-web/app/controllers/wizard/step8_controller.js
index 5c4baa3..e57f856 100644
--- a/ambari-web/app/controllers/wizard/step8_controller.js
+++ b/ambari-web/app/controllers/wizard/step8_controller.js
@@ -1378,7 +1378,16 @@ App.WizardStep8Controller = Em.Controller.extend(App.AddSecurityConfigs,
App.wiz
       if (serviceConfigData.length) {
         allConfigData.pushObject(JSON.stringify({
           Clusters: {
-            desired_config: serviceConfigData
+            desired_config: serviceConfigData.map(function(item) {
+              var props = {};
+              Em.keys(item.properties).forEach(function(propName) {
+                if (item.properties[propName] !== null) {
+                  props[propName] = item.properties[propName];
+                }
+              });
+              item.properties = props;
+              return item;
+            })
           }
         }));
       }

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf82dfe6/ambari-web/test/controllers/wizard/step8_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/wizard/step8_test.js b/ambari-web/test/controllers/wizard/step8_test.js
index 9331db5..100f781 100644
--- a/ambari-web/test/controllers/wizard/step8_test.js
+++ b/ambari-web/test/controllers/wizard/step8_test.js
@@ -1483,10 +1483,9 @@ describe('App.WizardStep8Controller', function () {
             {
               type: 'hdfs',
               tag: 'tag1',
-              properties: [
-                {},
-                {}
-              ]
+              properties: {
+                'prop1': 'value1'
+              }
             }
           ],
           data = '['+JSON.stringify({


Mime
View raw message