Explorar o código

AMBARI-11336. An alter 'Number of threads used by Compactor' shows after you turn on ACID Transactions and then turn off (atkach)

Oleg Nechiporenko %!s(int64=10) %!d(string=hai) anos
pai
achega
5e14020039

+ 2 - 0
ambari-web/app/mixins/unit_convert/base_unit_convert_mixin.js

@@ -34,6 +34,8 @@ App.BaseUnitConvertMixin = Em.Mixin.create({
    */
    */
   currentDimensionType: null,
   currentDimensionType: null,
 
 
+  units: ['b', 'kb', 'mb', 'gb', 'tb', 'pb'],
+
   /**
   /**
    * Labels related to units. Specify desired display names here that not much actual unit name.
    * Labels related to units. Specify desired display names here that not much actual unit name.
    */
    */

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

@@ -92,7 +92,6 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({
     return step ? parseFunction(step) : this.get('unitType') === 'int' ? 1 : 0.1;
     return step ? parseFunction(step) : this.get('unitType') === 'int' ? 1 : 0.1;
   }.property('config.stackConfigProperty.valueAttributes.increment_step'),
   }.property('config.stackConfigProperty.valueAttributes.increment_step'),
 
 
-
   /**
   /**
    * Default value of config property transformed according widget format
    * Default value of config property transformed according widget format
    * @returns {Number}
    * @returns {Number}
@@ -111,8 +110,6 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({
     return parseFunction(this.widgetValueByConfigAttributes(this.get('config.recommendedValue')));
     return parseFunction(this.widgetValueByConfigAttributes(this.get('config.recommendedValue')));
   }.property('config.recommendedValue'),
   }.property('config.recommendedValue'),
 
 
-  units: ['b', 'kb', 'mb', 'gb', 'tb', 'pb'],
-
   /**
   /**
    * unit type of widget
    * unit type of widget
    * @type {String}
    * @type {String}
@@ -235,7 +232,7 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({
         }
         }
       }
       }
       // avoid precision during restore value
       // avoid precision during restore value
-      if (parsed == parseFunction(this.widgetValueByConfigAttributes(this.get('config.savedValue')))) {
+      if (!Em.isNone(this.get('config.savedValue')) && parsed == parseFunction(this.widgetValueByConfigAttributes(this.get('config.savedValue')))) {
         this.set('config.value', this.get('config.savedValue'));
         this.set('config.value', this.get('config.savedValue'));
       }
       }
     } else {
     } else {
@@ -245,9 +242,9 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({
   },
   },
 
 
   /**
   /**
+   * set widget value same as config value
    * @override
    * @override
    * @method setValue
    * @method setValue
-   * set widget value same as config value
    */
    */
   setValue: function(value) {
   setValue: function(value) {
     var parseFunction = this.get('parseFunction');
     var parseFunction = this.get('parseFunction');