You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by on...@apache.org on 2015/04/28 16:41:16 UTC

ambari git commit: AMBARI-10790. Changing configs with 'property_depended_by' in Advanced tab should invoke recommendations (onechiporenko)

Repository: ambari
Updated Branches:
  refs/heads/trunk bcffb924f -> b87809142


AMBARI-10790. Changing configs with 'property_depended_by' in Advanced tab should invoke recommendations (onechiporenko)


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

Branch: refs/heads/trunk
Commit: b878091426bc3c36ef5777bbfc0dad72d66112af
Parents: bcffb92
Author: Oleg Nechiporenko <on...@apache.org>
Authored: Tue Apr 28 17:24:28 2015 +0300
Committer: Oleg Nechiporenko <on...@apache.org>
Committed: Tue Apr 28 17:38:19 2015 +0300

----------------------------------------------------------------------
 ambari-web/app/views/common/controls_view.js | 27 +++++++++++++++++++++++
 1 file changed, 27 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b8780914/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 4ec1c74..6dcea19 100644
--- a/ambari-web/app/views/common/controls_view.js
+++ b/ambari-web/app/views/common/controls_view.js
@@ -18,6 +18,14 @@
 
 var App = require('app');
 
+var delay = (function(){
+  var timer = 0;
+  return function(callback, ms){
+    clearTimeout (timer);
+    timer = setTimeout(callback, ms);
+  };
+})();
+
 /**
  * Abstract view for config fields.
  * Add popover support to control
@@ -156,6 +164,10 @@ App.ServiceConfigTextField = Ember.TextField.extend(App.ServiceConfigPopoverSupp
     if (event.keyCode == 13) {
       return false;
     }
+    var self = this;
+    delay(function(){
+      self.sendRequestRorDependentConfigs(self.get('serviceConfig'));
+    }, 500);
   },
   //Set editDone true for last edited config text field parameter
   focusOut: function () {
@@ -194,6 +206,14 @@ App.ServiceConfigTextFieldWithUnit = Ember.View.extend(App.ServiceConfigPopoverS
   focusOut: function () {
     this.sendRequestRorDependentConfigs(this.get('serviceConfig'));
   },
+
+  keyPress: function (event) {
+    var self = this;
+    delay(function(){
+      self.sendRequestRorDependentConfigs(self.get('serviceConfig'));
+    }, 500);
+  },
+
   templateName: require('templates/wizard/controls_service_config_textfield_with_unit')
 });
 
@@ -250,6 +270,13 @@ App.ServiceConfigTextArea = Ember.TextArea.extend(App.ServiceConfigPopoverSuppor
     this.sendRequestRorDependentConfigs(this.get('serviceConfig'));
   },
 
+  keyPress: function (event) {
+    var self = this;
+    delay(function(){
+      self.sendRequestRorDependentConfigs(self.get('serviceConfig'));
+    }, 500);
+  },
+
   valueBinding: 'serviceConfig.value',
   rows: 4,
   classNames: ['directories'],