Skip to content

Commit

Permalink
Update cron ui for add replicatipn rule page (#19083)
Browse files Browse the repository at this point in the history
1.Fixes #19072

Signed-off-by: AllForNothing <[email protected]>
  • Loading branch information
AllForNothing authored Aug 3, 2023
1 parent 26b53ef commit d347752
Show file tree
Hide file tree
Showing 11 changed files with 62 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -596,11 +596,15 @@ <h3 class="modal-title">{{ headerTitle | translate }}</h3>
formGroupName="trigger_settings"
class="clr-form-control">
<div class="flex" [hidden]="isNotSchedule()">
<label for="targetCron" class="required"
>Cron String</label
<label
for="targetCron"
class="required sub-label"
>{{
'REPLICATION.CRON_STR' | translate
}}</label
>
<div
class="clr-control-container"
class="clr-control-container no-extend"
[class.clr-error]="
cronInputShouldShowError()
">
Expand All @@ -615,6 +619,19 @@ <h3 class="modal-title">{{ headerTitle | translate }}</h3>
pattern="^0\s(?!(\*\s)).+$"
class="form-control cron-input clr-input"
formControlName="cron" />
<clr-tooltip class="des-tooltip">
<clr-icon
clrTooltipTrigger
shape="info-circle"
size="24"></clr-icon>
<clr-tooltip-content
class="flatten"
clrPosition="top-left"
clrSize="lg"
*clrIfOpen>
<cron-tooltip></cron-tooltip>
</clr-tooltip-content>
</clr-tooltip>
</div>
<clr-control-error
*ngIf="cronInputShouldShowError()">
Expand All @@ -624,19 +641,6 @@ <h3 class="modal-title">{{ headerTitle | translate }}</h3>
}}
</clr-control-error>
</div>
<a
href="javascript:void(0)"
role="tooltip"
aria-haspopup="true"
class="tooltip tooltip-lg tooltip-top-left top-7 cron-tooltip">
<clr-icon
shape="info-circle"
class="info-tips-icon"
size="24"></clr-icon>
<div class="tooltip-content table-box">
<cron-tooltip></cron-tooltip>
</div>
</a>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,3 +343,11 @@ clr-modal {
.label-input {
padding-right: 1.2rem;
}

.no-extend {
flex: 1;
}

.cron-input {
width: 12rem;
}
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,16 @@ export class CreateEditRuleComponent implements OnInit, OnDestroy {
this.ruleForm?.get('trigger')?.get('trigger_settings')?.get('cron')
?.dirty
) {
if (
!this.ruleForm
?.get('trigger')
?.get('trigger_settings')
?.get('cron')
?.value?.startsWith(PREFIX)
) {
return true;
}

return (
this.ruleForm
?.get('trigger')
Expand Down
5 changes: 3 additions & 2 deletions src/portal/src/i18n/lang/de-de-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -660,10 +660,11 @@
"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",
"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": "Das Feld ist erforderlich und \"*\" ist im \"Minuten\" Feld nicht erlaubt",
"CRON_ERROR_TIP": "The 1st field of the cron string must be 0 and the 2nd filed can not be \"*\"",
"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.",
"TRIGGER_STOP_SUCCESS": "Triggered stopping execution successfully"
"TRIGGER_STOP_SUCCESS": "Triggered stopping execution successfully",
"CRON_STR": "Cron String"
},
"DESTINATION": {
"NEW_ENDPOINT": "Neuer Endpunkt",
Expand Down
5 changes: 3 additions & 2 deletions src/portal/src/i18n/lang/en-us-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -661,10 +661,11 @@
"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",
"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": "Field is required and \"*\" is not allowed for the \"Minutes\" field",
"CRON_ERROR_TIP": "The 1st field of the cron string must be 0 and the 2nd filed can not be \"*\"",
"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.",
"TRIGGER_STOP_SUCCESS": "Triggered stopping execution successfully"
"TRIGGER_STOP_SUCCESS": "Triggered stopping execution successfully",
"CRON_STR": "Cron String"
},
"DESTINATION": {
"NEW_ENDPOINT": "New Endpoint",
Expand Down
5 changes: 3 additions & 2 deletions src/portal/src/i18n/lang/es-es-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -661,10 +661,11 @@
"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",
"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": "Field is required and \"*\" is not allowed for the \"Minutes\" field",
"CRON_ERROR_TIP": "The 1st field of the cron string must be 0 and the 2nd filed can not be \"*\"",
"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.",
"TRIGGER_STOP_SUCCESS": "Triggered stopping execution successfully"
"TRIGGER_STOP_SUCCESS": "Triggered stopping execution successfully",
"CRON_STR": "Cron String"
},
"DESTINATION": {
"NEW_ENDPOINT": "Nuevo Endpoint",
Expand Down
5 changes: 3 additions & 2 deletions src/portal/src/i18n/lang/fr-fr-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -647,10 +647,11 @@
"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",
"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": "Ce champ est requis et \"*\" n'est pas autorisé pour le champ \"Minutes\"",
"CRON_ERROR_TIP": "The 1st field of the cron string must be 0 and the 2nd filed can not be \"*\"",
"COPY_BY_CHUNK": "Copier par morceaux",
"COPY_BY_CHUNK_TIP": "Specifie si le blob doit être copié par morceaux. Transférer par morceaux peut augmenter le nombre de requêtes faites à l'API.",
"TRIGGER_STOP_SUCCESS": "Déclenchement avec succès de l'arrêt d'exécution"
"TRIGGER_STOP_SUCCESS": "Déclenchement avec succès de l'arrêt d'exécution",
"CRON_STR": "Cron String"
},
"DESTINATION": {
"NEW_ENDPOINT": "Nouveau Endpoint",
Expand Down
5 changes: 3 additions & 2 deletions src/portal/src/i18n/lang/pt-br-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -659,10 +659,11 @@
"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",
"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": "Field is required and \"*\"is not allowed for the \"Minutes\" field",
"CRON_ERROR_TIP": "The 1st field of the cron string must be 0 and the 2nd filed can not be \"*\"",
"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.",
"TRIGGER_STOP_SUCCESS": "Triggered stopping execution successfully"
"TRIGGER_STOP_SUCCESS": "Triggered stopping execution successfully",
"CRON_STR": "Cron String"
},
"DESTINATION": {
"NEW_ENDPOINT": "Novo Endereço",
Expand Down
5 changes: 3 additions & 2 deletions src/portal/src/i18n/lang/tr-tr-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -660,10 +660,11 @@
"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",
"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": "Field is required and \"*\" is not allowed for the \"Minutes\" field",
"CRON_ERROR_TIP": "The 1st field of the cron string must be 0 and the 2nd filed can not be \"*\"",
"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.",
"TRIGGER_STOP_SUCCESS": "Triggered stopping execution successfully"
"TRIGGER_STOP_SUCCESS": "Triggered stopping execution successfully",
"CRON_STR": "Cron String"
},
"DESTINATION": {
"NEW_ENDPOINT": "Yeni Uç Nokta",
Expand Down
5 changes: 3 additions & 2 deletions src/portal/src/i18n/lang/zh-cn-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -660,10 +660,11 @@
"BANDWIDTH_TOOLTIP": "设置执行该条同步规则时的最大网络带宽。实际总带宽需要考虑并发执行的情况。如无需限制,请输入-1",
"UNLIMITED": "无限制",
"UNREACHABLE_SOURCE_REGISTRY": "连接源仓库失败,在编辑此规则前请先确保源仓库可用: {{error}}",
"CRON_ERROR_TIP": "此项必填且\"分钟\"项不能为\"*\"",
"CRON_ERROR_TIP": "Cron 字符串的第一项必须为0且第二项不能为\"*\"",
"COPY_BY_CHUNK": "分块复制",
"COPY_BY_CHUNK_TIP": "请指定是否开启分块复制。开启此项可能导致相应的 API 请求数量增加。",
"TRIGGER_STOP_SUCCESS": "成功触发停止执行"
"TRIGGER_STOP_SUCCESS": "成功触发停止执行",
"CRON_STR": "Cron"
},
"DESTINATION": {
"NEW_ENDPOINT": "新建目标",
Expand Down
5 changes: 3 additions & 2 deletions src/portal/src/i18n/lang/zh-tw-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -656,10 +656,11 @@
"BANDWIDTH_TOOLTIP": "設定每個執行的最大網路頻寬。請注意並發執行的數量。若要無限制頻寬,請輸入 -1",
"UNLIMITED": "無限制",
"UNREACHABLE_SOURCE_REGISTRY": "無法連接到來源登錄,請在編輯此規則之前確保來源登錄可用:{{error}}",
"CRON_ERROR_TIP": "欄位為必填,「分鐘」欄位不允許使用「*」",
"CRON_ERROR_TIP": "The 1st field of the cron string must be 0 and the 2nd filed can not be \"*\"",
"COPY_BY_CHUNK": "分段複製",
"COPY_BY_CHUNK_TIP": "指定是否按分段複製 blob。分段傳輸可能會增加 API 請求的數量。",
"TRIGGER_STOP_SUCCESS": "成功觸發停止執行"
"TRIGGER_STOP_SUCCESS": "成功觸發停止執行",
"CRON_STR": "Cron String"
},
"DESTINATION": {
"NEW_ENDPOINT": "新增目標",
Expand Down

0 comments on commit d347752

Please sign in to comment.