Repository: ambari Updated Branches: refs/heads/trunk 4e78cb341 -> df85df87e
AMBARI-5069. Restart button on host details page doesn't have confirm popup. (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/df85df87 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/df85df87 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/df85df87 Branch: refs/heads/trunk Commit: df85df87ef586c2ef97af81d70f19f53501b9626 Parents: 4e78cb3 Author: Oleg Nechiporenko <[email protected]> Authored: Thu Mar 13 16:05:29 2014 +0200 Committer: Oleg Nechiporenko <[email protected]> Committed: Thu Mar 13 16:06:27 2014 +0200 ---------------------------------------------------------------------- ambari-web/app/controllers/main/host/details.js | 7 +++++-- .../app/controllers/main/service/info/configs.js | 16 ++++------------ 2 files changed, 9 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/df85df87/ambari-web/app/controllers/main/host/details.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/host/details.js b/ambari-web/app/controllers/main/host/details.js index d47abc1..6b6aece 100644 --- a/ambari-web/app/controllers/main/host/details.js +++ b/ambari-web/app/controllers/main/host/details.js @@ -1223,8 +1223,11 @@ App.MainHostDetailsController = Em.Controller.extend({ }, restartAllStaleConfigComponents: function() { - var staleComponents = this.get('content.componentsWithStaleConfigs'); - batchUtils.restartHostComponents(staleComponents, Em.I18n.t('rollingrestart.context.allWithStaleConfigsOnSelectedHost').format(this.get('content.hostName'))); + var self = this; + App.showConfirmationPopup(function () { + var staleComponents = self.get('content.componentsWithStaleConfigs'); + batchUtils.restartHostComponents(staleComponents, Em.I18n.t('rollingrestart.context.allWithStaleConfigsOnSelectedHost').format(self.get('content.hostName'))); + }); }, /** http://git-wip-us.apache.org/repos/asf/ambari/blob/df85df87/ambari-web/app/controllers/main/service/info/configs.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/service/info/configs.js b/ambari-web/app/controllers/main/service/info/configs.js index b632b9f..aa04475 100644 --- a/ambari-web/app/controllers/main/service/info/configs.js +++ b/ambari-web/app/controllers/main/service/info/configs.js @@ -1626,18 +1626,10 @@ App.MainServiceInfoConfigsController = Em.Controller.extend({ }, restartAllStaleConfigComponents: function() { - var content = this; - return App.ModalPopup.show({ - primary: Em.I18n.t('ok'), - secondary: Em.I18n.t('common.cancel'), - header: Em.I18n.t('popup.confirmation.commonHeader'), - body: Em.I18n.t('question.sure'), - content: content, - onPrimary: function () { - var selectedService = this.content.get('content.id'); - this.hide(); - batchUtils.restartAllServiceHostComponents(selectedService, true); - } + var self = this; + App.showConfirmationPopup(function () { + var selectedService = self.get('content.id'); + batchUtils.restartAllServiceHostComponents(selectedService, true); }); },
