You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ab...@apache.org on 2016/04/28 16:02:51 UTC
ambari git commit: AMBARI-16152 The dropdown goes off intermittently
for the "Interactive Query Queue". Seen at Install Wizard time.(ababiichuk)
Repository: ambari
Updated Branches:
refs/heads/trunk 099f6e562 -> 32e437d42
AMBARI-16152 The dropdown goes off intermittently for the "Interactive Query Queue". Seen at Install Wizard time.(ababiichuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/32e437d4
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/32e437d4
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/32e437d4
Branch: refs/heads/trunk
Commit: 32e437d4234e95d5988a9237eb6c841fb16f33a7
Parents: 099f6e5
Author: ababiichuk <ab...@hortonworks.com>
Authored: Thu Apr 28 13:19:25 2016 +0300
Committer: ababiichuk <ab...@hortonworks.com>
Committed: Thu Apr 28 17:02:25 2016 +0300
----------------------------------------------------------------------
.../configs/widgets/list_config_widget_view.js | 22 +++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/32e437d4/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 568c405..3bcd81e 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
@@ -149,6 +149,24 @@ App.ListConfigWidgetView = App.ConfigWidgetView.extend({
},
/**
+ * Update options list by recommendations
+ * @method updateList
+ */
+ updateList: function() {
+ this.removeObserver('options.@each.isSelected', this, this.calculateVal);
+ this.removeObserver('options.@each.isSelected', this, this.checkSelectedItemsCount);
+ /**
+ * This method should update options only. Observes should be removed
+ * until new options will be applies, to avoid changing of config value.
+ */
+ this.calculateOptions();
+
+ this.addObserver('options.@each.isSelected', this, this.calculateVal);
+ this.addObserver('options.@each.isSelected', this, this.checkSelectedItemsCount);
+ this.set('config.showAsTextBox', !this.isValueCompatibleWithWidget());
+ }.observes('config.stackConfigProperty.valueAttributes.entries.[]', 'controller.forceUpdateBoundaries'),
+
+ /**
* Get initial value for <code>val</code> using calculated earlier <code>options</code>
* Used on <code>willInsertElement</code> and when user click on "Undo"-button (to restore default value)
* @method calculateInitVal
@@ -272,9 +290,7 @@ App.ListConfigWidgetView = App.ConfigWidgetView.extend({
} else {
this.calculateInitVal();
}
- if (!this.isValueCompatibleWithWidget() && !this.get('config.showAsTextBox')) {
- this.set('config.showAsTextBox', true);
- }
+ this.set('config.showAsTextBox', !this.isValueCompatibleWithWidget());
},
isValueCompatibleWithWidget: function() {