This is an automated email from the ASF dual-hosted git repository. atkach pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push: new 2b0164a AMBARI-23068 Service Auto Start cannot be disabled 2b0164a is described below commit 2b0164ac8910e4b46c4f97d90b9e5370c150bb09 Author: Andrii Tkach <atk...@apache.org> AuthorDate: Fri Feb 23 17:43:39 2018 +0200 AMBARI-23068 Service Auto Start cannot be disabled --- ambari-web/app/controllers/main/admin/service_auto_start.js | 5 +++-- ambari-web/test/controllers/main/admin/service_auto_start_test.js | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ambari-web/app/controllers/main/admin/service_auto_start.js b/ambari-web/app/controllers/main/admin/service_auto_start.js index 0d34ef0..80b6e50 100644 --- a/ambari-web/app/controllers/main/admin/service_auto_start.js +++ b/ambari-web/app/controllers/main/admin/service_auto_start.js @@ -154,7 +154,8 @@ App.MainAdminServiceAutoStartController = Em.Controller.extend({ this.set('componentsConfigsGrouped', this.parseComponentConfigs(data.items)); }, - saveClusterConfigs: function (clusterConfigs) { + saveClusterConfigs: function (clusterConfigs, recoveryEnabled) { + clusterConfigs.recovery_enabled = String(recoveryEnabled); return App.ajax.send({ name: 'admin.save_configs', sender: this, @@ -233,7 +234,7 @@ App.MainAdminServiceAutoStartController = Em.Controller.extend({ let clusterConfigsCall, enabledComponentsCall, disabledComponentsCall; if (self.get('isGeneralModified')) { - clusterConfigsCall = self.saveClusterConfigs(self.get('clusterConfigs')); + clusterConfigsCall = self.saveClusterConfigs(self.get('clusterConfigs'), self.get('isGeneralRecoveryEnabled')); } const enabledComponents = self.filterComponentsByChange(self.get('componentsConfigsGrouped'), true); diff --git a/ambari-web/test/controllers/main/admin/service_auto_start_test.js b/ambari-web/test/controllers/main/admin/service_auto_start_test.js index 66d8b70..2fb1894 100644 --- a/ambari-web/test/controllers/main/admin/service_auto_start_test.js +++ b/ambari-web/test/controllers/main/admin/service_auto_start_test.js @@ -174,17 +174,17 @@ describe('App.MainAdminServiceAutoStartController', function() { }); describe('#saveClusterConfigs()', function() { - var clusterConfigs = {}; - it('App.ajax.send should be called', function() { - controller.saveClusterConfigs(clusterConfigs); + controller.saveClusterConfigs({recovery_enabled: 'false'}, true); var args = testHelpers.findAjaxRequest('name', 'admin.save_configs'); expect(args[0]).to.be.eql({ name: 'admin.save_configs', sender: controller, data: { siteName: 'cluster-env', - properties: clusterConfigs + properties: { + recovery_enabled: "true" + } } }); }); -- To stop receiving notification emails like this one, please contact atk...@apache.org.