From 9dfe300e7e6acbeed883134f0a8c72f204ee14c8 Mon Sep 17 00:00:00 2001 From: Julia Aranovich Date: Wed, 3 Feb 2016 16:42:56 +0300 Subject: [PATCH] Fix warning when stopping deployment on provisioning stage Related-Bug: #1538645 Change-Id: If085bf10c2eaaa74f0ea6a864dbefb55021c97a9 --- nailgun/static/translations/core.json | 3 ++- nailgun/static/views/dialogs.js | 13 ++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/nailgun/static/translations/core.json b/nailgun/static/translations/core.json index 056ced6694..21c6af9023 100644 --- a/nailgun/static/translations/core.json +++ b/nailgun/static/translations/core.json @@ -1031,7 +1031,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 f070f0afd0..27eab46153 100644 --- a/nailgun/static/views/dialogs.js +++ b/nailgun/static/views/dialogs.js @@ -531,12 +531,19 @@ export var StopDeploymentDialog = React.createClass({ }); }, renderBody() { + 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') + }
); },