Forráskód Böngészése

AMBARI-16681 UI : the minimum and maximum bound values for ''% cluster capacity'' are superimposed at minimum display value.(ababiichuk)

ababiichuk 9 éve
szülő
commit
1eb7d29ef8

+ 2 - 0
ambari-web/app/controllers/wizard/step7/assign_master_controller.js

@@ -131,6 +131,7 @@ App.AssignMasterOnStep7Controller = Em.Controller.extend(App.BlueprintMixin, App
       body: Em.I18n.t('installer.step7.missing.service.body').format(displayServices, configDisplayName),
       primaryClass: 'btn-danger',
       onPrimary: function () {
+        configWidgetContext.toggleProperty('controller.forceUpdateBoundaries');
         var value = config.get('initialValue');
         config.set('value', value);
         configWidgetContext.setValue(value);
@@ -350,6 +351,7 @@ App.AssignMasterOnStep7Controller = Em.Controller.extend(App.BlueprintMixin, App
   submit: function () {
     this.get('popup').hide();
     var context = this.get('configWidgetContext');
+    context.toggleProperty('controller.forceUpdateBoundaries');
     var configActionComponent = this.get('configActionComponent');
     var componentHostName = this.getSelectedHostName(configActionComponent.componentName);
     if (this.get('content.controllerName')) {

+ 6 - 2
ambari-web/test/controllers/wizard/step7/assign_master_controller_test.js

@@ -147,18 +147,21 @@ describe('App.AssignMasterOnStep7Controller', function () {
         value: '',
         displayName: 'c1'
       }),
-      setValue: Em.K
+      setValue: Em.K,
+      toggleProperty: Em.K
     });
 
     beforeEach(function() {
       sinon.stub(stringUtils, 'getFormattedStringFromArray');
       sinon.stub(mock, 'setValue');
+      sinon.stub(mock, 'toggleProperty');
       sinon.spy(App.ModalPopup, 'show');
     });
 
     afterEach(function() {
       stringUtils.getFormattedStringFromArray.restore();
       mock.setValue.restore();
+      mock.toggleProperty.restore();
       App.ModalPopup.show.restore();
     });
 
@@ -354,7 +357,8 @@ describe('App.AssignMasterOnStep7Controller', function () {
                 configName: 'conf1'
               }
             },
-            serviceName: 'S1'
+            serviceName: 'S1',
+            toggleProperty: Em.K
           }),
           controller: Em.Object.create({
             stepConfigs: [