From 741bf0ca72e9c4916257dc1c5b32489ec6ed36c7 Mon Sep 17 00:00:00 2001 From: Julia Aranovich Date: Wed, 3 Feb 2016 17:45:31 +0300 Subject: [PATCH] Fix warning when stopping deployment on provisioning stage Closes-Bug: #1538645 Change-Id: If085bf10c2eaaa74f0ea6a864dbefb55021c97a9 --- nailgun/static/translations/core.json | 3 ++- nailgun/static/views/dialogs.js | 11 ++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/nailgun/static/translations/core.json b/nailgun/static/translations/core.json index 61bcd7b5d8..d1c2e8654c 100644 --- a/nailgun/static/translations/core.json +++ b/nailgun/static/translations/core.json @@ -1030,7 +1030,8 @@ "stop_deployment": { "title": "Stop Deployment", "text": "Are you sure you want to stop this deployment? You may not be able to successfully re-deploy this OpenStack environment until you reset the environment. Proceed with caution!", - "provisioning_warning": "Are you sure you want to interrupt the deployment? If Fuel has not completed the node provisioning, changes applied to the nodes will be discarded and the nodes will be reset to their pre-deployment state.", + "provisioning_warning": "Are you sure you want to interrupt the deployment at OS provisioning stage? Fuel has not completed the node provisioning, changes applied to the nodes will be discarded and the nodes will be reset to their pre-deployment state.", + "redeployment_warning": "Please wait 20 minutes before attempting to run the deployment again to ensure the provisioning process has been stopped.", "stop_deployment_error": { "title": "Stop Deployment Error", "stop_deployment_warning": "Unable to stop deployment" diff --git a/nailgun/static/views/dialogs.js b/nailgun/static/views/dialogs.js index 32b74b5647..1a71500ca5 100644 --- a/nailgun/static/views/dialogs.js +++ b/nailgun/static/views/dialogs.js @@ -452,10 +452,19 @@ function($, _, i18n, Backbone, React, utils, models, dispatcher, controls, compo }, this)); }, renderBody: function() { + var ns = 'dialog.stop_deployment.'; return (
{this.renderImportantLabel()} - {i18n('dialog.stop_deployment.' + (this.props.cluster.get('nodes').where({status: 'provisioning'}).length ? 'provisioning_warning' : 'text'))} + {this.props.cluster.get('nodes').any({status: 'provisioning'}) ? + + {i18n(ns + 'provisioning_warning')} +

+ {i18n(ns + 'redeployment_warning')} +
+ : + i18n(ns + 'text') + }
); },