You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by dg...@apache.org on 2020/07/13 10:02:09 UTC

[incubator-dlab] branch DLAB-1749 updated (d681f82 -> 18104f0)

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

dgnatyshyn pushed a change to branch DLAB-1749
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git.


    from d681f82  [DLAB-1749] BE support library installation of particular version
     add 88429c0  [DLAB-1751]: Added dependencies info for lib list
     add 2ff620b  upd libs
     add 03fd607  [DLAB-1750] Added lib versions from UI
     new a9a4c9d  Merge branch 'DLAB-1750' into DLAB-1749
     new 6412708  small fix
     new 18104f0  [DLAB-1750] Added possibility to install lib with different version

The 3 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.


Summary of changes:
 .../exploratory/install-libraries/index.ts         |   6 +-
 .../install-libraries.component.html               |  61 ++++++++----
 .../install-libraries.component.scss               |  81 ++++++++++++++-
 .../install-libraries.component.ts                 | 109 ++++++++++++++++++++-
 4 files changed, 230 insertions(+), 27 deletions(-)


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


[incubator-dlab] 02/03: small fix

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

dgnatyshyn pushed a commit to branch DLAB-1749
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git

commit 64127083cd349dabf4526d1f601de2b28642da48
Author: Dmytro_Gnatyshyn <di...@ukr.net>
AuthorDate: Mon Jul 13 11:06:29 2020 +0300

    small fix
---
 .../webapp/src/app/resources/exploratory/install-libraries/index.ts | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/index.ts b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/index.ts
index ab8f8b8..ae9969a 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/index.ts
@@ -26,7 +26,7 @@ import { BubbleModule } from '../../../shared';
 import { FormControlsModule } from '../../../shared/form-controls';
 
 import { KeysPipeModule, LibSortPipeModule, HighLightPipeModule } from '../../../core/pipes';
-import {InstallLibrariesComponent, ErrorMessageDialogComponent, LibInfoDialogComponent} from './install-libraries.component';
+import {InstallLibrariesComponent, ErrorLibMessageDialogComponent, LibInfoDialogComponent} from './install-libraries.component';
 export * from './install-libraries.component';
 
 @NgModule({
@@ -41,8 +41,8 @@ export * from './install-libraries.component';
     MaterialModule,
     BubbleModule
   ],
-  declarations: [InstallLibrariesComponent, ErrorMessageDialogComponent, LibInfoDialogComponent],
-  entryComponents: [InstallLibrariesComponent, ErrorMessageDialogComponent, LibInfoDialogComponent],
+  declarations: [InstallLibrariesComponent, ErrorLibMessageDialogComponent, LibInfoDialogComponent],
+  entryComponents: [InstallLibrariesComponent, ErrorLibMessageDialogComponent, LibInfoDialogComponent],
   exports: [InstallLibrariesComponent]
 })
 export class InstallLibrariesModule {}


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


[incubator-dlab] 01/03: Merge branch 'DLAB-1750' into DLAB-1749

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

dgnatyshyn pushed a commit to branch DLAB-1749
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git

commit a9a4c9da9b89e81b9600815229d0a0c7b202c9b2
Merge: d681f82 03fd607
Author: Dmytro_Gnatyshyn <di...@ukr.net>
AuthorDate: Mon Jul 13 11:00:02 2020 +0300

    Merge branch 'DLAB-1750' into DLAB-1749
    
    # Conflicts:
    #	services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/index.ts
    #	services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.html
    #	services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts

 .../exploratory/install-libraries/index.ts         |  6 +-
 .../install-libraries.component.html               | 44 ++++++++---
 .../install-libraries.component.scss               | 76 +++++++++++++++++-
 .../install-libraries.component.ts                 | 91 +++++++++++++++++++++-
 4 files changed, 201 insertions(+), 16 deletions(-)


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


[incubator-dlab] 03/03: [DLAB-1750] Added possibility to install lib with different version

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

dgnatyshyn pushed a commit to branch DLAB-1749
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git

commit 18104f0daa598f11546bf758d0102dc41b186e29
Author: Dmytro_Gnatyshyn <di...@ukr.net>
AuthorDate: Mon Jul 13 13:01:42 2020 +0300

    [DLAB-1750] Added possibility to install lib with different version
---
 .../install-libraries/install-libraries.component.html | 17 +++++++++--------
 .../install-libraries/install-libraries.component.scss |  5 +++++
 .../install-libraries/install-libraries.component.ts   | 18 +++++++++++++++---
 3 files changed, 29 insertions(+), 11 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 610f67f..c4c96b0 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
@@ -56,23 +56,24 @@
             <mat-form-field class="chip-list">
               <input
                 type="text"
-                [placeholder]="group === 'java' ? 'Enter library name in <groupId>:<artifactId>:<versionId> format' : 'Enter library name'"
+                [placeholder]="group === 'java' ? 'Enter library name in <groupId>:<artifactId>:<versionId> format' : 'Enter library name in <name>:<version> format(version is not required)'"
                 matInput
                 [formControl]="libSearch"
                 [value]="query"
                 [matAutocomplete]="auto"
               >
-              <mat-icon matSuffix>search</mat-icon>
-              <mat-autocomplete #auto="matAutocomplete" class="suggestions">
-                <ng-template ngFor let-item [ngForOf]="filteredList" let-i="index">
+              <mat-icon matSuffix (click)="addLibrary(query)" class="add-icon">add</mat-icon>
+
+              <mat-autocomplete #auto="matAutocomplete" class="suggestions" >
+                <ng-template ngFor let-item [ngForOf]="filteredList" let-i="index" *ngIf="query.indexOf(':') === -1">
                   <mat-option [ngClass]="{ 'not-allowed': isDuplicated(item) }">
                     <div class="option" (click)="selectLibrary(item)">
                       <a *ngIf="!isDuplicated(item)">
                         <span [innerHTML]="item.name | highlight:query"></span>
-                        <span *ngIf="item.version && item.version !== 'N/A'">{{ item.version }}</span>
+<!--                        <span *ngIf="item.version && item.version !== 'N/A'">{{ item.version }}</span>-->
                       </a>
                       <span *ngIf="isInSelectedList || isInstalled">{{ item.name }}
-                        <span *ngIf="item.version && item.version !== 'N/A'">{{ item.version }}</span>
+<!--                        <span *ngIf="item.version && item.version !== 'N/A'">{{ item.version }}</span>-->
                       </span>
 
                       <strong *ngIf="isInSelectedList">selected
@@ -84,11 +85,11 @@
                     </div>
                   </mat-option>
                 </ng-template>
-                <mat-option *ngIf="model.isEmpty(filteredList) && !validity_format">
+                <mat-option *ngIf="model.isEmpty(filteredList) && !validity_format && query.indexOf(':') === -1">
                   <span class="configuring">No matches found</span>
                 </mat-option>
                 <mat-option *ngIf="validity_format?.length > 0">
-                  <span class="configuring">{{ validity_format }}</span>
+                  <span class="configuring" *ngIf="query.indexOf(':') === -1">{{ validity_format }}</span >
                 </mat-option>
               </mat-autocomplete>
             </mat-form-field>
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.scss b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.scss
index d8dfe57..b87846d 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.scss
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.scss
@@ -157,6 +157,11 @@ ul.resources{
   font-weight: 600;
 }
 
+.add-icon{
+  margin-right: 10px;
+  cursor: pointer;
+}
+
 .search-box {
   display: flex;
   padding: 20px 25px 10px;
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 d87805c..ea50a7d 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
@@ -187,13 +187,22 @@ export class InstallLibrariesComponent implements OnInit, OnDestroy {
     return this.isInSelectedList || this.isInstalled;
   }
 
-  public selectLibrary(item): void {
-    this.model.selectedLibs.push({ group: this.group, name: item.name, version: item.version });
+  public addLibrary(item): void {
+    const lib = item.split(':').filter(v => !!v);
+    console.log(lib);
+    this.model.selectedLibs.push({ group: this.group, name: lib[0], version: lib[1] || 'N/A' });
     this.query = '';
     this.libSearch.setValue('');
     this.filteredList = null;
   }
 
+  public selectLibrary(item): void {
+    // this.model.selectedLibs.push({ group: this.group, name: item.name, version: item.version });
+    // this.query = '';
+    this.libSearch.setValue(item.name + ':');
+    this.filteredList = null;
+  }
+
   public removeSelectedLibrary(item): void {
     this.model.selectedLibs.splice(this.model.selectedLibs.indexOf(item), 1);
   }
@@ -305,7 +314,10 @@ export class InstallLibrariesComponent implements OnInit, OnDestroy {
           });
     } else {
       this.model.getLibrariesList(this.group, this.query)
-        .subscribe(libs => this.filteredList = libs);
+        .subscribe(libs => {
+          console.log(libs);
+          this.filteredList = libs;
+        });
     }
   }
 


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