You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by yt...@apache.org on 2021/04/06 08:33:50 UTC

[incubator-datalab] branch DATALAB-2343 created (now aaa4354)

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

ytykhun pushed a change to branch DATALAB-2343
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git.


      at aaa4354  [DATALAB-2343] extended validation for library name

This branch includes the following new commits:

     new aaa4354  [DATALAB-2343] extended validation for library name

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


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


[incubator-datalab] 01/01: [DATALAB-2343] extended validation for library name

Posted by yt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit aaa4354ec4aacc8177dafb06b73adf41157b5122
Author: Yurii Tykhun <ty...@gmail.com>
AuthorDate: Tue Apr 6 11:33:27 2021 +0300

    [DATALAB-2343] extended validation for library name
---
 .../exploratory/install-libraries/install-libraries.component.html | 2 +-
 .../exploratory/install-libraries/install-libraries.component.ts   | 7 ++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.html
index 3d60760..05750b5 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.html
@@ -108,7 +108,7 @@
                   class="library-input"
                   [placeholder]="'Enter library version (optional)'"
                   [(ngModel)]="lib.version"
-                  [disabled]="!lib.name.trim()"
+                  [disabled]="!lib.name.trim() || lib.name.trim().length < 2"
                   (keyup)="validateVersion(lib.version)"
                   (keydown.enter)="addLibrary(lib)"
                 >
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts
index 3acdd72..1f64d04 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts
@@ -113,7 +113,12 @@ export class InstallLibrariesComponent implements OnInit, OnDestroy {
       takeUntil(this.unsubscribe$)
       )
       .subscribe(value => {
-        this.lib.name = value;
+        if(!!value.match(/\s+/g)) {
+          this.libSearch.setValue(value.replace(/\s+/g, ''))
+          this.lib.name = value.replace(/\s+/g, '');
+        } else {
+          this.lib.name = value;
+        }
         this.isDuplicated(this.lib);
         this.filterList();
       });

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