Repository: ambari Updated Branches: refs/heads/trunk a3639e6e4 -> fcd6a94be
AMBARI-5124. Configure Components step of HA wizard got stuck forever (requires page refresh to continue). (Buzhor Denys via onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fcd6a94b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fcd6a94b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fcd6a94b Branch: refs/heads/trunk Commit: fcd6a94be63975ef4455c8811cbe2bda5bcadb6c Parents: a3639e6 Author: Oleg Nechiporenko <[email protected]> Authored: Tue Mar 18 14:50:07 2014 +0200 Committer: Oleg Nechiporenko <[email protected]> Committed: Tue Mar 18 14:50:07 2014 +0200 ---------------------------------------------------------------------- .../highAvailability/progress_controller.js | 22 +++++++------- .../admin/highAvailability/step5_controller.js | 30 ++++++++------------ 2 files changed, 23 insertions(+), 29 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/fcd6a94b/ambari-web/app/controllers/main/admin/highAvailability/progress_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/admin/highAvailability/progress_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/progress_controller.js index 129d9ff..a5c58e5 100644 --- a/ambari-web/app/controllers/main/admin/highAvailability/progress_controller.js +++ b/ambari-web/app/controllers/main/admin/highAvailability/progress_controller.js @@ -253,17 +253,17 @@ App.HighAvailabilityProgressPageController = App.HighAvailabilityWizardControlle for (var i = 0; i < hostName.length; i++) { hostComponents = App.HostComponent.find().filterProperty('componentName', componentName); if (!hostComponents.length || !hostComponents.mapProperty('host.hostName').contains(hostName[i])) { - App.ajax.send({ - name: 'admin.high_availability.create_component', - sender: this, - data: { - hostName: hostName[i], - componentName: componentName, - taskNum: hostName.length - }, - success: 'onCreateComponent', - error: 'onCreateComponentError' - }); + App.ajax.send({ + name: 'admin.high_availability.create_component', + sender: this, + data: { + hostName: hostName[i], + componentName: componentName, + taskNum: hostName.length + }, + success: 'onCreateComponent', + error: 'onCreateComponentError' + }); } else { // Simulates format returned from ajax.send this.onCreateComponent(null, null, {hostName: hostName[i], componentName: componentName, taskNum: hostName.length}); http://git-wip-us.apache.org/repos/asf/ambari/blob/fcd6a94b/ambari-web/app/controllers/main/admin/highAvailability/step5_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/admin/highAvailability/step5_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/step5_controller.js index b263277..b47dc38 100644 --- a/ambari-web/app/controllers/main/admin/highAvailability/step5_controller.js +++ b/ambari-web/app/controllers/main/admin/highAvailability/step5_controller.js @@ -80,7 +80,7 @@ App.HighAvailabilityWizardStep5Controller = App.HighAvailabilityProgressPageCont var data = this.get('content.serviceConfigProperties'); var hdfsSiteProperties = data.items.findProperty('type', 'hdfs-site').properties; var coreSiteProperties = data.items.findProperty('type', 'core-site').properties; - this.set('configsSaved', false); + var self = this; App.ajax.send({ name: 'admin.high_availability.save_configs', sender: this, @@ -88,28 +88,22 @@ App.HighAvailabilityWizardStep5Controller = App.HighAvailabilityProgressPageCont siteName: 'hdfs-site', properties: hdfsSiteProperties }, - success: 'installHDFSClients', - error: 'onTaskError' - }); - App.ajax.send({ - name: 'admin.high_availability.save_configs', - sender: this, - data: { - siteName: 'core-site', - properties: coreSiteProperties - }, - success: 'installHDFSClients', error: 'onTaskError' + }).done(function() { + App.ajax.send({ + name: 'admin.high_availability.save_configs', + sender: self, + data: { + siteName: 'core-site', + properties: coreSiteProperties + }, + error: 'onTaskError', + success: 'installHDFSClients' + }); }); }, - configsSaved: false, - installHDFSClients: function () { - if (!this.get('configsSaved')) { - this.set('configsSaved', true); - return; - } var nnHostNames = this.get('content.masterComponentHosts').filterProperty('component', 'NAMENODE').mapProperty('hostName'); var jnHostNames = this.get('content.masterComponentHosts').filterProperty('component', 'JOURNALNODE').mapProperty('hostName'); var hostNames = $.extend([], nnHostNames, jnHostNames);
