You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2015/09/24 23:08:13 UTC

[2/2] ambari git commit: AMBARI-13222. kdc_type lost when updating kerberos-env via Kerberos service configuration page. (rlevas via yusaku)

AMBARI-13222. kdc_type lost when updating kerberos-env via Kerberos service configuration page. (rlevas via yusaku)


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

Branch: refs/heads/trunk
Commit: 4515215a24c066f91218b2815838e920edf5b01a
Parents: a830156
Author: Yusaku Sako <yu...@hortonworks.com>
Authored: Thu Sep 24 14:07:35 2015 -0700
Committer: Yusaku Sako <yu...@hortonworks.com>
Committed: Thu Sep 24 14:07:35 2015 -0700

----------------------------------------------------------------------
 ambari-web/app/mixins/common/configs/configs_saver.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/4515215a/ambari-web/app/mixins/common/configs/configs_saver.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/common/configs/configs_saver.js b/ambari-web/app/mixins/common/configs/configs_saver.js
index 2b97f59..6352dec 100644
--- a/ambari-web/app/mixins/common/configs/configs_saver.js
+++ b/ambari-web/app/mixins/common/configs/configs_saver.js
@@ -444,6 +444,7 @@ App.ConfigsSaverMixin = Em.Mixin.create({
   formatValueBeforeSave: function(property) {
     var name = property.get('name');
     var value = property.get('value');
+    var kdcTypesMap = App.router.get('mainAdminKerberosController.kdcTypesValues');
     //TODO check for core-site
     if (this.get('heapsizeRegExp').test(name) && !this.get('heapsizeException').contains(name) && !(value).endsWith("m")) {
       return value += "m";
@@ -453,7 +454,9 @@ App.ConfigsSaverMixin = Em.Mixin.create({
     }
     switch (name) {
       case 'kdc_type':
-        return App.router.get('mainAdminKerberosController.kdcTypesValues')[property.get('value')];
+        return Em.keys(kdcTypesMap).filter(function(key) {
+            return kdcTypesMap[key] === property.get('value');
+        })[0];
       case 'storm.zookeeper.servers':
       case 'nimbus.seeds':
         if (Em.isArray(value)) {