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/15 12:42:04 UTC
ambari git commit: AMBARI-10496. Slider control when being moved
should not jump to nearest major tick (onechiporenko)
Repository: ambari
Updated Branches:
refs/heads/trunk 64850bb77 -> 7262f985d
AMBARI-10496. Slider control when being moved should not jump to nearest major tick (onechiporenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7262f985
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7262f985
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7262f985
Branch: refs/heads/trunk
Commit: 7262f985d6995378df7862718b7fcd5170df3c67
Parents: 64850bb
Author: Oleg Nechiporenko <on...@apache.org>
Authored: Wed Apr 15 13:37:01 2015 +0300
Committer: Oleg Nechiporenko <on...@apache.org>
Committed: Wed Apr 15 13:37:01 2015 +0300
----------------------------------------------------------------------
.../configs/widgets/slider_config_widget_view.js | 1 -
.../configs/widgets/time_interval_spinner_view.js | 14 ++++++--------
2 files changed, 6 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/7262f985/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 678f0cd..31e1c94 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
@@ -239,7 +239,6 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({
ticks: ticks,
tooltip: 'always',
ticks_labels: ticksLabels,
- ticks_snap_bounds: Em.get(valueAttributes, 'type') === 'int' ? 1 : 0.1,
step: increment_step ? this.widgetValueByConfigAttributes(increment_step) : (Em.get(valueAttributes, 'type') === 'int' ? 1 : 0.1)
});
http://git-wip-us.apache.org/repos/asf/ambari/blob/7262f985/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 3e8375e..99906d1 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
@@ -99,12 +99,10 @@ App.TimeIntervalSpinnerView = App.ConfigWidgetView.extend({
prepareContent: function() {
var property = this.get('config');
- this.setProperties({
- propertyUnit: property.get('stackConfigProperty.valueAttributes.unit'),
- minValue: this.generateWidgetValue(property.get('stackConfigProperty.valueAttributes.minimum')),
- maxValue: this.generateWidgetValue(property.get('stackConfigProperty.valueAttributes.maximum')),
- content: this.generateWidgetValue(property.get('value'))
- });
+ this.set('propertyUnit', property.get('stackConfigProperty.valueAttributes.unit'));
+ this.set('minValue', this.generateWidgetValue(property.get('stackConfigProperty.valueAttributes.minimum')));
+ this.set('maxValue', this.generateWidgetValue(property.get('stackConfigProperty.valueAttributes.maximum')));
+ this.set('content', this.generateWidgetValue(property.get('value')));
this.parseIncrement();
},
@@ -115,12 +113,12 @@ App.TimeIntervalSpinnerView = App.ConfigWidgetView.extend({
*/
parseIncrement: function () {
var property = this.get('config');
- var type = this.get('content.lastObject.type');
var step = property.get('stackConfigProperty.valueAttributes.increment_step');
if (step) {
+ var type = this.get('content.lastObject.type');
step = this.convertValue(step, property.get('stackConfigProperty.valueAttributes.unit'), type);
this.set('content.lastObject.incrementStep', step);
- if (step > Em.get(this, 'timeMaxValueOverflow.' + type)) {
+ if (step > Em.get(this, 'timeMaxValueOverflow.' + type)) {
this.set('content.lastObject.enabled', false);
}
}