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 2019/12/12 11:18:42 UTC
[incubator-dlab] branch DLAB-1381 updated: [DLAB-1381]: Fixed
issues with libraries filter
This is an automated email from the ASF dual-hosted git repository.
dgnatyshyn pushed a commit to branch DLAB-1381
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
The following commit(s) were added to refs/heads/DLAB-1381 by this push:
new d02fec7 [DLAB-1381]: Fixed issues with libraries filter
d02fec7 is described below
commit d02fec71d29a300fb8d87170f1763a3cb262a883
Author: Dmytro Gnatyshyn <di...@ukr.net>
AuthorDate: Thu Dec 12 13:18:24 2019 +0200
[DLAB-1381]: Fixed issues with libraries filter
---
.../install-libraries.component.html | 4 +--
.../install-libraries.component.scss | 39 ++++++++++++++++------
.../install-libraries.component.ts | 7 ++--
3 files changed, 34 insertions(+), 16 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 542393d..1cbd2c4 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
@@ -132,7 +132,7 @@
</mat-list-item>
<ng-container *ngIf="filtered" >
- <mat-list-item class="lib-col">
+ <mat-list-item class="lib-col filter-row">
<th class="lib-name lib-input">
<input placeholder="Filter by library name" [value]="filterModel.name" (input)="filterModel.name = $event.target.value" type="text" class="form-control filter-field "/>
</th>
@@ -192,7 +192,7 @@
<!-- <p>Cannot retry to reinstall failed libraries: Exploratory {{ notebook?.name }} is not running</p>-->
<!-- </div>-->
<mat-list-item *ngFor="let lib of filtredNotebookLibs">
- <div class="lib-name">
+ <div class="lib-name ellipsis">
<strong>{{ lib.name }}</strong>
<span *ngIf="lib.version && lib.version !== 'N/A'">v.{{ lib.version }}</span>
</div>
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 e57aede..3559e9d 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
@@ -56,14 +56,9 @@
}
.info {
- height: 40%;
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: center;
+ height: 30%;
}
-
.install-libraries {
height: 100%;
@@ -90,6 +85,7 @@
height: auto !important;
min-height: 54px !important;
border-bottom: 1px solid #edf1f5;
+ padding-right: 10px;
}
}
@@ -375,7 +371,8 @@ mat-chip.mat-chip:not(.mat-basic-chip) {
}
.dropdown-multiselect button span {
- padding: 5px;
+ padding-top: 7px;
+ padding-bottom: 3px;
}
.mat-dialog-container.mat-dialog-container #dialog-box {
@@ -398,11 +395,31 @@ mat-chip.mat-chip:not(.mat-basic-chip) {
}
}
}
-.dropdown-multiselect .list-menu li a{
- color: #4a5c89 !important;
- font-size: 13px;
+
+.install-libraries .dropdown-multiselect .list-menu li {
+ a{
+ font-size: 13px;
+ &.list-item{
+ color: #4a5c89 !important;
+ }
+ }
}
+.filter-row .actions {
+ margin-left: 6px;
+ .reset{
+ &:hover {
+ border-color: #f1696e;
+ background: #f9fafb;
+ color: #f1696e;
+ }
+ }
+ .apply:hover {
+ border-color: #49af38;
+ background: #f9fafb;
+ color: #49af38;
+ }
+}
@media screen and (min-width: 1281px) {
.libs-info {
@@ -411,7 +428,7 @@ mat-chip.mat-chip:not(.mat-basic-chip) {
.mat-list {
.scrollingList {
max-height: 300px;
- height: 65%;
+ height: 80%;
}
}
}
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 4746779..3e54f03 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
@@ -72,8 +72,7 @@ export class InstallLibrariesComponent implements OnInit {
public filterConfiguration: FilterLibsModel = new FilterLibsModel('',[],[],[],[]);
public filterModel: FilterLibsModel = new FilterLibsModel('', [], [], [],[]);
public filtered: boolean;
-
- public filtredNotebookLibs:any;
+ public filtredNotebookLibs: Array<any> = [];
@ViewChild('groupSelect', { static: false }) group_select;
@ViewChild('resourceSelect', { static: false }) resource_select;
@@ -243,8 +242,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){
+ this.filtredNotebookLibs = [...data];
+ }
this.notebookLibs = data ? data : [];
- this.filtredNotebookLibs = [...this.notebookLibs];
this.notebookLibs.forEach(v => v.filteredStatus = v.status);
this.changeDetector.markForCheck();
this.filterConfiguration.group = this.createFilterList(this.notebookLibs.map(v=>this.groupsListMap[v.group]));
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org