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/01/21 12:12:18 UTC
[incubator-datalab] branch develop updated: [DATALAB-2251]: Support
library installation if it isn't found in autocomplete (#1045)
This is an automated email from the ASF dual-hosted git repository.
dgnatyshyn pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git
The following commit(s) were added to refs/heads/develop by this push:
new ad3b9fe [DATALAB-2251]: Support library installation if it isn't found in autocomplete (#1045)
ad3b9fe is described below
commit ad3b9fe935791cecb9c6eb4ee8ad24e014222677
Author: Dmytro Gnatyshyn <42...@users.noreply.github.com>
AuthorDate: Thu Jan 21 14:12:12 2021 +0200
[DATALAB-2251]: Support library installation if it isn't found in autocomplete (#1045)
---
.../exploratory/install-libraries/install-libraries.component.html | 6 +++---
.../exploratory/install-libraries/install-libraries.component.ts | 4 ++--
2 files changed, 5 insertions(+), 5 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 80f81f1..7adac93 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
@@ -86,7 +86,7 @@
</div>
</mat-option>
</ng-template>
- <mat-option *ngIf="model.isEmpty(filteredList) && !validity_format && autoComplete === 'ENABLED'">
+ <mat-option *ngIf="!filteredList?.length && !validity_format && autoComplete === 'ENABLED'">
<span class="configuring">No matches found</span>
</mat-option>
<mat-option *ngIf="validity_format?.length > 0 && autoComplete === 'ENABLED'">
@@ -119,14 +119,14 @@
</span>
<span class="plus-icon"
[ngClass]="{'not-allow': lib.name?.length < 2
- || (autoComplete === 'ENABLED' && !isLibSelected )
+ || (autoComplete === 'ENABLED' && !isLibSelected && filteredList?.length)
|| this.selectedLib?.isInSelectedList || isVersionInvalid || autoComplete === 'UPDATING'}"
[matTooltip]="this.selectedLib?.isInSelectedList ? 'Library is in selected list' : 'Please select library from autocomplete'"
matTooltipPosition="above" [matTooltipDisabled]="(!this.selectedLib?.isInSelectedList && isLibSelected) || lib.name?.length < 2 || !this.selectedLib?.isInSelectedList && autoComplete === 'NONE'"
>
<mat-icon
(click)="addLibrary(lib)"
- [ngClass]="{'not-allowed': lib.name?.length < 2 || (autoComplete === 'ENABLED' && !isLibSelected)
+ [ngClass]="{'not-allowed': lib.name?.length < 2 || (autoComplete === 'ENABLED' && !isLibSelected && filteredList?.length)
|| this.selectedLib?.isInSelectedList || isVersionInvalid || autoComplete === 'UPDATING'}">add</mat-icon>
</span>
</div>
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 42ed182..acf060c 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
@@ -231,11 +231,11 @@ export class InstallLibrariesComponent implements OnInit, OnDestroy {
}
public addLibrary(item): void {
- if ((this.autoComplete === 'ENABLED' && !this.isLibSelected )
+ if ((this.autoComplete === 'ENABLED' && !this.isLibSelected && !this.validity_format)
|| (this.selectedLib && this.selectedLib.isInSelectedList) || this.isVersionInvalid || this.autoComplete === 'UPDATING') {
return;
}
-
+ this.validity_format = '';
this.isLibSelected = false;
if ( (!this.selectedLib && !this.isVersionInvalid) || (!this.selectedLib.isInSelectedList && !this.isVersionInvalid)) {
if ( this.group !== 'java') {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org