mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-21 23:21:26 +01:00
Update for fine-grained error message of project deletion.
This commit is contained in:
parent
c88555c498
commit
198d1ffdb5
@ -173,7 +173,12 @@
|
||||
|
||||
function deleteProjectFailed(data, status) {
|
||||
$scope.$emit('modalTitle', $filter('tr')('error'));
|
||||
$scope.$emit('modalMessage', $filter('tr')('failed_to_delete_project'));
|
||||
if(status === 412) {
|
||||
$scope.$emit('modalMessage', $filter('tr')('failed_to_delete_project_contains_repo'));
|
||||
}
|
||||
if(status === 403) {
|
||||
$scope.$emit('modalMessage', $filter('tr')('failed_to_delete_project_insuffient_permissions'));
|
||||
}
|
||||
$scope.$emit('raiseError', true);
|
||||
console.log('Failed to delete project.');
|
||||
}
|
||||
|
@ -149,7 +149,8 @@ var locale_messages = {
|
||||
'failed_to_add_member': 'Project member can not be added, insuffient permissions.',
|
||||
'failed_to_change_member': 'Project member can not be changed, insuffient permissions.',
|
||||
'failed_to_delete_member': 'Project member can not be deleted, insuffient permissions.',
|
||||
'failed_to_delete_project': 'Project can not be deleted, insuffient permissions.',
|
||||
'failed_to_delete_project_contains_repo': 'Project contains repositories, can not be deleted.',
|
||||
'failed_to_delete_project_insuffient_permissions': 'Project can not be deleted, insuffient permissions.',
|
||||
'confirm_delete_project_title': 'Project Deletion',
|
||||
'confirm_delete_project': 'Are you sure to delete the project "$0" ?',
|
||||
'confirm_delete_user_title': 'User Deletion',
|
||||
|
@ -148,7 +148,8 @@ var locale_messages = {
|
||||
'failed_to_add_member': '无法添加项目成员,权限不足。',
|
||||
'failed_to_change_member': '无法修改项目成员,权限不足。',
|
||||
'failed_to_delete_member': '无法删除项目成员,权限不足。',
|
||||
'failed_to_delete_project' : '无法删除项目,权限不足。',
|
||||
'failed_to_delete_project_contains_repo': '项目包含镜像仓库,无法删除。',
|
||||
'failed_to_delete_project_insuffient_permissions': '无法删除项目,权限不足。',
|
||||
'confirm_delete_project_title': '删除项目',
|
||||
'confirm_delete_project': '确认删除项目 "$0" ?',
|
||||
'confirm_delete_user_title': '删除用户',
|
||||
|
Loading…
Reference in New Issue
Block a user