Repository: ambari Updated Branches: refs/heads/trunk ad6a78eee -> a4482bba2
AMBARI-21104 - Add Confirmation pop up for 'Generate Blueprint' button (Amruta Borkar via sangeetar) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a4482bba Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a4482bba Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a4482bba Branch: refs/heads/trunk Commit: a4482bba2c7f0d1bb3dfb79df45cd01909dd35ee Parents: ad6a78e Author: Sangeeta Ravindran <sangee...@apache.org> Authored: Thu May 25 14:04:09 2017 -0700 Committer: Sangeeta Ravindran <sangee...@apache.org> Committed: Thu May 25 14:04:09 2017 -0700 ---------------------------------------------------------------------- ambari-web/app/controllers/wizard/step8_controller.js | 11 +++++++++++ ambari-web/app/messages.js | 1 + ambari-web/app/templates/wizard/step8.hbs | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/a4482bba/ambari-web/app/controllers/wizard/step8_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/wizard/step8_controller.js b/ambari-web/app/controllers/wizard/step8_controller.js index f2b4ca7..5fbd45d 100644 --- a/ambari-web/app/controllers/wizard/step8_controller.js +++ b/ambari-web/app/controllers/wizard/step8_controller.js @@ -1851,6 +1851,17 @@ App.WizardStep8Controller = Em.Controller.extend(App.AddSecurityConfigs, App.wiz }); }, + /** + * Confirmation popup before generate blueprint + */ + generateBlueprintConfirmation: function () { + var self = this; + return App.showConfirmationPopup(function () { + self.generateBlueprint(); + }, Em.I18n.t('installer.step8.generateBlueprint.popup.msg').format(App.clusterStatus.clusterName) + ); + }, + generateBlueprint: function () { console.log("Prepare blueprint for download..."); var blueprint = {}; http://git-wip-us.apache.org/repos/asf/ambari/blob/a4482bba/ambari-web/app/messages.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index 0c15a19..09a2c0e 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -971,6 +971,7 @@ Em.I18n.translations = { 'installer.step8.header': 'Review', 'installer.step8.body': 'Please review the configuration before installation', 'installer.step8.kerberors.warning': '<strong>Because Kerberos has been manually installed on the cluster, you will have to create/distribute principals and keytabs when this operation is finished.</strong>', + 'installer.step8.generateBlueprint.popup.msg': 'You will be <b>downloading</b> blueprint.json and clustertemplate.json to your local machine. <br/><br/> You can use them to deploy a cluster via AMBARI REST API. <br/> Update clustertemplate.json with a custom cluster name if you do not want to use name <b>{0}</b>. <br/><br/>If you want to use custom repo URLs, make sure to update them via Ambari REST API before deploying the cluster.', 'installer.step8.deployPopup.message':'Preparing to Deploy: {0} of {1} tasks completed.', 'installer.step8.hosts':' hosts', 'installer.step8.host':' host', http://git-wip-us.apache.org/repos/asf/ambari/blob/a4482bba/ambari-web/app/templates/wizard/step8.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/wizard/step8.hbs b/ambari-web/app/templates/wizard/step8.hbs index 907b3d4..e210896 100644 --- a/ambari-web/app/templates/wizard/step8.hbs +++ b/ambari-web/app/templates/wizard/step8.hbs @@ -100,7 +100,7 @@ <button type="button" class="btn btn-info pull-right" {{action printReview target="view"}}>{{t common.print}}</button> <button type="button" {{bindAttr class=":btn :btn-primary :pull-right :mrm controller.showDownloadCsv::hide"}} {{action downloadCSV target="controller"}}>{{t admin.kerberos.wizard.step5.downloadCSV}}</button> {{#unless App.router.clusterInstallCompleted}} - <button type="button" class="btn btn-success pull-right" {{action generateBlueprint target="controller"}}><i class="glyphicon glyphicon-download-alt"></i> + <button type="button" class="btn btn-success pull-right" {{action generateBlueprintConfirmation target="controller"}}><i class="glyphicon glyphicon-download-alt"></i> {{t common.generate.blueprint}} </button> {{/unless}}