Return-Path: X-Original-To: apmail-ambari-commits-archive@www.apache.org Delivered-To: apmail-ambari-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5C4B11047A for ; Fri, 25 Jul 2014 16:53:54 +0000 (UTC) Received: (qmail 61677 invoked by uid 500); 25 Jul 2014 16:53:54 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 61647 invoked by uid 500); 25 Jul 2014 16:53:54 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 61638 invoked by uid 99); 25 Jul 2014 16:53:54 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Jul 2014 16:53:54 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id C120F9B51C6; Fri, 25 Jul 2014 16:53:53 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: akovalenko@apache.org To: commits@ambari.apache.org Message-Id: <5c33846022294ca6bac2dc1dcba0d03c@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: AMBARI-6621. RM HA Wizard: Show confirmation popup if user try to close wizard on the last step. (akovalenko) Date: Fri, 25 Jul 2014 16:53:53 +0000 (UTC) Repository: ambari Updated Branches: refs/heads/trunk ebfd77fd5 -> d6949dc37 AMBARI-6621. RM HA Wizard: Show confirmation popup if user try to close wizard on the last step. (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d6949dc3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d6949dc3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d6949dc3 Branch: refs/heads/trunk Commit: d6949dc3784961da1f70dfa2435d6770df52d173 Parents: ebfd77f Author: Aleksandr Kovalenko Authored: Fri Jul 25 19:51:09 2014 +0300 Committer: Aleksandr Kovalenko Committed: Fri Jul 25 19:51:09 2014 +0300 ---------------------------------------------------------------------- ambari-web/app/messages.js | 1 + .../app/routes/rm_high_availability_routes.js | 39 +++++++++++++------- 2 files changed, 27 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/d6949dc3/ambari-web/app/messages.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index 56d99a1..44f9bad 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -840,6 +840,7 @@ Em.I18n.translations = { 'admin.highAvailability.error.security':'You cannot enable NameNode HA via this wizard as your cluster is already secured. First, disable security by going to Admin > Security, and then run this Enable NameNode HA wizard again. After NameNode HA is enabled, you can go back to Admin > Security to secure the cluster.', 'admin.rm_highAvailability.error.hostsNum':'You must have at least 3 hosts in your cluster to enable ResourceManager HA.', 'admin.rm_highAvailability.error.zooKeeperNum':'You must have at least 3 ZooKeeper Servers in your cluster to enable ResourceManager HA.', + 'admin.rm_highAvailability.closePopup':'Enable ResourceManager HA Wizard is in progress. You must allow the wizard to complete for Ambari to be in usable state. If you choose to quit, you must follow manual instructions to complete or revert enabling ResourceManager HA as documented in the Ambari User Guide. Are you sure you want to exit the wizard?', 'admin.highAvailability.wizard.header':'Enable NameNode HA Wizard', 'admin.highAvailability.wizard.progressPage.notice.inProgress':'Please wait while NameNode HA is being deployed.', http://git-wip-us.apache.org/repos/asf/ambari/blob/d6949dc3/ambari-web/app/routes/rm_high_availability_routes.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/routes/rm_high_availability_routes.js b/ambari-web/app/routes/rm_high_availability_routes.js index a84c1f5..dcc7c8d 100644 --- a/ambari-web/app/routes/rm_high_availability_routes.js +++ b/ambari-web/app/routes/rm_high_availability_routes.js @@ -36,18 +36,30 @@ module.exports = App.WizardRoute.extend({ secondary: null, onClose: function () { - var controller = App.router.get('rMHighAvailabilityWizardController'); - controller.clearStorageData(); - controller.setCurrentStep('1'); - App.router.get('updateController').set('isWorking', true); - App.clusterStatus.setClusterStatus({ - clusterName: App.router.get('content.cluster.name'), - clusterState: 'DEFAULT', - wizardControllerName: App.router.get('rMHighAvailabilityWizardController.name'), - localdb: App.db.data - }); - this.hide(); - App.router.transitionTo('main.admin.adminHighAvailability'); + var rMHighAvailabilityWizardController = router.get('rMHighAvailabilityWizardController'); + var currStep = rMHighAvailabilityWizardController.get('currentStep'); + + if (parseInt(currStep) === 4) { + var self = this; + App.showConfirmationPopup(function () { + self.hide(); + rMHighAvailabilityWizardController.setCurrentStep('1'); + App.clusterStatus.setClusterStatus({ + clusterName: App.router.getClusterName(), + clusterState: 'DEFAULT', + wizardControllerName: rMHighAvailabilityWizardController.get('name'), + localdb: App.db.data + }); + router.get('updateController').set('isWorking', true); + router.transitionTo('main.admin.adminHighAvailability.index'); + location.reload(); + }, Em.I18n.t('admin.rm_highAvailability.closePopup')); + } else { + this.hide(); + rMHighAvailabilityWizardController.setCurrentStep('1'); + router.get('updateController').set('isWorking', true); + router.transitionTo('main.admin.adminHighAvailability.index') + } }, didInsertElement: function () { this.fitHeight(); @@ -164,7 +176,8 @@ module.exports = App.WizardRoute.extend({ wizardControllerName: 'rMHighAvailabilityWizardController', localdb: App.db.data }); - router.transitionTo('main.index'); + router.transitionTo('main.admin.adminHighAvailability.index'); + location.reload(); } }),