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 2021/02/12 13:59:34 UTC

[incubator-datalab] 01/02: [DATALAB-2188]: Extended validation for library installation

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

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

commit c352a1d660a008b2d26848487d03cbca08c46b00
Author: Dmytro_Gnatyshyn <di...@ukr.net>
AuthorDate: Fri Feb 12 15:50:30 2021 +0200

    [DATALAB-2188]: Extended validation for library installation
---
 .../exploratory/install-libraries/install-libraries.component.ts      | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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 45bc6d5..fb6d6c4 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
@@ -219,7 +219,7 @@ export class InstallLibrariesComponent implements OnInit, OnDestroy {
           return lib.name.toLowerCase() === item.name.substring(0, item.name.lastIndexOf(':')).toLowerCase();
         });
       }
-    } else if ( this.autoComplete === 'NONE') {
+    } else if ( this.autoComplete === 'NONE' || (this.autoComplete === 'ENABLED' && !this.filteredList?.length && this.group !== 'java')) {
       this.selectedLib = {
         name: this.lib.name,
         version: this.lib.version,
@@ -232,6 +232,7 @@ export class InstallLibrariesComponent implements OnInit, OnDestroy {
 
   public addLibrary(item): void {
     if ((this.autoComplete === 'ENABLED' && !this.isLibSelected && this.filteredList?.length)
+      || this.lib.name.trim().length < 2
       || (this.selectedLib && this.selectedLib.isInSelectedList) || this.isVersionInvalid || this.autoComplete === 'UPDATING') {
       return;
     }
@@ -585,6 +586,7 @@ export class ErrorLibMessageDialogComponent {
   `
   ]
 })
+
 export class LibInfoDialogComponent {
   constructor(
     public dialogRef: MatDialogRef<ErrorLibMessageDialogComponent>,


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