update help message for bandwidth of replication rule (#20016)

Signed-off-by: xuelichao <xuel@vmware.com>
Co-authored-by: Wang Yan <wangyan@vmware.com>
Co-authored-by: Shengwen YU <yshengwen@vmware.com>
This commit is contained in:
Lichao Xue 2024-02-26 16:57:24 +08:00 committed by GitHub
parent 2b6608fb52
commit 47546a5f9d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 25 additions and 9 deletions

View File

@ -736,7 +736,9 @@
clrSize="lg"
*clrIfOpen>
<span>{{
'REPLICATION.BANDWIDTH_TOOLTIP' | translate
'REPLICATION.BANDWIDTH_TOOLTIP'
| translate
: { max_job_workers: maxJobWorkers }
}}</span>
</clr-tooltip-content>
</clr-tooltip>

View File

@ -41,6 +41,7 @@ import { ErrorHandler } from '../../../../../shared/units/error-handler';
import { TranslateService } from '@ngx-translate/core';
import { cronRegex } from '../../../../../shared/units/utils';
import { FilterType } from '../../../../../shared/entities/shared.const';
import { JobserviceService } from 'ng-swagger-gen/services';
import { RegistryService } from '../../../../../../../ng-swagger-gen/services/registry.service';
import { Registry } from '../../../../../../../ng-swagger-gen/models/registry';
import { Label } from '../../../../../../../ng-swagger-gen/models/label';
@ -80,6 +81,7 @@ export class CreateEditRuleComponent implements OnInit, OnDestroy {
headerTitle = 'REPLICATION.ADD_POLICY';
createEditRuleOpened: boolean;
maxJobWorkers = 10;
inProgress = false;
onGoing = false;
inNameChecking = false;
@ -125,6 +127,7 @@ export class CreateEditRuleComponent implements OnInit, OnDestroy {
private endpointService: RegistryService,
private errorHandler: ErrorHandler,
private translateService: TranslateService,
private jobServiceService: JobserviceService,
private labelService: LabelService
) {
this.createForm();
@ -238,6 +241,7 @@ export class CreateEditRuleComponent implements OnInit, OnDestroy {
}
}
});
this.initMaxJobWorkers();
}
trimText(event) {
if (event.target.value) {
@ -906,4 +910,14 @@ export class CreateEditRuleComponent implements OnInit, OnDestroy {
}
return false;
}
initMaxJobWorkers() {
this.jobServiceService.getWorkerPools().subscribe({
next: pools => {
if ((pools ?? []).length > 0) {
this.maxJobWorkers = pools[0].concurrency;
}
},
});
}
}

View File

@ -699,7 +699,7 @@
"FLATTEN_LEVEL_TIP_3": "'Reduzierung um 3 Ebenen': 'a/b/c/d/img' -> 'ns/d/img'",
"BANDWIDTH": "Bandbreite",
"BANDWIDTH_ERROR_TIP": "Bitte -1 oder einen Integer-Wert größer als 0 eingeben",
"BANDWIDTH_TOOLTIP": "Legt die maximale Netzwerkbandbreite für jede Ausführung fest. Bitte auf die Anzahl der parallelen Ausführungen achten. Für umbegrenzte Bandbreite, bitte -1 eingeben",
"BANDWIDTH_TOOLTIP": "Set the maximum network bandwidth for each replication worker. Please pay attention to the number of concurrent executions (max. {{max_job_workers}}). For unlimited bandwidth, please enter -1.",
"UNLIMITED": "Unbegrenzt",
"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": "The 1st field of the cron string must be 0 and the 2nd filed can not be \"*\"",

View File

@ -700,7 +700,7 @@
"FLATTEN_LEVEL_TIP_3": "'Flatten 3 Levels': 'a/b/c/d/img' -> 'ns/d/img'",
"BANDWIDTH": "Bandwidth",
"BANDWIDTH_ERROR_TIP": "Please enter -1 or an integer greater than 0",
"BANDWIDTH_TOOLTIP": "Set the maximum network bandwidth for each execution. Please pay attention to the number of concurrent executions. For unlimited bandwidth, please enter -1",
"BANDWIDTH_TOOLTIP": "Set the maximum network bandwidth for each replication worker. Please pay attention to the number of concurrent executions (max. {{max_job_workers}}). For unlimited bandwidth, please enter -1.",
"UNLIMITED": "Unlimited",
"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": "The 1st field of the cron string must be 0 and the 2nd filed can not be \"*\"",

View File

@ -700,7 +700,7 @@
"FLATTEN_LEVEL_TIP_3": "'Flatten 3 Levels': 'a/b/c/d/img' -> 'ns/d/img'",
"BANDWIDTH": "Bandwidth",
"BANDWIDTH_ERROR_TIP": "Please enter -1 or an integer greater than 0",
"BANDWIDTH_TOOLTIP": "Set the maximum network bandwidth for each execution. Please pay attention to the number of concurrent executions. For unlimited bandwidth, please enter -1",
"BANDWIDTH_TOOLTIP": "Set the maximum network bandwidth for each replication worker. Please pay attention to the number of concurrent executions (max. {{max_job_workers}}). For unlimited bandwidth, please enter -1.",
"UNLIMITED": "Unlimited",
"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": "The 1st field of the cron string must be 0 and the 2nd filed can not be \"*\"",

View File

@ -699,7 +699,7 @@
"FLATTEN_LEVEL_TIP_3": "'Aplanissement sur 3 niveaux' : 'a/b/c/d/img' -> 'ns/d/img'",
"BANDWIDTH": "Bande passante",
"BANDWIDTH_ERROR_TIP": "Veuillez saisir -1 ou un nombre entier supérieur à 0",
"BANDWIDTH_TOOLTIP": "Définissez la bande passante réseau maximale pour chaque exécution. Veuillez faire attention au nombre d'exécutions simultanées. Pour une bande passante illimitée, veuillez entrer -1",
"BANDWIDTH_TOOLTIP": "Set the maximum network bandwidth for each replication worker. Please pay attention to the number of concurrent executions (max. {{max_job_workers}}). For unlimited bandwidth, please enter -1.",
"UNLIMITED": "Illimitée",
"UNREACHABLE_SOURCE_REGISTRY": "Échec de connexion au registre source. Veuillez vérifier que le registre source est disponible avant d'éditer cette règle: {{error}}",
"CRON_ERROR_TIP": "The 1st field of the cron string must be 0 and the 2nd filed can not be \"*\"",

View File

@ -698,7 +698,7 @@
"FLATTEN_LEVEL_TIP_3": "'Nivelar 3 posições': 'a/b/c/d/img' -> 'ns/d/img'",
"BANDWIDTH": "Banda",
"BANDWIDTH_ERROR_TIP": "Informe um número inteiro maior que 0 (zero) ou -1",
"BANDWIDTH_TOOLTIP": "Informe o limite de banda para cada execução. Tome cuidado e observe a relação com o número de execuções simultâneas. Para remover qualquer limite, informe -1",
"BANDWIDTH_TOOLTIP": "Set the maximum network bandwidth for each replication worker. Please pay attention to the number of concurrent executions (max. {{max_job_workers}}). For unlimited bandwidth, please enter -1.",
"UNLIMITED": "Ilimitado",
"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": "The 1st field of the cron string must be 0 and the 2nd filed can not be \"*\"",

View File

@ -699,7 +699,7 @@
"FLATTEN_LEVEL_TIP_3": "'Flatten 3 Levels': 'a/b/c/d/img' -> 'ns/d/img'",
"BANDWIDTH": "Bandwidth",
"BANDWIDTH_ERROR_TIP": "Please enter -1 or an integer greater than 0",
"BANDWIDTH_TOOLTIP": "Set the maximum network bandwidth for each execution. Please pay attention to the number of concurrent executions. For unlimited bandwidth, please enter -1",
"BANDWIDTH_TOOLTIP": "Set the maximum network bandwidth for each replication worker. Please pay attention to the number of concurrent executions (max. {{max_job_workers}}). For unlimited bandwidth, please enter -1.",
"UNLIMITED": "Unlimited",
"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": "The 1st field of the cron string must be 0 and the 2nd filed can not be \"*\"",

View File

@ -698,7 +698,7 @@
"FLATTEN_LEVEL_TIP_3": "'替换3级': 'a/b/c/d/img' -> 'ns/d/img'",
"BANDWIDTH": "带宽",
"BANDWIDTH_ERROR_TIP": "请输入-1或者大于0的整数",
"BANDWIDTH_TOOLTIP": "设置执行该条同步规则时的最大网络带宽。实际总带宽需要考虑并发执行的情况。如无需限制,请输入-1",
"BANDWIDTH_TOOLTIP": "Set the maximum network bandwidth for each replication worker. Please pay attention to the number of concurrent executions (max. {{max_job_workers}}). For unlimited bandwidth, please enter -1.",
"UNLIMITED": "无限制",
"UNREACHABLE_SOURCE_REGISTRY": "连接源仓库失败,在编辑此规则前请先确保源仓库可用: {{error}}",
"CRON_ERROR_TIP": "Cron 字符串的第一项必须为0且第二项不能为\"*\"",

View File

@ -698,7 +698,7 @@
"FLATTEN_LEVEL_TIP_3": "'平整化 3 等級': 'a/b/c/d/img' -> 'ns/d/img'",
"BANDWIDTH": "頻寬",
"BANDWIDTH_ERROR_TIP": "請輸入 -1 或大於 0 的整數",
"BANDWIDTH_TOOLTIP": "設定每個執行的最大網路頻寬。請注意並發執行的數量。若要無限制頻寬,請輸入 -1",
"BANDWIDTH_TOOLTIP": "Set the maximum network bandwidth for each replication worker. Please pay attention to the number of concurrent executions (max. {{max_job_workers}}). For unlimited bandwidth, please enter -1.",
"UNLIMITED": "無限制",
"UNREACHABLE_SOURCE_REGISTRY": "無法連線到來源 Registry請在編輯此規則之前確保來源 Registry 可用: {{error}}",
"CRON_ERROR_TIP": "cron 字串的第一個欄位必須是 0第二個欄位不能是 \"*\"",