Repository: ambari
Updated Branches:
  refs/heads/trunk ab72beede -> 7493d18dd


AMBARI-12926. SQLA jdbc connection string gets reset to Mysql connection string 
even if DB is selected as SQLA. (jaimin)


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

Branch: refs/heads/trunk
Commit: 7493d18ddad526f9c04aafd0acf8aa70bc52ee32
Parents: ab72bee
Author: Jaimin Jetly <[email protected]>
Authored: Fri Aug 28 15:03:42 2015 -0700
Committer: Jaimin Jetly <[email protected]>
Committed: Fri Aug 28 15:03:42 2015 -0700

----------------------------------------------------------------------
 ambari-web/app/views/common/controls_view.js | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/7493d18d/ambari-web/app/views/common/controls_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/controls_view.js 
b/ambari-web/app/views/common/controls_view.js
index 4ff6222..10f182b 100644
--- a/ambari-web/app/views/common/controls_view.js
+++ b/ambari-web/app/views/common/controls_view.js
@@ -441,6 +441,14 @@ App.ServiceConfigRadioButtons = 
Ember.View.extend(App.ServiceConfigCalculateId,
   },
 
   /**
+   * Radio buttons that are not DB options and should not trigger any observer 
or change any other property's value
+   * Ranger service -> "Authentication method" property is an example for non 
DB related radio button
+   */
+  nonDBRadioButtons: function() {
+    return this.get('dontUseHandleDbConnection').without('DB_FLAVOR');
+  }.property('dontUseHandleDbConnection'),
+
+  /**
    * properties with these names don'use handleDBConnectionProperty method
    */
   dontUseHandleDbConnection: function () {
@@ -497,8 +505,7 @@ App.ServiceConfigRadioButtons = 
Ember.View.extend(App.ServiceConfigCalculateId,
   }.property('serviceConfig.serviceName', 'serviceConfig.value'),
 
   onOptionsChange: function () {
-    // The following if condition will be satisfied only for installer wizard 
flow
-    if (this.get('hostNameProperty')) {
+    if (this.get('hostNameProperty') && 
!this.get('nonDBRadioButtons').contains(this.get('serviceConfig.name'))) {
       /** if new db is selected host name must be same as master of selected 
service (and can't be changed)**/
       if (this.get('isNewDb')) {
         var initProperty = this.get('hostNameProperty.recommendedValue') || 
this.get('hostNameProperty.savedValue');

Reply via email to