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/07/06 19:13:07 UTC
[1/2] ambari git commit: AMBARI-12294. Overrides for sliders doesn't
drawn correctly after filtering out/in (onechiporenko)
Repository: ambari
Updated Branches:
refs/heads/branch-2.1 0be15fa3c -> e1e5f2ca0
AMBARI-12294. Overrides for sliders doesn't drawn correctly after filtering out/in (onechiporenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/42ec1cd6
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/42ec1cd6
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/42ec1cd6
Branch: refs/heads/branch-2.1
Commit: 42ec1cd64f331f817fb2905f42c1c92d5c7848c0
Parents: 0be15fa
Author: Oleg Nechiporenko <on...@apache.org>
Authored: Mon Jul 6 18:02:35 2015 +0300
Committer: Oleg Nechiporenko <on...@apache.org>
Committed: Mon Jul 6 20:03:45 2015 +0300
----------------------------------------------------------------------
.../widgets/slider_config_widget_view.js | 31 ++++++++++++++++----
1 file changed, 26 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/42ec1cd6/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 877d2b5..0905a09 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
@@ -526,10 +526,12 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({
},
/**
- * recreate widget in case max or min values were changed
+ * Recreate widget in case max or min values were changed
+ *
* @method changeBoundariesOnce
*/
changeBoundariesOnce: function () {
+ var self = this;
if ($.mocho) {
//temp fix as it can broke test that doesn't have any connection with this method
return;
@@ -548,6 +550,10 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({
if (arguments.length) {
this.refreshSliderObserver();
}
+ else {
+ // hack for slider-overrides
+ this._changeBoundariesOnceLater("don't call me more!");
+ }
} catch (e) {
console.error('error while rebuilding slider for config: ' + this.get('config.name'));
}
@@ -555,16 +561,31 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({
},
/**
+ * Method used for initializing sliders in the next Ember run-loop
+ * It's useful for overrides, because they are redrawn a little bit later than origin config
+ *
+ * If this method is called without arguments, it will call itself recursively using <code>changeBoundariesOnce</code>
+ * and <code>refreshSliderObserver</code>
+ * If not - it will just call <code>changeBoundariesOnce</code> in the next run-loop
+ * @method changeBoundariesOnceLater
+ */
+ _changeBoundariesOnceLater: function() {
+ console.debug('_changeBoundariesOnceLater', arguments);
+ var args = arguments;
+ var self = this;
+ Em.run.later('sync', function() {
+ self.changeBoundariesOnce(args);
+ }, 10);
+ },
+
+ /**
* Workaround for bootstrap-slider widget that was initiated inside hidden container.
* @method refreshSliderObserver
*/
refreshSliderObserver: function() {
var sliderTickLabel = this.$('.ui-slider-wrapper:eq(0) .slider-tick-label:first');
- var self = this;
if (sliderTickLabel.width() == 0 && this.isValueCompatibleWithWidget()) {
- Em.run.later('sync', function() {
- self.changeBoundariesOnce();
- }, 10);
+ this._changeBoundariesOnceLater();
}
}.observes('parentView.content.isActive', 'parentView.parentView.tab.isActive'),
[2/2] ambari git commit: AMBARI-12295. Issue with config groups names
(onechiporenko)
Posted by on...@apache.org.
AMBARI-12295. Issue with config groups names (onechiporenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e1e5f2ca
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e1e5f2ca
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e1e5f2ca
Branch: refs/heads/branch-2.1
Commit: e1e5f2ca07853bd8324896ad2f2b60ca93c47214
Parents: 42ec1cd
Author: Oleg Nechiporenko <on...@apache.org>
Authored: Mon Jul 6 18:03:56 2015 +0300
Committer: Oleg Nechiporenko <on...@apache.org>
Committed: Mon Jul 6 20:03:46 2015 +0300
----------------------------------------------------------------------
ambari-web/app/views/common/configs/config_history_flow.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/e1e5f2ca/ambari-web/app/views/common/configs/config_history_flow.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/config_history_flow.js b/ambari-web/app/views/common/configs/config_history_flow.js
index 7f80bdf..bd5a50b 100644
--- a/ambari-web/app/views/common/configs/config_history_flow.js
+++ b/ambari-web/app/views/common/configs/config_history_flow.js
@@ -102,13 +102,14 @@ App.ConfigHistoryFlowView = Em.View.extend({
var allServiceVersions = App.ServiceConfigVersion.find().filterProperty('serviceName', this.get('serviceName'));
var groupName = this.get('controller.selectedConfigGroup.isDefault') ? 'default'
: this.get('controller.selectedConfigGroup.name');
+ var groupId = this.get('controller.selectedConfigGroup.configGroupId');
allServiceVersions.forEach(function (version) {
version.set('isDisabled', !(version.get('groupName') === groupName));
}, this);
var serviceVersions = allServiceVersions.filter(function(s) {
- return s.get('groupName') == groupName || s.get('groupName') == 'default';
+ return (s.get('groupId') === groupId) || s.get('groupName') == 'default';
});
return serviceVersions.sort(function (a, b) {