You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by zh...@apache.org on 2016/10/10 23:18:40 UTC
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)
Repository: ambari
Updated Branches:
refs/heads/trunk 8f51c9324 -> 6587fda47
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/trunk
Commit: 6587fda470bcf063027e55b315292018dc1e64b4
Parents: 8f51c93
Author: Zhe (Joe) Wang <zh...@apache.org>
Authored: Mon Oct 10 16:17:56 2016 -0700
Committer: Zhe (Joe) Wang <zh...@apache.org>
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();