Merge pull request #7191 from zhoumeina/replication_ng

add validation message
This commit is contained in:
Wenkai Yin 2019-03-21 13:28:36 +08:00 committed by GitHub
commit 8e08ec382c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 14 additions and 7 deletions

View File

@ -56,7 +56,10 @@
<div formArrayName="src_namespaces"> <div formArrayName="src_namespaces">
<div class="width-315" *ngFor="let src_namespace of src_namespaces.controls; let i=index"> <div class="width-315" *ngFor="let src_namespace of src_namespaces.controls; let i=index">
<div class="select endpointSelect pull-left"> <div class="select endpointSelect pull-left">
<input type="text" [formControlName]="i" pattern="^[a-z0-9]+(?:[._-][a-z0-9]+)*$" class="inputWidth" required maxlength="255"> <label aria-haspopup="true" role="tooltip" class="tooltip tooltip-validation tooltip-md tooltip-bottom-left" [class.invalid]='(src_namespace.touched && src_namespace.invalid)'>
<input type="text" [formControlName]="i" pattern="^[a-z0-9]+(?:[._-][a-z0-9]+)*$" class="inputWidth" required maxlength="255">
<span class="tooltip-content">{{'REPLICATION.NAMESPACE_TOOLTIP' | translate}}</span>
</label>
</div> </div>
<clr-icon shape="times-circle" class="is-solid" (click)="deleteNamespace(i)"></clr-icon> <clr-icon shape="times-circle" class="is-solid" (click)="deleteNamespace(i)"></clr-icon>
</div> </div>
@ -95,7 +98,6 @@
</div> </div>
<!--destination registry--> <!--destination registry-->
<div *ngIf="isPushMode" class="form-group form-group-override"> <div *ngIf="isPushMode" class="form-group form-group-override">
<label class="form-group-label-override required">{{'REPLICATION.DEST_REGISTRY' | translate}}</label> <label class="form-group-label-override required">{{'REPLICATION.DEST_REGISTRY' | translate}}</label>
<div class="form-select"> <div class="form-select">
<div class="select endpointSelect pull-left"> <div class="select endpointSelect pull-left">

View File

@ -452,7 +452,8 @@
"SOURCE_REGISTRY":"Source registry", "SOURCE_REGISTRY":"Source registry",
"SOURCE_NAMESPACES":"Source namespaces", "SOURCE_NAMESPACES":"Source namespaces",
"DEST_REGISTRY":"Destination registry", "DEST_REGISTRY":"Destination registry",
"DEST_NAMESPACE":"Destination namespace" "DEST_NAMESPACE":"Destination namespace",
"NAMESPACE_TOOLTIP": "Namespace name should be at least 2 characters long with lower case characters, numbers and ._- and must be start with characters or numbers."
}, },
"DESTINATION": { "DESTINATION": {
"NEW_ENDPOINT": "New Endpoint", "NEW_ENDPOINT": "New Endpoint",

View File

@ -453,7 +453,8 @@
"SOURCE_REGISTRY":"Source registry", "SOURCE_REGISTRY":"Source registry",
"SOURCE_NAMESPACES":"Source namespaces", "SOURCE_NAMESPACES":"Source namespaces",
"DEST_REGISTRY":"Destination registry", "DEST_REGISTRY":"Destination registry",
"DEST_NAMESPACE":"Destination namespace" "DEST_NAMESPACE":"Destination namespace",
"NAMESPACE_TOOLTIP": "Namespace name should be at least 2 characters long with lower case characters, numbers and ._- and must be start with characters or numbers."
}, },
"DESTINATION": { "DESTINATION": {
"NEW_ENDPOINT": "Nuevo Endpoint", "NEW_ENDPOINT": "Nuevo Endpoint",

View File

@ -434,7 +434,8 @@
"SOURCE_REGISTRY":"Source registry", "SOURCE_REGISTRY":"Source registry",
"SOURCE_NAMESPACES":"Source namespaces", "SOURCE_NAMESPACES":"Source namespaces",
"DEST_REGISTRY":"Destination registry", "DEST_REGISTRY":"Destination registry",
"DEST_NAMESPACE":"Destination namespace" "DEST_NAMESPACE":"Destination namespace",
"NAMESPACE_TOOLTIP": "Namespace name should be at least 2 characters long with lower case characters, numbers and ._- and must be start with characters or numbers."
}, },
"DESTINATION": { "DESTINATION": {
"NEW_ENDPOINT": "Nouveau Point Final", "NEW_ENDPOINT": "Nouveau Point Final",

View File

@ -452,7 +452,8 @@
"SOURCE_REGISTRY":"Source registry", "SOURCE_REGISTRY":"Source registry",
"SOURCE_NAMESPACES":"Source namespaces", "SOURCE_NAMESPACES":"Source namespaces",
"DEST_REGISTRY":"Destination registry", "DEST_REGISTRY":"Destination registry",
"DEST_NAMESPACE":"Destination namespace" "DEST_NAMESPACE":"Destination namespace",
"NAMESPACE_TOOLTIP": "Namespace name should be at least 2 characters long with lower case characters, numbers and ._- and must be start with characters or numbers."
}, },
"DESTINATION": { "DESTINATION": {
"NEW_ENDPOINT": "Novo Endpoint", "NEW_ENDPOINT": "Novo Endpoint",

View File

@ -453,7 +453,8 @@
"SOURCE_REGISTRY":"源Registry", "SOURCE_REGISTRY":"源Registry",
"SOURCE_NAMESPACES":"源Namespace", "SOURCE_NAMESPACES":"源Namespace",
"DEST_REGISTRY":"目的Registry", "DEST_REGISTRY":"目的Registry",
"DEST_NAMESPACE":"目的Namespace" "DEST_NAMESPACE":"目的Namespace",
"NAMESPACE_TOOLTIP": "Namespace名称由小写字符、数字和._-组成且至少2个字符并以字符或者数字开头。"
}, },
"DESTINATION": { "DESTINATION": {
"NEW_ENDPOINT": "新建目标", "NEW_ENDPOINT": "新建目标",