From 86e34c8e59ef8c2bbfd1fc813410c2d3b2fbdf18 Mon Sep 17 00:00:00 2001 From: Shijun Sun <30999793+AllForNothing@users.noreply.github.com> Date: Fri, 9 Dec 2022 15:03:30 +0800 Subject: [PATCH] Fix some UI issues (#17964) 1.Fixes #17874 2.Correct some i18n items Signed-off-by: AllForNothing Signed-off-by: AllForNothing --- ...b-service-dashboard-shared-data.service.ts | 3 +++ .../pending-job-card.component.scss | 4 ++-- .../schedule-card.component.scss | 4 ++-- .../replication/replication.component.ts | 22 +++++++++---------- src/portal/src/i18n/lang/de-de-lang.json | 3 ++- src/portal/src/i18n/lang/en-us-lang.json | 3 ++- src/portal/src/i18n/lang/es-es-lang.json | 3 ++- src/portal/src/i18n/lang/fr-fr-lang.json | 3 ++- src/portal/src/i18n/lang/pt-br-lang.json | 3 ++- src/portal/src/i18n/lang/tr-tr-lang.json | 3 ++- src/portal/src/i18n/lang/zh-cn-lang.json | 4 +++- src/portal/src/i18n/lang/zh-tw-lang.json | 3 ++- 12 files changed, 35 insertions(+), 23 deletions(-) diff --git a/src/portal/src/app/base/left-side-nav/job-service-dashboard/job-service-dashboard-shared-data.service.ts b/src/portal/src/app/base/left-side-nav/job-service-dashboard/job-service-dashboard-shared-data.service.ts index da8ade60b..97473f065 100644 --- a/src/portal/src/app/base/left-side-nav/job-service-dashboard/job-service-dashboard-shared-data.service.ts +++ b/src/portal/src/app/base/left-side-nav/job-service-dashboard/job-service-dashboard-shared-data.service.ts @@ -58,6 +58,9 @@ export class JobServiceDashboardSharedDataService { if (!item.count) { item.count = 0; } + if (!item.latency) { + item.latency = 0; + } }); return this._jobQueues; }) diff --git a/src/portal/src/app/base/left-side-nav/job-service-dashboard/pending-job-card/pending-job-card.component.scss b/src/portal/src/app/base/left-side-nav/job-service-dashboard/pending-job-card/pending-job-card.component.scss index 8a8a8e6ed..766f2454f 100644 --- a/src/portal/src/app/base/left-side-nav/job-service-dashboard/pending-job-card/pending-job-card.component.scss +++ b/src/portal/src/app/base/left-side-nav/job-service-dashboard/pending-job-card/pending-job-card.component.scss @@ -3,8 +3,8 @@ text-align: center; font-size: 50px; margin: 1rem 0; - line-height: 2rem; - height: 2rem; + line-height: 50px; + height: 50px; } .card-block { diff --git a/src/portal/src/app/base/left-side-nav/job-service-dashboard/schedule-card/schedule-card.component.scss b/src/portal/src/app/base/left-side-nav/job-service-dashboard/schedule-card/schedule-card.component.scss index 578ff55bb..e24b70f2a 100644 --- a/src/portal/src/app/base/left-side-nav/job-service-dashboard/schedule-card/schedule-card.component.scss +++ b/src/portal/src/app/base/left-side-nav/job-service-dashboard/schedule-card/schedule-card.component.scss @@ -3,8 +3,8 @@ text-align: center; font-size: 50px; margin: 1rem 0; - line-height: 2rem; - height: 2rem; + line-height: 50px; + height: 50px; } .card-block { diff --git a/src/portal/src/app/base/left-side-nav/replication/replication/replication.component.ts b/src/portal/src/app/base/left-side-nav/replication/replication/replication.component.ts index 8b15f6d40..bb9228b18 100644 --- a/src/portal/src/app/base/left-side-nav/replication/replication/replication.component.ts +++ b/src/portal/src/app/base/left-side-nav/replication/replication/replication.component.ts @@ -515,12 +515,16 @@ export class ReplicationComponent implements OnInit, OnDestroy { this.isStopOnGoing = false; }) ) - .subscribe( - () => {}, - error => { - this.errorHandlerEntity.error(error); - } - ); + .subscribe({ + next: res => { + this.errorHandlerEntity.info( + 'REPLICATION.TRIGGER_STOP_SUCCESS' + ); + }, + error: err => { + this.errorHandlerEntity.error(err); + }, + }); } } @@ -538,11 +542,7 @@ export class ReplicationComponent implements OnInit, OnDestroy { }) .pipe( map(response => { - this.translateService - .get('BATCH.STOP_SUCCESS') - .subscribe(res => - operateChanges(operMessage, OperationState.success) - ); + operateChanges(operMessage, OperationState.success); }), catchError(error => { const message = errorHandler(error); diff --git a/src/portal/src/i18n/lang/de-de-lang.json b/src/portal/src/i18n/lang/de-de-lang.json index 2314cde1b..bd77e3376 100644 --- a/src/portal/src/i18n/lang/de-de-lang.json +++ b/src/portal/src/i18n/lang/de-de-lang.json @@ -659,7 +659,8 @@ "UNREACHABLE_SOURCE_REGISTRY": "Verbindung zur Quell-Registry fehlgeschlagen, bitte sicherstellen, dass die Quell-Registry verfügbar ist, bevor diese Regel angepasst wird: {{error}}", "CRON_ERROR_TIP": "Das Feld ist erforderlich und \"*\" ist im \"Minuten\" Feld nicht erlaubt", "COPY_BY_CHUNK": "Copy by chunk", - "COPY_BY_CHUNK_TIP": "Specify whether to copy the blob by chunk. Transfer by chunk may increase the number of API requests." + "COPY_BY_CHUNK_TIP": "Specify whether to copy the blob by chunk. Transfer by chunk may increase the number of API requests.", + "TRIGGER_STOP_SUCCESS": "Triggered stopping execution successfully" }, "DESTINATION": { "NEW_ENDPOINT": "Neuer Endpunkt", diff --git a/src/portal/src/i18n/lang/en-us-lang.json b/src/portal/src/i18n/lang/en-us-lang.json index 4dcea5163..914b8e4e7 100644 --- a/src/portal/src/i18n/lang/en-us-lang.json +++ b/src/portal/src/i18n/lang/en-us-lang.json @@ -659,7 +659,8 @@ "UNREACHABLE_SOURCE_REGISTRY": "Failed to connect to the source registry, please make sure the source registry is available before editing this rule: {{error}}", "CRON_ERROR_TIP": "Field is required and \"*\" is not allowed for the \"Minutes\" field", "COPY_BY_CHUNK": "Copy by chunk", - "COPY_BY_CHUNK_TIP": "Specify whether to copy the blob by chunk. Transfer by chunk may increase the number of API requests." + "COPY_BY_CHUNK_TIP": "Specify whether to copy the blob by chunk. Transfer by chunk may increase the number of API requests.", + "TRIGGER_STOP_SUCCESS": "Triggered stopping execution successfully" }, "DESTINATION": { "NEW_ENDPOINT": "New Endpoint", diff --git a/src/portal/src/i18n/lang/es-es-lang.json b/src/portal/src/i18n/lang/es-es-lang.json index 45f76d039..14d6108d4 100644 --- a/src/portal/src/i18n/lang/es-es-lang.json +++ b/src/portal/src/i18n/lang/es-es-lang.json @@ -661,7 +661,8 @@ "UNREACHABLE_SOURCE_REGISTRY": "Failed to connect to the source registry, please make sure the source registry is available before editing this rule: {{error}}", "CRON_ERROR_TIP": "Field is required and \"*\" is not allowed for the \"Minutes\" field", "COPY_BY_CHUNK": "Copy by chunk", - "COPY_BY_CHUNK_TIP": "Specify whether to copy the blob by chunk. Transfer by chunk may increase the number of API requests." + "COPY_BY_CHUNK_TIP": "Specify whether to copy the blob by chunk. Transfer by chunk may increase the number of API requests.", + "TRIGGER_STOP_SUCCESS": "Triggered stopping execution successfully" }, "DESTINATION": { "NEW_ENDPOINT": "Nuevo Endpoint", diff --git a/src/portal/src/i18n/lang/fr-fr-lang.json b/src/portal/src/i18n/lang/fr-fr-lang.json index d85c18014..0d964b3ca 100644 --- a/src/portal/src/i18n/lang/fr-fr-lang.json +++ b/src/portal/src/i18n/lang/fr-fr-lang.json @@ -649,7 +649,8 @@ "UNREACHABLE_SOURCE_REGISTRY": "Failed to connect to the source registry, please make sure the source registry is available before editing this rule: {{error}}", "CRON_ERROR_TIP": "Field is required and \"*\" is not allowed for the \"Minutes\" field", "COPY_BY_CHUNK": "Copy by chunk", - "COPY_BY_CHUNK_TIP": "Specify whether to copy the blob by chunk. Transfer by chunk may increase the number of API requests." + "COPY_BY_CHUNK_TIP": "Specify whether to copy the blob by chunk. Transfer by chunk may increase the number of API requests.", + "TRIGGER_STOP_SUCCESS": "Triggered stopping execution successfully" }, "DESTINATION": { "NEW_ENDPOINT": "Nouveau Endpoint", diff --git a/src/portal/src/i18n/lang/pt-br-lang.json b/src/portal/src/i18n/lang/pt-br-lang.json index e24f932e1..f79a26eba 100644 --- a/src/portal/src/i18n/lang/pt-br-lang.json +++ b/src/portal/src/i18n/lang/pt-br-lang.json @@ -659,7 +659,8 @@ "UNREACHABLE_SOURCE_REGISTRY": "Failed to connect to the source registry, please make sure the source registry is available before editing this rule: {{error}}", "CRON_ERROR_TIP": "Field is required and \"*\"is not allowed for the \"Minutes\" field", "COPY_BY_CHUNK": "Copy by chunk", - "COPY_BY_CHUNK_TIP": "Specify whether to copy the blob by chunk. Transfer by chunk may increase the number of API requests." + "COPY_BY_CHUNK_TIP": "Specify whether to copy the blob by chunk. Transfer by chunk may increase the number of API requests.", + "TRIGGER_STOP_SUCCESS": "Triggered stopping execution successfully" }, "DESTINATION": { "NEW_ENDPOINT": "Novo Endereço", diff --git a/src/portal/src/i18n/lang/tr-tr-lang.json b/src/portal/src/i18n/lang/tr-tr-lang.json index 890bf8267..e0cea456f 100644 --- a/src/portal/src/i18n/lang/tr-tr-lang.json +++ b/src/portal/src/i18n/lang/tr-tr-lang.json @@ -659,7 +659,8 @@ "UNREACHABLE_SOURCE_REGISTRY": "Failed to connect to the source registry, please make sure the source registry is available before editing this rule: {{error}}", "CRON_ERROR_TIP": "Field is required and \"*\" is not allowed for the \"Minutes\" field", "COPY_BY_CHUNK": "Copy by chunk", - "COPY_BY_CHUNK_TIP": "Specify whether to copy the blob by chunk. Transfer by chunk may increase the number of API requests." + "COPY_BY_CHUNK_TIP": "Specify whether to copy the blob by chunk. Transfer by chunk may increase the number of API requests.", + "TRIGGER_STOP_SUCCESS": "Triggered stopping execution successfully" }, "DESTINATION": { "NEW_ENDPOINT": "Yeni Uç Nokta", diff --git a/src/portal/src/i18n/lang/zh-cn-lang.json b/src/portal/src/i18n/lang/zh-cn-lang.json index 10ec71713..dfde1af14 100644 --- a/src/portal/src/i18n/lang/zh-cn-lang.json +++ b/src/portal/src/i18n/lang/zh-cn-lang.json @@ -661,7 +661,8 @@ "UNREACHABLE_SOURCE_REGISTRY": "连接源仓库失败,在编辑此规则前请先确保源仓库可用: {{error}}", "CRON_ERROR_TIP": "此项必填且\"分钟\"项不能为\"*\"", "COPY_BY_CHUNK": "分块复制", - "COPY_BY_CHUNK_TIP": "请指定是否开启分块复制。开启此项可能导致相应的 API 请求数量增加。" + "COPY_BY_CHUNK_TIP": "请指定是否开启分块复制。开启此项可能导致相应的 API 请求数量增加。", + "TRIGGER_STOP_SUCCESS": "成功触发停止执行" }, "DESTINATION": { "NEW_ENDPOINT": "新建目标", @@ -1198,6 +1199,7 @@ "ALL": "所有", "RUNNING": "进行中", "FAILED": "失败", + "STOP_EXECUTIONS": "停止执行", "DELETE_PROJECT": "删除项目", "DELETE_REPO": "删除仓库", "DELETE_TAG": "删除镜像Tag", diff --git a/src/portal/src/i18n/lang/zh-tw-lang.json b/src/portal/src/i18n/lang/zh-tw-lang.json index 6502d9e1e..d05ecb71f 100644 --- a/src/portal/src/i18n/lang/zh-tw-lang.json +++ b/src/portal/src/i18n/lang/zh-tw-lang.json @@ -656,7 +656,8 @@ "UNREACHABLE_SOURCE_REGISTRY": "Failed to connect to the source registry, please make sure the source registry is available before editing this rule: {{error}}", "CRON_ERROR_TIP": "Field is required and \"*\" is not allowed for the \"Minutes\" field", "COPY_BY_CHUNK": "Copy by chunk", - "COPY_BY_CHUNK_TIP": "Specify whether to copy the blob by chunk. Transfer by chunk may increase the number of API requests." + "COPY_BY_CHUNK_TIP": "Specify whether to copy the blob by chunk. Transfer by chunk may increase the number of API requests.", + "TRIGGER_STOP_SUCCESS": "Triggered stopping execution successfully" }, "DESTINATION":{ "NEW_ENDPOINT": "新建目標",