ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srima...@apache.org
Subject ambari git commit: AMBARI-10917. Editing enhanced-config in textfield not accepting values in between steps (onechiporenko via srimanth)
Date Mon, 04 May 2015 23:57:20 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 0ebdf4e66 -> ce3e14370


AMBARI-10917. Editing enhanced-config in textfield not accepting values in between steps (onechiporenko
via srimanth)


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

Branch: refs/heads/trunk
Commit: ce3e14370e23204c3da0486489cce860232a89aa
Parents: 0ebdf4e
Author: Srimanth Gunturi <sgunturi@hortonworks.com>
Authored: Mon May 4 16:54:35 2015 -0700
Committer: Srimanth Gunturi <sgunturi@hortonworks.com>
Committed: Mon May 4 16:54:35 2015 -0700

----------------------------------------------------------------------
 .../widgets/slider_config_widget_view.js        |  5 -----
 .../widgets/slider_config_widget_view_test.js   | 20 ++++++++++----------
 2 files changed, 10 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ce3e1437/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 71f510e..603e847 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
@@ -374,8 +374,6 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({
     var sliderTicks = this.$('.ui-slider-wrapper:eq(0) .slider-tick');
 
     if (recommendedValueId) {
-      var defaultSliderTick = sliderTicks.eq(recommendedValueId);
-
       sliderTicks.eq(recommendedValueId).addClass('slider-tick-default').on('mousedown',
function(e) {
         if (self.get('disabled')) return false;
         self.setValue(self.get('config.recommendedValue'));
@@ -475,9 +473,6 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({
         var max = this.get('parseFunction')(this.get('config.stackConfigProperty.valueAttributes.maximum'));
         if (configValue > max) return false;
       }
-      if (this.get('config.stackConfigProperty.valueAttributes.increment_step')) {
-        if (configValue % this.get('parseFunction')(this.get('config.stackConfigProperty.valueAttributes.increment_step'))
!= 0) return false;
-      }
       return true;
     }
     return false;

http://git-wip-us.apache.org/repos/asf/ambari/blob/ce3e1437/ambari-web/test/views/common/configs/widgets/slider_config_widget_view_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/common/configs/widgets/slider_config_widget_view_test.js
b/ambari-web/test/views/common/configs/widgets/slider_config_widget_view_test.js
index d96743a..fba4493 100644
--- a/ambari-web/test/views/common/configs/widgets/slider_config_widget_view_test.js
+++ b/ambari-web/test/views/common/configs/widgets/slider_config_widget_view_test.js
@@ -350,15 +350,15 @@ describe('App.SliderConfigWidgetView', function () {
         sinon.stub(this.view, '$')
           .withArgs('input.slider-input').returns([])
           .withArgs('.ui-slider-wrapper:eq(0) .slider-tick').returns({
-            eq: function() {return this;},
-            addClass: function() {return this;},
-            on: function() {return this;},
-            append: function() {return this;},
-            find: function() {return this;},
-            css: function() {return this;},
+            eq: Em.K,
+            addClass: Em.K,
+            on: Em.K,
+            append: Em.K,
+            find: Em.K,
+            css: Em.K,
             width: function() {},
-            last: function() { return this;},
-            hide: function() { return this;}
+            last: Em.K,
+            hide: Em.K
           });
         this.view.willInsertElement();
         this.view.initSlider();
@@ -411,10 +411,10 @@ describe('App.SliderConfigWidgetView', function () {
       expect(viewInt.isValueCompatibleWithWidget()).to.be.false;
     });
 
-    it ('fail: wrong step', function() {
+    it ('ok for wrong step', function() {
       viewInt.set('config.stackConfigProperty', stackConfigProperty);
       viewInt.set('config.value', '3');
-      expect(viewInt.isValueCompatibleWithWidget()).to.be.false;
+      expect(viewInt.isValueCompatibleWithWidget()).to.be.true;
     });
 
     it ('ok', function() {


Mime
View raw message