update for adding project validation and listing replication job.

This commit is contained in:
kunw 2016-06-17 11:58:24 +08:00
parent 38388b25cb
commit 1ac534f333
2 changed files with 6 additions and 6 deletions

View File

@ -40,13 +40,12 @@
}
function addProjectFailed(data, status) {
if(status === 409) {
vm.hasError = true;
vm.errorMessage = 'project_already_exist';
vm.hasError = true;
if(status == 400) {
vm.errorMessage = 'project_name_is_invalid';
}
if(status === 500) {
vm.hasError = true;
vm.errorMessage = 'project_name_is_invalid';
if(status === 409) {
vm.errorMessage = 'project_already_exist';
}
console.log('Failed to add project:' + status);
}

View File

@ -14,6 +14,7 @@
$scope.$on('$locationChangeSuccess', function() {
vm.projectId = getParameterByName('project_id', $location.absUrl());
vm.retrievePolicy();
vm.retrieveJob();
});
vm.addReplication = addReplication;