mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-11 10:27:58 +01:00
Updates for handling errors of UI.
This commit is contained in:
parent
7ffd40ea57
commit
5cefe5c91f
@ -104,8 +104,14 @@
|
||||
}
|
||||
|
||||
function getRepositoryFailed(response) {
|
||||
var errorMessage = '';
|
||||
if(response.status === 404) {
|
||||
errorMessage = $filter('tr')('project_does_not_exist');
|
||||
}else{
|
||||
errorMessage = $filter('tr')('failed_to_get_project');
|
||||
}
|
||||
$scope.$emit('modalTitle', $filter('tr')('error'));
|
||||
$scope.$emit('modalMessage', $filter('tr')('project_does_not_exist'));
|
||||
$scope.$emit('modalMessage', errorMessage);
|
||||
var emitInfo = {
|
||||
'confirmOnly': true,
|
||||
'contentType': 'text/html',
|
||||
|
@ -233,6 +233,7 @@ var locale_messages = {
|
||||
'failed_to_get_project_member': 'Failed to get current project member.',
|
||||
'failed_to_delete_repo': 'Failed to delete repository. ',
|
||||
'failed_to_delete_repo_insuffient_permissions': 'Failed to delete repository, insuffient permissions.',
|
||||
'failed_to_get_repo': 'Failed to get repositories.',
|
||||
'failed_to_get_tag': 'Failed to get tag.',
|
||||
'failed_to_get_log': 'Failed to get logs.',
|
||||
'failed_to_get_project': 'Failed to get projects.',
|
||||
|
@ -233,6 +233,7 @@ var locale_messages = {
|
||||
'failed_to_get_project_member': '无法获取当前项目成员。',
|
||||
'failed_to_delete_repo': '无法删除镜像仓库。',
|
||||
'failed_to_delete_repo_insuffient_permissions': '无法删除镜像仓库,权限不足。',
|
||||
'failed_to_get_repo': '获取镜像仓库数据失败。',
|
||||
'failed_to_get_tag': '获取标签数据失败。',
|
||||
'failed_to_get_log': '获取日志数据失败。',
|
||||
'failed_to_get_project': '获取项目数据失败。',
|
||||
|
Loading…
Reference in New Issue
Block a user