diff --git a/static/resources/js/components/replication/list-replication.directive.js b/static/resources/js/components/replication/list-replication.directive.js
index 0b38dfe2e..e8dbd8c9c 100644
--- a/static/resources/js/components/replication/list-replication.directive.js
+++ b/static/resources/js/components/replication/list-replication.directive.js
@@ -15,6 +15,7 @@
{'key': 'pending', 'value': $filter('tr')('pending')},
{'key': 'running', 'value': $filter('tr')('running')},
{'key': 'error' , 'value': $filter('tr')('error')},
+ {'key': 'retrying', 'value': $filter('tr')('retrying')},
{'key': 'stopped', 'value': $filter('tr')('stopped')},
{'key': 'finished', 'value':$filter('tr')('finished')},
{'key': 'canceled', 'value': $filter('tr')('canceled')}
@@ -28,7 +29,7 @@
var vm = this;
vm.sectionHeight = {'min-height': '1200px'};
-
+
$scope.$on('$locationChangeSuccess', function() {
vm.projectId = getParameterByName('project_id', $location.absUrl());
vm.retrievePolicy();
@@ -59,7 +60,7 @@
vm.searchJobTIP = false;
vm.refreshJobTIP = false;
-
+
function searchReplicationPolicy() {
vm.retrievePolicy();
}
@@ -102,9 +103,17 @@
function listReplicationJobSuccess(data, status) {
vm.replicationJobs = data || [];
+ var alertInfo = {
+ 'show': false,
+ 'message': ''
+ };
angular.forEach(vm.replicationJobs, function(item) {
for(var key in item) {
- var value = item[key]
+ var value = item[key];
+ if(key === 'status' && (value === 'error' || value === 'retrying')) {
+ alertInfo.show = true;
+ alertInfo.message = $filter('tr')('alert_job_contains_error');
+ }
switch(key) {
case 'operation':
case 'status':
@@ -114,6 +123,8 @@
}
}
});
+
+ $scope.$emit('raiseAlert', alertInfo);
vm.searchJobTIP = false;
vm.refreshJobTIP = false;
}
diff --git a/static/resources/js/components/repository/list-repository.directive.js b/static/resources/js/components/repository/list-repository.directive.js
index 2bd1aca68..2abd5dcb5 100644
--- a/static/resources/js/components/repository/list-repository.directive.js
+++ b/static/resources/js/components/repository/list-repository.directive.js
@@ -17,7 +17,7 @@
vm.filterInput = '';
vm.toggleInProgress = [];
-
+
var hashValue = $location.hash();
if(hashValue) {
var slashIndex = hashValue.indexOf('/');
diff --git a/static/resources/js/components/system-management/create-destination.directive.js b/static/resources/js/components/system-management/create-destination.directive.js
index d185f3810..e9ca2f635 100644
--- a/static/resources/js/components/system-management/create-destination.directive.js
+++ b/static/resources/js/components/system-management/create-destination.directive.js
@@ -184,6 +184,7 @@
ctrl.pingAvailable = true;
ctrl.pingMessage = '';
+ ctrl.pingTIP = false;
ctrl.toggleErrorMessage = false;
ctrl.errorMessages = [];
diff --git a/static/resources/js/harbor.module.js b/static/resources/js/harbor.module.js
index 3b7e85adc..d92272c75 100644
--- a/static/resources/js/harbor.module.js
+++ b/static/resources/js/harbor.module.js
@@ -45,6 +45,7 @@
'harbor.replication',
'harbor.system.management',
'harbor.loading.progress',
- 'harbor.inline.help'
+ 'harbor.inline.help',
+ 'harbor.dismissable.alerts'
]);
})();
\ No newline at end of file
diff --git a/static/resources/js/layout/details/details.controller.js b/static/resources/js/layout/details/details.controller.js
index 974ae16e3..c2d6c03c8 100644
--- a/static/resources/js/layout/details/details.controller.js
+++ b/static/resources/js/layout/details/details.controller.js
@@ -15,7 +15,6 @@
vm.isProjectMember = false;
vm.togglePublicity = togglePublicity;
- vm.target = 'repositories';
vm.sectionDefaultHeight = {'min-height': '579px'};
@@ -55,7 +54,7 @@
}
});
- function togglePublicity(e) {
+ function togglePublicity(e) {
vm.publicity = e.publicity;
}
}
diff --git a/static/resources/js/services/i18n/locale_messages_en-US.js b/static/resources/js/services/i18n/locale_messages_en-US.js
index b14060f44..efed44a9e 100644
--- a/static/resources/js/services/i18n/locale_messages_en-US.js
+++ b/static/resources/js/services/i18n/locale_messages_en-US.js
@@ -153,7 +153,9 @@ var locale_messages = {
'status': 'Status',
'logs' : 'Logs',
'enabled': 'Enabled',
+ 'enable': 'Enable',
'disabled': 'Disabled',
+ 'disable': 'Disable',
'no_replication_policies_add_new': 'No replication policies, add new replication policy.',
'no_replication_policies': 'No replication policies.',
'no_replication_jobs': 'No replication jobs.',
@@ -205,6 +207,7 @@ var locale_messages = {
'finished': 'Finished',
'canceled': 'Canceled',
'stopped': 'Stopped',
+ 'retrying': 'Retrying',
'error': 'Error',
'failed_to_get_project_member': 'Failed to get current project member.',
'failed_to_delete_repo': 'Failed to delete repository. ',
@@ -243,6 +246,7 @@ var locale_messages = {
'Developer: Developer has read and write privileges for a project. ' +
'Guest: Guest has read-only privilege for a specified project.',
'inline_help_publicity_title': 'Publicity of Project',
- 'inline_help_publicity': 'Setting the project as public.'
-
+ 'inline_help_publicity': 'Setting the project as public.',
+ 'alert_job_contains_error': 'There contain errors in current replication jobs results, please look into it.',
+ 'caution': 'Caution'
};
\ No newline at end of file
diff --git a/static/resources/js/services/i18n/locale_messages_zh-CN.js b/static/resources/js/services/i18n/locale_messages_zh-CN.js
index 3d34db42a..57872fbc2 100644
--- a/static/resources/js/services/i18n/locale_messages_zh-CN.js
+++ b/static/resources/js/services/i18n/locale_messages_zh-CN.js
@@ -150,8 +150,10 @@ var locale_messages = {
'actions': '操作',
'status': '状态',
'logs': '日志',
- 'enabled': '启用',
- 'disabled': '停用',
+ 'enabled': '已启用',
+ 'enable': '启用',
+ 'disabled': '已停用',
+ 'disable': '停用',
'no_replication_policies_add_new': '没有复制策略,请新增复制策略。',
'no_replication_policies': '没有复制策略。',
'no_replications': '没有复制策略。',
@@ -160,7 +162,6 @@ var locale_messages = {
'name_is_required': '名称为必填项',
'name_is_too_long': '名称长度超出限制。(最长为20个字符)',
'description_is_too_long': '描述内容长度超出限制。(最长为20个字符)',
- 'enable': '启用',
'general_setting': '一般设置',
'destination_setting': '目标设置',
'endpoint': '终端URL',
@@ -199,12 +200,13 @@ var locale_messages = {
'edit': '修改',
'delete': '删除',
'all': '全部',
- 'transfer': '传输',
- 'pending': '等待',
+ 'transfer': '复制',
+ 'pending': '等待中',
'running': '进行中',
'finished': '已完成',
- 'canceled': '取消',
- 'stopped': '停止',
+ 'canceled': '已取消',
+ 'stopped': '已终止',
+ 'retrying': '重试中',
'error': '错误',
'failed_to_get_project_member': '无法获取当前项目成员。',
'failed_to_delete_repo': '无法删除镜像仓库。',
@@ -243,5 +245,7 @@ var locale_messages = {
'开发人员: “开发人员” 拥有一个项目的读/写权限。 ' +
'来宾用户: “来宾用户”拥有特定项目的只读权限。',
'inline_help_publicity_title': '公开项目',
- 'inline_help_publicity': '设置该项目为公开。'
+ 'inline_help_publicity': '设置该项目为公开。',
+ 'alert_job_contains_error': '当前复制任务中包含错误,请检查。',
+ 'caution': '注意'
};
\ No newline at end of file
diff --git a/views/repository.htm b/views/repository.htm
index 7496d97e8..7aaa0291e 100644
--- a/views/repository.htm
+++ b/views/repository.htm
@@ -2,7 +2,7 @@
-
+
// 'my_projects' | tr //
@@ -26,6 +26,7 @@
+
diff --git a/views/sections/header-include.htm b/views/sections/header-include.htm
index 5f83064bf..a78d61c1b 100644
--- a/views/sections/header-include.htm
+++ b/views/sections/header-include.htm
@@ -240,4 +240,7 @@
-
\ No newline at end of file
+
+
+
+
\ No newline at end of file