فهرست منبع

AMBARI-20862 inconsistent suggestion for llap "Maximum Total Concurrent Queries". (ababiichuk)

ababiichuk 8 سال پیش
والد
کامیت
804b922f91

+ 5 - 1
ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js

@@ -251,12 +251,16 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({
     }
   },
 
+  mirrorValueObs: function () {
+    Em.run.once(this, 'mirrorValueObsOnce');
+  },
+
   /**
    * Check if <code>mirrorValue</code> was updated by user
    * Validate it. If value is correct, set it to slider and config.value
    * @method mirrorValueObs
    */
-  mirrorValueObs: function () {
+  mirrorValueObsOnce: function () {
     var mirrorValue = this.get('mirrorValue'),
       slider = this.get('slider'),
       min = this.get('minMirrorValue'),

+ 9 - 1
ambari-web/test/views/common/configs/widgets/slider_config_widget_view_test.js

@@ -137,7 +137,15 @@ describe('App.SliderConfigWidgetView', function () {
     });
   });
 
-  describe('#mirrorValueObs', function () {
+  describe('#mirrorValueObsOnce', function () {
+
+    beforeEach(function () {
+      sinon.stub(Em.run, 'once', Em.tryInvoke);
+    });
+
+    afterEach(function () {
+      Em.run.once.restore();
+    });
 
     describe('check int', function () {