ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From onechipore...@apache.org
Subject ambari git commit: AMBARI-10502. Toggle widget with depended_by not making call to /recommendations (onechiporenko)
Date Wed, 15 Apr 2015 15:29:36 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk ba25a16a3 -> cfdb955bd


AMBARI-10502. Toggle widget with depended_by not making call to /recommendations (onechiporenko)


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

Branch: refs/heads/trunk
Commit: cfdb955bd3e24212672066f3a179e39a1d35e8b4
Parents: ba25a16
Author: Oleg Nechiporenko <onechiporenko@apache.org>
Authored: Wed Apr 15 18:26:46 2015 +0300
Committer: Oleg Nechiporenko <onechiporenko@apache.org>
Committed: Wed Apr 15 18:26:46 2015 +0300

----------------------------------------------------------------------
 ambari-web/app/mixins/common/configs/enhanced_configs.js  |  3 ++-
 .../common/configs/widgets/combo_config_widget_view.js    |  3 +++
 .../common/configs/widgets/list_config_widget_view.js     |  2 ++
 .../common/configs/widgets/slider_config_widget_view.js   | 10 ----------
 .../common/configs/widgets/time_interval_spinner_view.js  |  2 ++
 .../common/configs/widgets/toggle_config_widget_view.js   |  2 ++
 ambari-web/app/views/common/controls_view.js              | 10 +++++-----
 .../configs/widgets/time_interval_spinner_view_test.js    |  3 +++
 8 files changed, 19 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/cfdb955b/ambari-web/app/mixins/common/configs/enhanced_configs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/common/configs/enhanced_configs.js b/ambari-web/app/mixins/common/configs/enhanced_configs.js
index d9caca0..ae6ceee 100644
--- a/ambari-web/app/mixins/common/configs/enhanced_configs.js
+++ b/ambari-web/app/mixins/common/configs/enhanced_configs.js
@@ -348,11 +348,12 @@ App.EnhancedConfigsMixin = Em.Mixin.create({
   /**
    * get array of config objects for current service depends on config group
    * for default group - it will be current stepConfigs
-   * for not default group - overriden property in case there is such property in group
+   * for not default group - overridden property in case there is such property in group
    * otherwise - property from default group
    * @param stepConfigs
    * @returns {Object[]}
    * @private
+   * @method _getConfigsByGroup
    */
   _getConfigsByGroup: function(stepConfigs) {
     if (this.get('selectedConfigGroup.isDefault') || this.get('controller.name') === 'wizardStep7Controller')
{

http://git-wip-us.apache.org/repos/asf/ambari/blob/cfdb955b/ambari-web/app/views/common/configs/widgets/combo_config_widget_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/widgets/combo_config_widget_view.js b/ambari-web/app/views/common/configs/widgets/combo_config_widget_view.js
index 7e7c46f..e5aaadb 100644
--- a/ambari-web/app/views/common/configs/widgets/combo_config_widget_view.js
+++ b/ambari-web/app/views/common/configs/widgets/combo_config_widget_view.js
@@ -103,6 +103,8 @@ App.ComboConfigWidgetView = App.ConfigWidgetView.extend({
   setConfigValue: function(e) {
     this.set('config.value', e.context);
     this.set('content.value', this.generateWidgetValue(e.context));
+    this.get('controller').removeCurrentFromDependentList(this.get('config'));
+    this.sendRequestRorDependentConfigs(this.get('config'));
   },
 
   /**
@@ -110,6 +112,7 @@ App.ComboConfigWidgetView = App.ConfigWidgetView.extend({
    * @method restoreValue
    */
   restoreValue: function() {
+    this._super();
     this.setConfigValue({ context: this.get('config.defaultValue') });
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/cfdb955b/ambari-web/app/views/common/configs/widgets/list_config_widget_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/widgets/list_config_widget_view.js b/ambari-web/app/views/common/configs/widgets/list_config_widget_view.js
index ab1db7a..18cd348 100644
--- a/ambari-web/app/views/common/configs/widgets/list_config_widget_view.js
+++ b/ambari-web/app/views/common/configs/widgets/list_config_widget_view.js
@@ -219,6 +219,8 @@ App.ListConfigWidgetView = App.ConfigWidgetView.extend({
     option.set('order', orderCounter);
     option.toggleProperty('isSelected');
     this.incrementProperty('orderCounter');
+    this.get('controller').removeCurrentFromDependentList(this.get('config'));
+    this.sendRequestRorDependentConfigs(this.get('config'));
     return false;
   },
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/cfdb955b/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js b/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
index eb9e842..384bd46 100644
--- a/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
+++ b/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
@@ -164,16 +164,6 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({
   },
 
   /**
-   * view class for text box that is used with slider widget
-   * @type {Em.TextField}
-   */
-  MirrorValueView: Em.TextField.extend({
-    focusOut: function() {
-      this.get('parentView').sendRequestRorDependentConfigs(this.get('parentView.config'));
-    }
-  }),
-
-  /**
    * Check if <code>mirrorValue</code> was updated by user
    * Validate it. If value is correct, set it to slider and config.value
    * @method mirrorValueObs

http://git-wip-us.apache.org/repos/asf/ambari/blob/cfdb955b/ambari-web/app/views/common/configs/widgets/time_interval_spinner_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/widgets/time_interval_spinner_view.js b/ambari-web/app/views/common/configs/widgets/time_interval_spinner_view.js
index 99906d1..d3da7b6 100644
--- a/ambari-web/app/views/common/configs/widgets/time_interval_spinner_view.js
+++ b/ambari-web/app/views/common/configs/widgets/time_interval_spinner_view.js
@@ -193,6 +193,8 @@ App.TimeIntervalSpinnerView = App.ConfigWidgetView.extend({
    */
   setConfigValue: function() {
     this.set('config.value', this.configValueByWidget(this.get('content')));
+    this.get('controller').removeCurrentFromDependentList(this.get('config'));
+    this.sendRequestRorDependentConfigs(this.get('config'));
   },
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/cfdb955b/ambari-web/app/views/common/configs/widgets/toggle_config_widget_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/widgets/toggle_config_widget_view.js b/ambari-web/app/views/common/configs/widgets/toggle_config_widget_view.js
index 0eb9ab9..8e002e3 100644
--- a/ambari-web/app/views/common/configs/widgets/toggle_config_widget_view.js
+++ b/ambari-web/app/views/common/configs/widgets/toggle_config_widget_view.js
@@ -91,6 +91,8 @@ App.ToggleConfigWidgetView = App.ConfigWidgetView.extend({
         handleWidth: 85,
         onSwitchChange: function (event, state) {
           self.set('switcherValue', state);
+          self.get('controller').removeCurrentFromDependentList(self.get('config'));
+          self.sendRequestRorDependentConfigs(self.get('config'));
         }
       });
       this.set('switcher', switcher);

http://git-wip-us.apache.org/repos/asf/ambari/blob/cfdb955b/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 e710421..c042a76 100644
--- a/ambari-web/app/views/common/controls_view.js
+++ b/ambari-web/app/views/common/controls_view.js
@@ -122,7 +122,7 @@ App.SupportsDependentConfigs = Ember.Mixin.create({
 });
 
 /**
- * mixin set class that serve as unique element identificator,
+ * mixin set class that serve as unique element identifier,
  * id not used in order to avoid collision with ember ids
  */
 App.ServiceConfigCalculateId = Ember.Mixin.create({
@@ -152,14 +152,14 @@ App.ServiceConfigTextField = Ember.TextField.extend(App.ServiceConfigPopoverSupp
     }
   },
   //Set editDone true for last edited config text field parameter
-  focusOut: function (event) {
+  focusOut: function () {
     if (this.get('serviceConfig.isNotDefaultValue')) {
       this.sendRequestRorDependentConfigs(this.get('serviceConfig'));
     }
     this.get('serviceConfig').set("editDone", true);
   },
   //Set editDone false for all current category config text field parameter
-  focusIn: function (event) {
+  focusIn: function () {
     if (!this.get('serviceConfig.isOverridden') && !this.get('serviceConfig.isComparison'))
{
       this.get("parentView.categoryConfigsAll").setEach("editDone", false);
     }
@@ -187,7 +187,7 @@ App.ServiceConfigTextFieldWithUnit = Ember.View.extend(App.ServiceConfigPopoverS
   placeholderBinding: 'serviceConfig.defaultValue',
 
   //Set editDone true for last edited config text field parameter
-  focusOut: function (event) {
+  focusOut: function () {
     if (this.get('serviceConfig.isNotDefaultValue')) {
       this.sendRequestRorDependentConfigs(this.get('serviceConfig'));
     }
@@ -775,7 +775,7 @@ App.ServiceConfigMasterHostView = Ember.View.extend(App.ServiceConfigHostPopover
 
 /**
  * text field property view that enables possibility
- * for check connectio
+ * for check connection
  * @type {*}
  */
 App.checkConnectionView = App.ServiceConfigTextField.extend({

http://git-wip-us.apache.org/repos/asf/ambari/blob/cfdb955b/ambari-web/test/views/common/configs/widgets/time_interval_spinner_view_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/common/configs/widgets/time_interval_spinner_view_test.js
b/ambari-web/test/views/common/configs/widgets/time_interval_spinner_view_test.js
index b9ae58f..c3c9522 100644
--- a/ambari-web/test/views/common/configs/widgets/time_interval_spinner_view_test.js
+++ b/ambari-web/test/views/common/configs/widgets/time_interval_spinner_view_test.js
@@ -23,6 +23,9 @@ describe('App.TimeIntervalSpinnerView', function () {
 
   beforeEach(function () {
     view = App.TimeIntervalSpinnerView.create({
+      controller: Em.Object.create({
+        removeCurrentFromDependentList: Em.K
+      }),
       initPopover: Em.K,
       checkErrors: Em.K
     });


Mime
View raw message