Repository: ambari Updated Branches: refs/heads/trunk 6f5d57e0c -> 087b990aa
AMBARI-9886 Adding service: retry button does not refresh UI dialog after failure. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5ba2689a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5ba2689a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5ba2689a Branch: refs/heads/trunk Commit: 5ba2689a389d1e887efb41722dbdcc108e625456 Parents: fcda5e1 Author: aBabiichuk <ababiic...@cybervisiontech.com> Authored: Tue Mar 3 12:59:57 2015 +0200 Committer: aBabiichuk <ababiic...@cybervisiontech.com> Committed: Tue Mar 3 15:39:06 2015 +0200 ---------------------------------------------------------------------- .../controllers/main/service/add_controller.js | 27 ++++++++------------ ambari-web/app/routes/add_service_routes.js | 8 +++++- 2 files changed, 18 insertions(+), 17 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/5ba2689a/ambari-web/app/controllers/main/service/add_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/service/add_controller.js b/ambari-web/app/controllers/main/service/add_controller.js index 7cccb44..b340e68 100644 --- a/ambari-web/app/controllers/main/service/add_controller.js +++ b/ambari-web/app/controllers/main/service/add_controller.js @@ -524,33 +524,28 @@ App.AddServiceController = App.WizardController.extend(App.AddSecurityConfigs, { }, /** - * run this method after success/error callbacks - * for <code>installServicesRequest<code> - */ - installServicesComplete: function () { - App.get('router.wizardStep8Controller').set('servicesInstalled', true); - this.setInfoForStep9(); - this.saveClusterState('ADD_SERVICES_INSTALLING_3'); - App.router.transitionTo('step7'); - }, - - /** - * main method for installinf clients + * main method for installing additional clients and services + * @param {function} callback * @method installServices */ - installServices: function () { + installServices: function (callback) { var self = this; this.set('content.cluster.oldRequestsId', []); this.installAdditionalClients().done(function () { - self.installSelectedServices(); + self.installSelectedServices(callback); }); }, - installSelectedServices: function () { + /** + * method to install added services + * @param {function} callback + * @method installSelectedServices + */ + installSelectedServices: function (callback) { var name = 'common.services.update'; var selectedServices = this.get('content.services').filterProperty('isInstalled', false).filterProperty('isSelected', true).mapProperty('serviceName'); var data = this.generateDataForInstallServices(selectedServices); - this.installServicesRequest(name, data, this.installServicesComplete.bind(this)); + this.installServicesRequest(name, data, callback.bind(this)); }, installServicesRequest: function (name, data, callback) { http://git-wip-us.apache.org/repos/asf/ambari/blob/5ba2689a/ambari-web/app/routes/add_service_routes.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/routes/add_service_routes.js b/ambari-web/app/routes/add_service_routes.js index 44051ba..568b6cb 100644 --- a/ambari-web/app/routes/add_service_routes.js +++ b/ambari-web/app/routes/add_service_routes.js @@ -310,7 +310,13 @@ module.exports = App.WizardRoute.extend({ } }, next: function (router) { - router.get('addServiceController').installServices(); + var addServiceController = router.get('addServiceController'); + addServiceController.installServices(function () { + router.get('wizardStep8Controller').set('servicesInstalled', true); + addServiceController.setInfoForStep9(); + addServiceController.saveClusterState('ADD_SERVICES_INSTALLING_3'); + App.router.transitionTo('step7'); + }); } }),