diff --git a/src/portal/src/app/project/tag-retention/tag-retention.component.ts b/src/portal/src/app/project/tag-retention/tag-retention.component.ts
index a39ec13c6..9b8bd342d 100644
--- a/src/portal/src/app/project/tag-retention/tag-retention.component.ts
+++ b/src/portal/src/app/project/tag-retention/tag-retention.component.ts
@@ -342,6 +342,7 @@ export class TagRetentionComponent implements OnInit {
clickAdd(rule) {
this.loadingRule = true;
+ this.addRuleComponent.onGoing = true;
if (this.addRuleComponent.isAdd) {
let retention: Retention = clone(this.retention);
retention.rules.push(rule);
@@ -349,17 +350,23 @@ export class TagRetentionComponent implements OnInit {
this.tagRetentionService.createRetention(retention).subscribe(
response => {
this.refreshAfterCreatRetention();
+ this.addRuleComponent.close();
+ this.addRuleComponent.onGoing = false;
}, error => {
- this.errorHandler.error(error);
+ this.addRuleComponent.inlineAlert.showInlineError(error);
this.loadingRule = false;
+ this.addRuleComponent.onGoing = false;
});
} else {
this.tagRetentionService.updateRetention(this.retentionId, retention).subscribe(
response => {
this.getRetention();
+ this.addRuleComponent.close();
+ this.addRuleComponent.onGoing = false;
}, error => {
this.loadingRule = false;
- this.errorHandler.error(error);
+ this.addRuleComponent.onGoing = false;
+ this.addRuleComponent.inlineAlert.showInlineError(error);
});
}
} else {
@@ -368,9 +375,12 @@ export class TagRetentionComponent implements OnInit {
this.tagRetentionService.updateRetention(this.retentionId, retention).subscribe(
response => {
this.getRetention();
+ this.addRuleComponent.close();
+ this.addRuleComponent.onGoing = false;
}, error => {
- this.errorHandler.error(error);
+ this.addRuleComponent.inlineAlert.showInlineError(error);
this.loadingRule = false;
+ this.addRuleComponent.onGoing = false;
});
}
}
diff --git a/src/portal/src/i18n/lang/en-us-lang.json b/src/portal/src/i18n/lang/en-us-lang.json
index e7a751b16..632b9c0b0 100644
--- a/src/portal/src/i18n/lang/en-us-lang.json
+++ b/src/portal/src/i18n/lang/en-us-lang.json
@@ -1210,7 +1210,10 @@
"RULE_TEMPLATE_6": " the images pulled within the last # days",
"RULE_TEMPLATE_7": " the images pushed within the last # days",
"SCHEDULE": "Schedule",
- "SCHEDULE_WARNING": "Executing the retention policy can have adverse effects to the images in this project and affected image tags will be deleted."
+ "SCHEDULE_WARNING": "Executing the retention policy can have adverse effects to the images in this project and affected image tags will be deleted.",
+ "EXISTING_RULE": "Existing rule",
+ "ILLEGAL_RULE": "Illegal rule",
+ "INVALID_RULE": "Invalid rule"
}
}
diff --git a/src/portal/src/i18n/lang/es-es-lang.json b/src/portal/src/i18n/lang/es-es-lang.json
index 9104253f4..61f5fe553 100644
--- a/src/portal/src/i18n/lang/es-es-lang.json
+++ b/src/portal/src/i18n/lang/es-es-lang.json
@@ -1207,7 +1207,10 @@
"RULE_TEMPLATE_6": " the images pulled within the last # days",
"RULE_TEMPLATE_7": " the images pushed within the last # days",
"SCHEDULE": "Schedule",
- "SCHEDULE_WARNING": "Executing the retention policy can have adverse effects to the images in this project and affected image tags will be deleted."
+ "SCHEDULE_WARNING": "Executing the retention policy can have adverse effects to the images in this project and affected image tags will be deleted.",
+ "EXISTING_RULE": "Existing rule",
+ "ILLEGAL_RULE": "Illegal rule",
+ "INVALID_RULE": "Invalid rule"
}
}
diff --git a/src/portal/src/i18n/lang/fr-fr-lang.json b/src/portal/src/i18n/lang/fr-fr-lang.json
index a6dec954b..7bb75512d 100644
--- a/src/portal/src/i18n/lang/fr-fr-lang.json
+++ b/src/portal/src/i18n/lang/fr-fr-lang.json
@@ -1179,7 +1179,10 @@
"RULE_TEMPLATE_6": " the images pulled within the last # days",
"RULE_TEMPLATE_7": " the images pushed within the last # days",
"SCHEDULE": "Schedule",
- "SCHEDULE_WARNING": "Executing the retention policy can have adverse effects to the images in this project and affected image tags will be deleted."
+ "SCHEDULE_WARNING": "Executing the retention policy can have adverse effects to the images in this project and affected image tags will be deleted.",
+ "EXISTING_RULE": "Existing rule",
+ "ILLEGAL_RULE": "Illegal rule",
+ "INVALID_RULE": "Invalid rule"
}
}
diff --git a/src/portal/src/i18n/lang/pt-br-lang.json b/src/portal/src/i18n/lang/pt-br-lang.json
index c8bf14188..b2141062a 100644
--- a/src/portal/src/i18n/lang/pt-br-lang.json
+++ b/src/portal/src/i18n/lang/pt-br-lang.json
@@ -1204,7 +1204,10 @@
"RULE_TEMPLATE_6": " the images pulled within the last # days",
"RULE_TEMPLATE_7": " the images pushed within the last # days",
"SCHEDULE": "Schedule",
- "SCHEDULE_WARNING": "Executing the retention policy can have adverse effects to the images in this project and affected image tags will be deleted."
+ "SCHEDULE_WARNING": "Executing the retention policy can have adverse effects to the images in this project and affected image tags will be deleted.",
+ "EXISTING_RULE": "Existing rule",
+ "ILLEGAL_RULE": "Illegal rule",
+ "INVALID_RULE": "Invalid rule"
}
diff --git a/src/portal/src/i18n/lang/tr-tr-lang.json b/src/portal/src/i18n/lang/tr-tr-lang.json
index 65691ef8a..2be6d22af 100644
--- a/src/portal/src/i18n/lang/tr-tr-lang.json
+++ b/src/portal/src/i18n/lang/tr-tr-lang.json
@@ -1210,7 +1210,10 @@
"RULE_TEMPLATE_6": " imajlar son # gün içinde imdirilmiş",
"RULE_TEMPLATE_7": " imajlar son # gün içinde yüklendi.",
"SCHEDULE": "Program",
- "SCHEDULE_WARNING": "Tutma ilkesinin yürütülmesinin bu projedeki görüntüler üzerinde olumsuz etkileri olabilir ve etkilenen imajların etiketleri silinecektir."
+ "SCHEDULE_WARNING": "Tutma ilkesinin yürütülmesinin bu projedeki görüntüler üzerinde olumsuz etkileri olabilir ve etkilenen imajların etiketleri silinecektir.",
+ "EXISTING_RULE": "Existing rule",
+ "ILLEGAL_RULE": "Illegal rule",
+ "INVALID_RULE": "Invalid rule"
}
}
diff --git a/src/portal/src/i18n/lang/zh-cn-lang.json b/src/portal/src/i18n/lang/zh-cn-lang.json
index fc3ea978d..8ac3c8f77 100644
--- a/src/portal/src/i18n/lang/zh-cn-lang.json
+++ b/src/portal/src/i18n/lang/zh-cn-lang.json
@@ -804,7 +804,8 @@
"ROOT_CERT_DOWNLOAD": "下载镜像库根证书。",
"SCANNING_POLICY": "基于不同需求设置镜像扫描策略。‘无’:不设置任何策略;‘每日定时’:每天在设置的时间定时执行扫描。",
"VERIFY_CERT": "检查来自LDAP服务端的证书",
- "REPO_TOOLTIP": "用户在此模式下无法对镜像执行任何操作。",
+ "READONLY_TOOLTIP": "选中,表示正在维护状态,不可删除仓库及标签,也不可以推送镜像。",
+ "REPO_TOOLTIP": "用户在此模式下无法对图像执行任何操作。",
"WEBHOOK_TOOLTIP": "当执行推送,拉动,删除,扫描图像或图表等特定操作时,启用 webhooks 以在指定端点接收回调",
"HOURLY_CRON":"每小时运行一次。相当于 0 0 * * * *",
"WEEKLY_CRON":"每周一次,周六/周日午夜之间开始。相当于 0 0 * * * *",
@@ -1205,7 +1206,10 @@
"RULE_TEMPLATE_6": "最近#天被拉取过的镜像",
"RULE_TEMPLATE_7": "最近#天被推送过的镜像",
"SCHEDULE": "定时任务",
- "SCHEDULE_WARNING": "执行保留策略将对该项目中的镜像产生反向影响,受影响的镜像tags将会被删除。"
+ "SCHEDULE_WARNING": "执行保留策略将对该项目中的镜像产生反向影响,受影响的镜像tags将会被删除。",
+ "EXISTING_RULE": "规则已存在",
+ "ILLEGAL_RULE": "规则不合法",
+ "INVALID_RULE": "无效规则"
}
}