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-dlab.git


The following commit(s) were added to refs/heads/develop by this push:
     new 4490337  [DLAB-1458]: Fixed UI issues on 'Manage library' page (#541)
4490337 is described below

commit 4490337fcec272da3a40dc5e7f83a585f1a45500
Author: Dmytro Gnatyshyn <42860905+dg1...@users.noreply.github.com>
AuthorDate: Tue Jan 21 18:07:16 2020 +0200

    [DLAB-1458]: Fixed UI issues on 'Manage library' page (#541)
---
 .../install-libraries.component.html               |  2 +-
 .../install-libraries.component.scss               | 48 +++++++++++++---------
 .../install-libraries.component.ts                 | 22 ++++------
 .../webapp/src/assets/styles/_dialogs.scss         |  2 +-
 4 files changed, 40 insertions(+), 34 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 2948e4a..b0c2092 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
@@ -19,7 +19,7 @@
 
 <div class="install-libraries" id="dialog-box">
   <header class="dialog-header">
-    <h4 class="modal-title">Manage <span class="strong">{{ notebook?.name 
}}</span> Libraries</h4>
+    <h4 class="modal-title">Manage <span>{{ notebook?.name }}</span> 
Libraries</h4>
     <button type="button" class="close" 
(click)="dialogRef.close()">&times;</button>
   </header>
   <div class="dialog-content">
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 e90d26a..b92177e 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
@@ -374,31 +374,41 @@ mat-chip.mat-chip:not(.mat-basic-chip) {
   padding-top: 7px;
   padding-bottom: 3px;
 }
-.endpoints-dialog{
-  .mat-dialog-container.mat-dialog-container #dialog-box  {
-    .mat-header-cell{
-      padding: 0;
-      border: none;
-    }
-
-    .filter-actions {
-      display: flex;
 
-      .btn {
-        padding: 6px;
-        height: auto;
-        width: auto;
-        min-width: 0;
+.mat-dialog-container.mat-dialog-container .install-libraries#dialog-box  {
+  .mat-header-cell{
+    padding: 0;
+    border: none;
+  }
 
-        .mat-button-wrapper {
-          display: flex;
-        }
+  .filter-actions {
+    display: flex;
+    margin-left: 6px;
+    .btn {
+      padding: 6px;
+      height: auto;
+      width: auto;
+      min-width: 0;
+
+      .mat-button-wrapper {
+        display: flex;
       }
     }
+    .reset{
+      &:hover {
+        border-color: #f1696e;
+        background: #f9fafb;
+        color: #f1696e;
+      }
+    }
+    .apply:hover {
+      border-color: #49af38;
+      background: #f9fafb;
+      color: #49af38;
+    }
   }
 }
 
-
 .install-libraries .dropdown-multiselect .list-menu li {
   a{
     font-size: 13px;
@@ -409,7 +419,7 @@ mat-chip.mat-chip:not(.mat-basic-chip) {
 }
 
 .filter-row .filter-actions {
-  margin-left: 6px;
+  display: flex;
 
   .reset{
       &:hover {
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 2741812..90e1f9c 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
@@ -182,7 +182,6 @@ export class InstallLibrariesComponent implements OnInit {
 
   public selectLibrary(item): void {
     this.model.selectedLibs.push({ group: this.group, name: item.name, 
version: item.version });
-
     this.query = '';
     this.libSearch.setValue('');
 
@@ -216,18 +215,14 @@ export class InstallLibrariesComponent implements OnInit {
       ErrorMessageDialogComponent, { data: item.error, width: '550px', 
panelClass: 'error-modalbox' });
   }
 
-  public isInstallingInProgress(data): void {
-    this.notebookFailedLibs = data.filter(lib => lib.status.some(inner => 
inner.status === 'failed'));
-    this.installingInProgress = data.filter(lib => lib.status.some(inner => 
inner.status === 'installing')).length > 0;
-
-    if (this.installingInProgress) {
-      if (this.clearCheckInstalling === undefined)
+  public isInstallingInProgress(): void {
+      if (this.clearCheckInstalling === undefined) {
         this.clearCheckInstalling = window.setInterval(() => 
this.getInstalledLibrariesList(), 10000);
-    } else {
-      clearInterval(this.clearCheckInstalling);
-      this.clearCheckInstalling = undefined;
+      } else {
+        clearInterval(this.clearCheckInstalling);
+        this.clearCheckInstalling = undefined;
+      }
     }
-  }
 
   public reinstallLibrary(item, lib) {
     const retry = [{ group: lib.group, name: lib.name, version: lib.version }];
@@ -242,9 +237,10 @@ export class InstallLibrariesComponent implements OnInit {
   private getInstalledLibrariesList(init?: boolean) {
     this.model.getInstalledLibrariesList(this.notebook)
       .subscribe((data: any) => {
-        if(!this.filtredNotebookLibs.length || data.length !== 
this.notebookLibs.length){
+        if( !this.filtredNotebookLibs.length || data.length !== 
this.notebookLibs.length){
           this.filtredNotebookLibs = [...data];
         }
+        this.filtredNotebookLibs = data.filter(lib => 
this.filtredNotebookLibs.some(v => (v.name + v.version === lib.name + 
v.version) && v.resource === lib.resource));
         this.notebookLibs = data ? data : [];
         this.notebookLibs.forEach(lib => {
           lib.filteredStatus = lib.status;
@@ -257,7 +253,7 @@ export class InstallLibrariesComponent implements OnInit {
         this.filterConfiguration.resource = 
this.createFilterList(this.notebookLibs.map(lib=>lib.status.map(status=>status.resource)));
         this.filterConfiguration.resourceType = 
this.createFilterList(this.notebookLibs.map(lib=>lib.status.map(status=>status.resourceType)));
         this.filterConfiguration.status = 
this.createFilterList(this.notebookLibs.map(lib=>lib.status.map(status=>status.status)));
-        this.isInstallingInProgress(this.notebookLibs);
+        this.isInstallingInProgress();
       });
   }
 
diff --git 
a/services/self-service/src/main/resources/webapp/src/assets/styles/_dialogs.scss
 
b/services/self-service/src/main/resources/webapp/src/assets/styles/_dialogs.scss
index bdb98f3..202d144 100644
--- 
a/services/self-service/src/main/resources/webapp/src/assets/styles/_dialogs.scss
+++ 
b/services/self-service/src/main/resources/webapp/src/assets/styles/_dialogs.scss
@@ -128,7 +128,7 @@ mat-dialog-container {
         margin-right: 2px;
       }
 
-      .btn {
+      .btn:not(.mat-icon-button) {
         padding: 6px 15px;
         min-width: 140px;
         font-weight: 600;


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

Reply via email to