You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by dg...@apache.org on 2020/11/06 14:03:22 UTC

[incubator-datalab] 02/02: [DATALAB-2146]: Fixed bug with 'Host name' input on git credential

This is an automated email from the ASF dual-hosted git repository.

dgnatyshyn pushed a commit to branch DATALAB-2146
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git

commit 7477f4c3ed40f9c0302b0f6063124494810b0026
Author: Dmytro_Gnatyshyn <di...@ukr.net>
AuthorDate: Fri Nov 6 15:44:10 2020 +0200

    [DATALAB-2146]: Fixed bug with 'Host name' input on git credential
---
 .../webapp/src/app/resources/manage-ungit/manage-ungit.component.ts   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.component.ts
index 5743e23..9931f47 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.component.ts
@@ -37,7 +37,7 @@ export class ManageUngitComponent implements OnInit {
   currentEditableItem: AccountCredentials = null;
 
   mail_validity_pattern = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,63})$/;
-  hostname_validity_pattern = /^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])+\.[a-z\.]+\S$/;
+  hostname_validity_pattern = /^([a-zA-Z0-9]+(\.[a-zA-Z0-9]+)+.*)$/;
   login_acceptance_pattern = '[-_@.a-zA-Z0-9]+';
   acceptance_pattern = '[-_ a-zA-Z0-9]+';
 
@@ -92,7 +92,7 @@ export class ManageUngitComponent implements OnInit {
 
     this.updateAccountCredentialsForm = this._fb.group({
       'hostname': [item.hostname, Validators.compose(
-        [Validators.required, Validators.pattern(this.hostname_validity_pattern), this.containsHostname.bind(this)]
+        [Validators.required,  this.containsHostname.bind(this)]
       )],
       'username': [item.username, Validators.compose([Validators.required, Validators.pattern(this.acceptance_pattern)])],
       'email': [item.email, Validators.compose([Validators.required, Validators.pattern(this.mail_validity_pattern)])],


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org