Updated Branches: refs/heads/trunk f94f39403 -> 5ba1e2160
AMBARI-3041: Advanced properties are being set to undefined. (jaimin) Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/5ba1e216 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/5ba1e216 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/5ba1e216 Branch: refs/heads/trunk Commit: 5ba1e21603451411741e741499a391ccc527a914 Parents: f94f394 Author: Jaimin Jetly <[email protected]> Authored: Tue Aug 27 12:52:22 2013 -0700 Committer: Jaimin Jetly <[email protected]> Committed: Tue Aug 27 12:52:40 2013 -0700 ---------------------------------------------------------------------- ambari-web/app/utils/config.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/5ba1e216/ambari-web/app/utils/config.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js index 7e65754..49f64fd 100644 --- a/ambari-web/app/utils/config.js +++ b/ambari-web/app/utils/config.js @@ -911,6 +911,7 @@ App.config = Em.Object.create({ trimProperty: function(property, isEmberObject){ var displayType = (isEmberObject) ? property.get('displayType') : property.displayType; var value = (isEmberObject) ? property.get('value') : property.value; + var name = (isEmberObject) ? property.get('name') : property.name; var rez; switch (displayType){ case 'directories': @@ -921,7 +922,7 @@ App.config = Em.Object.create({ rez = value.trim(); break; case 'advanced': - if(this.get('name')=='hive_jdbc_connection_url' || this.get('name')=='oozie_jdbc_connection_url') { + if(name == 'hive_jdbc_connection_url' || name == 'oozie_jdbc_connection_url') { rez = value.trim(); } break; @@ -930,7 +931,7 @@ App.config = Em.Object.create({ default: rez = (value instanceof String) ? value.replace(/(\s+$)/g, '') : value; } - return (rez == '') ? value : rez; + return ((rez == '') || (rez == undefined)) ? value : rez; } });
