You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by at...@apache.org on 2015/01/09 15:01:46 UTC
[2/2] ambari git commit: AMBARI-9060 Upgrade Progress Popup: add
Dismiss button in the footer and remove confirmation popup on hitting X.
(atkach)
AMBARI-9060 Upgrade Progress Popup: add Dismiss button in the footer and remove confirmation popup on hitting X. (atkach)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d2dd6962
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d2dd6962
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d2dd6962
Branch: refs/heads/trunk
Commit: d2dd6962a05fa7237973ba913185e519f2e94931
Parents: c1fd867
Author: Andrii Tkach <at...@hortonworks.com>
Authored: Fri Jan 9 15:25:49 2015 +0200
Committer: Andrii Tkach <at...@hortonworks.com>
Committed: Fri Jan 9 16:01:17 2015 +0200
----------------------------------------------------------------------
ambari-web/app/routes/stack_upgrade_routes.js | 28 +++++-----------------
1 file changed, 6 insertions(+), 22 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/d2dd6962/ambari-web/app/routes/stack_upgrade_routes.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/stack_upgrade_routes.js b/ambari-web/app/routes/stack_upgrade_routes.js
index eddc2d2..be0f7e5 100644
--- a/ambari-web/app/routes/stack_upgrade_routes.js
+++ b/ambari-web/app/routes/stack_upgrade_routes.js
@@ -32,7 +32,7 @@ module.exports = App.WizardRoute.extend({
return Em.I18n.t('admin.stackUpgrade.dialog.header').format(App.router.get('mainAdminStackAndUpgradeController').get('upgradeVersion'));
}.property('App.router.mainAdminStackAndUpgradeController.upgradeVersion'),
bodyClass: App.upgradeWizardView,
- primary: null,
+ primary: Em.I18n.t('common.dismiss'),
secondary: null,
didInsertElement: function () {
this.fitHeight();
@@ -49,27 +49,11 @@ module.exports = App.WizardRoute.extend({
scrollable.css('max-height', Number(block.css('max-height').slice(0, -2)) - block.height());
block.css('max-height', 'none');
},
- onClose: function() {
- var self = this, header, body;
- if (['IN_PROGRESS', 'PENDING', 'FAILED'].contains(App.get('upgradeState'))) {
- header = Em.I18n.t('admin.stackUpgrade.state.inProgress');
- body = Em.I18n.t('admin.stackUpgrade.dialog.closeProgress');
- } else if (App.get('upgradeState') === 'HOLDING') {
- header = Em.I18n.t('admin.stackUpgrade.state.paused');
- body = Em.I18n.t('admin.stackUpgrade.dialog.closePause');
- } else {
- this.closeWizard();
- return;
- }
- App.ModalPopup.show({
- header: header,
- body: body,
- showCloseButton: false,
- onPrimary: function() {
- self.closeWizard();
- this._super();
- }
- })
+ onPrimary: function () {
+ this.closeWizard();
+ },
+ onClose: function () {
+ this.closeWizard();
},
closeWizard: function () {
App.router.get('updateController').set('isWorking', true);