Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C25E9200B9D for ; Thu, 13 Oct 2016 14:43:15 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C1281160AE4; Thu, 13 Oct 2016 12:43:15 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E22D3160AFD for ; Thu, 13 Oct 2016 14:43:14 +0200 (CEST) Received: (qmail 29752 invoked by uid 500); 13 Oct 2016 12:43:14 -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 29572 invoked by uid 99); 13 Oct 2016 12:43:13 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Oct 2016 12:43:13 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B1D45E390E; Thu, 13 Oct 2016 12:43:13 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ncole@apache.org To: commits@ambari.apache.org Date: Thu, 13 Oct 2016 12:43:20 -0000 Message-Id: In-Reply-To: <868b0851a3324962a18dfc2996b398ec@git.apache.org> References: <868b0851a3324962a18dfc2996b398ec@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [08/20] ambari git commit: AMBARI-18559 At "Add Service Wizard", when the installation is going on, if I click the close (X) on the wizard, the service will only get INSTALLED not STARTED. (Vivek Ratnavel Subramanian via zhewang) archived-at: Thu, 13 Oct 2016 12:43:15 -0000 AMBARI-18559 At "Add Service Wizard", when the installation is going on, if I click the close (X) on the wizard, the service will only get INSTALLED not STARTED. (Vivek Ratnavel Subramanian via zhewang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6587fda4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6587fda4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6587fda4 Branch: refs/heads/branch-dev-patch-upgrade Commit: 6587fda470bcf063027e55b315292018dc1e64b4 Parents: 8f51c93 Author: Zhe (Joe) Wang Authored: Mon Oct 10 16:17:56 2016 -0700 Committer: Zhe (Joe) Wang Committed: Mon Oct 10 16:17:56 2016 -0700 ---------------------------------------------------------------------- ambari-web/app/messages.js | 1 + ambari-web/app/routes/add_service_routes.js | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/6587fda4/ambari-web/app/messages.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index 5eafad2..7150081 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -2101,6 +2101,7 @@ Em.I18n.translations = { 'services.service.widgets.list-widget.nothingSelected': 'Nothing selected', 'services.add.header':'Add Service Wizard', + 'services.add.warning': 'Closing this dialog will continue to install the selected service(s) in the background, but the installed services need to be started manually. Are you sure you want to quit?', 'services.reassign.header':'Move Master Wizard', 'services.service.add':'Add Service', 'services.service.startAll':'Start All', http://git-wip-us.apache.org/repos/asf/ambari/blob/6587fda4/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 30c8e07..692d186 100644 --- a/ambari-web/app/routes/add_service_routes.js +++ b/ambari-web/app/routes/add_service_routes.js @@ -46,6 +46,16 @@ module.exports = App.WizardRoute.extend({ App.router.transitionTo('main.services.index'); }, onClose: function () { + var controller = router.get('addServiceController'); + var currentStep = controller.get('currentStep'); + if(currentStep == '7') { + // Show a warning popup + this.showWarningPopup(); + } else { + this.afterWarning(); + } + }, + afterWarning: function () { this.set('showCloseButton', false); // prevent user to click "Close" many times App.router.get('updateController').set('isWorking', true); App.router.get('updateController').updateServices(function () { @@ -54,6 +64,20 @@ module.exports = App.WizardRoute.extend({ var exitPath = addServiceController.getDBProperty('onClosePath') || 'main.services.index'; addServiceController.resetOnClose(addServiceController, exitPath); }, + showWarningPopup: function() { + var mainPopupContext = this; + App.ModalPopup.show({ + encodeBody: false, + header: Em.I18n.t('common.warning'), + primaryClass: 'btn-warning', + secondary: Em.I18n.t('form.cancel'), + body: Em.I18n.t('services.add.warning'), + onPrimary: function () { + this.hide(); + mainPopupContext.afterWarning(); + } + }); + }, didInsertElement: function () { this._super(); this.fitHeight();