mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-23 10:45:45 +01:00
updates for toggling status of policies and publicity of projects i18n messages.
This commit is contained in:
parent
1dfae7aa5b
commit
9d3354ba53
@ -78,7 +78,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
function getProjectFailed() {
|
||||
function getProjectFailed(data) {
|
||||
$scope.$emit('modalTitle', $filter('tr')('error'));
|
||||
$scope.$emit('modalMessage', $filter('tr')('failed_to_get_project'));
|
||||
$scope.$emit('raiseError', true);
|
||||
|
@ -156,8 +156,17 @@
|
||||
|
||||
var status = $filter('tr')(vm.enabled === 1 ? 'enable':'disable');
|
||||
|
||||
$scope.$emit('modalTitle', $filter('tr')('confirm_to_toggle_policy_title'));
|
||||
$scope.$emit('modalMessage', $filter('tr')('confirm_to_toggle_policy', [name, status]));
|
||||
var title;
|
||||
var message;
|
||||
if(enabled === 1){
|
||||
title = $filter('tr')('confirm_to_toggle_enabled_policy_title');
|
||||
message = $filter('tr')('confirm_to_toggle_enabled_policy');
|
||||
}else{
|
||||
title = $filter('tr')('confirm_to_toggle_disabled_policy_title');
|
||||
message = $filter('tr')('confirm_to_toggle_disabled_policy');
|
||||
}
|
||||
$scope.$emit('modalTitle', title);
|
||||
$scope.$emit('modalMessage', message);
|
||||
|
||||
var emitInfo = {
|
||||
'contentType': 'text/html',
|
||||
|
@ -66,9 +66,9 @@
|
||||
|
||||
function listProjectFailed(data, status) {
|
||||
$scope.$emit('modalTitle', $filter('tr')('error'));
|
||||
$scope.$emit('modalMessage', $filter('tr')('failed_to_get_project') + data);
|
||||
$scope.$emit('modalMessage', $filter('tr')('failed_to_get_project'));
|
||||
$scope.$emit('raiseError', true);
|
||||
console.log('Failed to get Project:' + data);
|
||||
console.log('Failed to get Project.');
|
||||
}
|
||||
|
||||
$scope.$on('addedSuccess', function(e, val) {
|
||||
|
@ -245,10 +245,12 @@ var locale_messages = {
|
||||
'<strong>Developer</strong>: Developer has read and write privileges to the project.<br/>' +
|
||||
'<strong>Guest</strong>: Guest has read-only privilege for a specified project.',
|
||||
'inline_help_publicity_title': '<strong>Publicity of Project</strong>',
|
||||
'inline_help_publicity': 'Setting the project as public.',
|
||||
'inline_help_publicity': 'When a project is set to public, anyone will have read permission to the repositories under this project, and user will not need to run "docker login" before pulling images under this project.',
|
||||
'alert_job_contains_error': 'Found errors in the current replication jobs, please check.',
|
||||
'found_error_in_replication_job': 'Found $0 error(s).',
|
||||
'caution': 'Caution',
|
||||
'confirm_to_toggle_policy_title': 'Policy Toggle',
|
||||
'confirm_to_toggle_policy': 'Are you sure to toggle policy $0 to <strong>$1</strong> status?'
|
||||
'confirm_to_toggle_enabled_policy_title': 'Enable Policy',
|
||||
'confirm_to_toggle_enabled_policy': 'After enabling the policy, replication jobs will be triggered to replicate all repositories under the project to the destination of the policy. Please confirm to continue.',
|
||||
'confirm_to_toggle_disabled_policy_title': 'Disable Policy',
|
||||
'confirm_to_toggle_disabled_policy': 'After disabling the policy, running replication jobs of this policy will be canceled. Please confirm to continue.'
|
||||
};
|
||||
|
@ -245,10 +245,14 @@ var locale_messages = {
|
||||
'<strong>开发人员</strong>: “开发人员” 拥有一个项目的读/写权限。<br/>' +
|
||||
'<strong>访客</strong>: “访客”拥有特定项目的只读权限。',
|
||||
'inline_help_publicity_title': '<strong>公开项目</strong>',
|
||||
'inline_help_publicity': '设置该项目为公开。',
|
||||
'inline_help_publicity': '当项目设为公开后,任何人都有此项目下镜像的读权限。命令行用户不需要“docker login”就可以拉取此项目下的镜像。',
|
||||
'alert_job_contains_error': '当前复制任务中包含错误,请检查。',
|
||||
'found_error_in_replication_job': '发现 $0 个错误。',
|
||||
'caution': '注意',
|
||||
'confirm_to_toggle_policy_title': '切换复制策略状态',
|
||||
'confirm_to_toggle_policy': '确认将复制策略 $0 切换为 <strong>$1</strong> 状态吗?'
|
||||
'confirm_to_toggle_policy': '确认将复制策略 $0 切换为 <strong>$1</strong> 状态吗?',
|
||||
'confirm_to_toggle_enabled_policy_title': '启用策略',
|
||||
'confirm_to_toggle_enabled_policy': '启用策略后,系统将触发复制任务来同步项目下的所有镜像仓库到策略的目标实例。请确认继续。',
|
||||
'confirm_to_toggle_disabled_policy_title': '停用策略',
|
||||
'confirm_to_toggle_disabled_policy': '停用策略后,属于此策略的所有复制任务将终止。请确认继续。'
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user