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 2015/10/07 15:52:04 UTC

[23/31] ambari git commit: AMBARI-13323 JDBC connection string for Ranger does not update when changing database option. (ababiichuk)

AMBARI-13323 JDBC connection string for Ranger does not update when changing database option. (ababiichuk)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 7ffa43ef5aafa716f8e4d0f7647d85e4675c9371
Parents: ebccd72
Author: aBabiichuk <ab...@cybervisiontech.com>
Authored: Tue Oct 6 16:30:44 2015 +0300
Committer: aBabiichuk <ab...@cybervisiontech.com>
Committed: Tue Oct 6 16:30:44 2015 +0300

----------------------------------------------------------------------
 ambari-web/app/views/common/controls_view.js | 39 +++++++++++------------
 1 file changed, 19 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/7ffa43ef/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 28d3090..085ae11 100644
--- a/ambari-web/app/views/common/controls_view.js
+++ b/ambari-web/app/views/common/controls_view.js
@@ -74,13 +74,6 @@ App.ServiceConfigPopoverSupport = Ember.Mixin.create({
 App.SupportsDependentConfigs = Ember.Mixin.create({
 
   /**
-   * do not apply recommended value if user change value by himself.
-   */
-  keyUp: function() {
-    this.get('controller').removeCurrentFromDependentList(this.get('serviceConfig') || this.get('config'));
-  },
-
-  /**
    * method send request to check if some of dependent configs was changes
    * and in case there was changes shows popup with info about changed configs
    *
@@ -91,7 +84,7 @@ App.SupportsDependentConfigs = Ember.Mixin.create({
     if (!config || !config.get('isValid')) return $.Deferred().resolve().promise();
     if (['mainServiceInfoConfigsController','wizardStep7Controller'].contains(this.get('controller.name'))) {
       var name = config.get('name');
-      var saveRecommended = (this.get('config.value') === this.get('config.recommendedValue'));
+      var saveRecommended = (config.get('value') === config.get('recommendedValue'));
       var controller = this.get('controller');
       var type = App.config.getConfigTagFromFileName(config.get('filename'));
       var p = App.StackConfigProperty.find(App.config.configId(name, type));
@@ -172,10 +165,12 @@ App.ServiceConfigTextField = Ember.TextField.extend(App.ServiceConfigPopoverSupp
   placeholderBinding: 'serviceConfig.savedValue',
 
   onValueUpdate: function () {
-    var self = this;
-    delay(function(){
-      self.sendRequestRorDependentConfigs(self.get('serviceConfig'));
-    }, 500);
+    if ($(this.get('element')).is(':focus')) {
+      var self = this;
+      delay(function(){
+        self.sendRequestRorDependentConfigs(self.get('serviceConfig'));
+      }, 500);
+    }
   }.observes('serviceConfig.value'),
 
   //Set editDone true for last edited config text field parameter
@@ -213,10 +208,12 @@ App.ServiceConfigTextFieldWithUnit = Ember.View.extend(App.ServiceConfigPopoverS
   placeholderBinding: 'serviceConfig.savedValue',
 
   onValueUpdate: function () {
-    var self = this;
-    delay(function(){
-      self.sendRequestRorDependentConfigs(self.get('serviceConfig'));
-    }, 500);
+    if ($(this.get('element')).is(':focus')) {
+      var self = this;
+      delay(function(){
+        self.sendRequestRorDependentConfigs(self.get('serviceConfig'));
+      }, 500);
+    }
   }.observes('serviceConfig.value'),
 
   templateName: require('templates/wizard/controls_service_config_textfield_with_unit')
@@ -273,10 +270,12 @@ App.ServiceConfigTextArea = Ember.TextArea.extend(App.ServiceConfigPopoverSuppor
 
 
   onValueUpdate: function () {
-    var self = this;
-    delay(function(){
-      self.sendRequestRorDependentConfigs(self.get('serviceConfig'));
-    }, 500);
+    if ($(this.get('element')).is(':focus')) {
+      var self = this;
+      delay(function(){
+        self.sendRequestRorDependentConfigs(self.get('serviceConfig'));
+      }, 500);
+    }
   }.observes('serviceConfig.value'),
 
   valueBinding: 'serviceConfig.value',