Repository: ambari Updated Branches: refs/heads/trunk e19a719bd -> 8afdb0b23
AMBARI-6513. Move Wizard: big delay after clicking on show host progress popup (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8afdb0b2 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8afdb0b2 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8afdb0b2 Branch: refs/heads/trunk Commit: 8afdb0b2361a29843827e3f522a14e735056e0ac Parents: e19a719 Author: Alex Antonenko <hiv...@gmail.com> Authored: Sun Jul 20 12:29:09 2014 +0300 Committer: Alex Antonenko <hiv...@gmail.com> Committed: Mon Jul 21 16:19:08 2014 +0300 ---------------------------------------------------------------------- .../highAvailability/progress_controller.js | 2 +- .../progress_popup_controller.js | 24 +++++++++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/8afdb0b2/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 8aa58cd..702e72e 100644 --- a/ambari-web/app/controllers/main/admin/highAvailability/progress_controller.js +++ b/ambari-web/app/controllers/main/admin/highAvailability/progress_controller.js @@ -400,7 +400,7 @@ App.HighAvailabilityProgressPageController = App.HighAvailabilityWizardControlle var popupTitle = event.contexts[0].title; var requestIds = event.contexts[0].requestIds; var hostProgressPopupController = App.router.get('highAvailabilityProgressPopupController'); - hostProgressPopupController.initPopup(popupTitle, requestIds, this); + hostProgressPopupController.initPopup(popupTitle, requestIds, this, true); }, done: function () { http://git-wip-us.apache.org/repos/asf/ambari/blob/8afdb0b2/ambari-web/app/controllers/main/admin/highAvailability/progress_popup_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/admin/highAvailability/progress_popup_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/progress_popup_controller.js index ef24879..c1d161c 100644 --- a/ambari-web/app/controllers/main/admin/highAvailability/progress_popup_controller.js +++ b/ambari-web/app/controllers/main/admin/highAvailability/progress_popup_controller.js @@ -57,12 +57,30 @@ App.HighAvailabilityProgressPopupController = Ember.Controller.extend({ hostsData: [], /** + * During loading and calculations show popup with spinner + * @type {Object} + */ + spinnerPopup: null, + + /** * Get info for <code>requestIds</code> and initialize <code>App.HostPopup</code> * @param popupTitle {String} * @param requestIds {Array} * @param progressController {App.HighAvailabilityProgressPageController} + * @param showSpinner {Boolean} */ - initPopup: function (popupTitle, requestIds, progressController) { + initPopup: function (popupTitle, requestIds, progressController, showSpinner) { + if(showSpinner){ + var loadingPopup = App.ModalPopup.show({ + header: Em.I18n.t('jobs.loadingTasks'), + primary: false, + secondary: false, + bodyClass: Ember.View.extend({ + template: Ember.Handlebars.compile('<div class="spinner"></div>') + }) + }); + this.set('spinnerPopup', loadingPopup); + } this.set('progressController', progressController); this.set('popupTitle', popupTitle); this.set('requestIds', requestIds); @@ -102,6 +120,10 @@ App.HighAvailabilityProgressPopupController = Ember.Controller.extend({ this.addObserver('progressController.logs.length', this, 'getDataFromProgressController'); } } + if(this.get('spinnerPopup')){ + this.get('spinnerPopup').hide(); + this.set('spinnerPopup', null); + } }, /**