Fix error messages of clone UI
This commit is contained in:
@@ -1604,15 +1604,15 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
|
||||
|
||||
if (error) {
|
||||
var errorMessage = error.message.toLowerCase();
|
||||
if (error.statusCode === 409) {
|
||||
if (errorMessage.indexOf('port') !== -1) {
|
||||
$scope.clone.error.port = error.message;
|
||||
} else if (error.message.indexOf('location') !== -1) {
|
||||
$scope.clone.error.location = 'This location is already taken.';
|
||||
$('#cloneLocationInput').focus();
|
||||
if (errorMessage.indexOf('port') !== -1) {
|
||||
$scope.clone.error.port = error.message;
|
||||
} else if (error.message.indexOf('location') !== -1) {
|
||||
if (errorMessage.indexOf('primary') !== -1) {
|
||||
$scope.clone.error.location = error.message;
|
||||
} else {
|
||||
Client.error(error);
|
||||
$scope.clone.error.secondaryDomain = error.message;
|
||||
}
|
||||
$('#cloneLocationInput').focus();
|
||||
} else {
|
||||
Client.error(error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user