Merge "Environment renaming improvement"
This commit is contained in:
commit
c611608201
|
@ -73,7 +73,7 @@ define([
|
|||
.pressKeys('\uE007')
|
||||
.assertElementTextEquals(
|
||||
'.create-cluster-form span.help-block',
|
||||
'Environment with name "' + clusterName + '" already exists',
|
||||
'Environment with this name already exists',
|
||||
'Error message should say that environment with that name already exists'
|
||||
)
|
||||
.then(function() {
|
||||
|
|
|
@ -924,7 +924,7 @@
|
|||
"title": "Name and Release",
|
||||
"name": "Name",
|
||||
"release_label": "OpenStack Release",
|
||||
"existing_environment": "Environment with name \"__name__\" already exists",
|
||||
"existing_environment": "Environment with this name already exists",
|
||||
"Ubuntu_connectivity_alert": "By default, Fuel uploads the software packages for the Fuel Slave nodes from the external repositories. Please verify the Fuel Master node has the Internet connection.\nIf the Fuel Master node does not have access to the Internet, you must create a local mirror with all required software packages and configure Fuel to use the mirror before you deploy an OpenStack environment.",
|
||||
"CentOS_connectivity_alert": "By default, Fuel uploads the software packages for the Fuel Slave nodes from the external repositories. Please verify the Fuel Master node has the Internet connection.\nIf the Fuel Master node does not have access to the Internet, you must create a local mirror with all required software packages and configure Fuel to use the mirror before you deploy an OpenStack environment."
|
||||
},
|
||||
|
|
|
@ -1121,9 +1121,9 @@ var RenameEnvironmentAction = React.createClass({
|
|||
applyAction(e) {
|
||||
e.preventDefault();
|
||||
var {cluster, endRenaming} = this.props;
|
||||
var name = this.state.name;
|
||||
var name = _.trim(this.state.name);
|
||||
if (name !== cluster.get('name')) {
|
||||
var deferred = cluster.save({name: name}, {patch: true, wait: true});
|
||||
var deferred = cluster.save({name}, {patch: true, wait: true});
|
||||
if (deferred) {
|
||||
this.setState({disabled: true});
|
||||
deferred
|
||||
|
|
|
@ -273,10 +273,10 @@ var NameAndRelease = React.createClass({
|
|||
wizard.get('clusters')
|
||||
];
|
||||
// test cluster name is already taken
|
||||
if (clusters.findWhere({name: name})) {
|
||||
var error = i18n('dialog.create_cluster_wizard.name_release.existing_environment',
|
||||
{name: name});
|
||||
wizard.set({name_error: error});
|
||||
if (clusters.findWhere({name: _.trim(name)})) {
|
||||
wizard.set({
|
||||
name_error: i18n('dialog.create_cluster_wizard.name_release.existing_environment')
|
||||
});
|
||||
return false;
|
||||
}
|
||||
// validate cluster fields
|
||||
|
|
Loading…
Reference in New Issue