This is an automated email from the ASF dual-hosted git repository. hshpak pushed a commit to branch fix/DATALAB-2955/scope-of-bugs-for-view-list-of-filtered-images in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git
commit f950ec2c7ae1cad9d3387eb9a54475b19195d61b Author: Hennadii_Shpak <[email protected]> AuthorDate: Fri Aug 5 10:23:36 2022 +0300 fixed select message --- .../directives/updated-click-outside.directive.ts | 4 +-- .../page-filter/page-filter.component.html | 14 ++++------ .../page-filter/page-filter.component.ts | 4 --- .../exploratory/page-filter/page-filter.config.ts | 2 +- .../src/app/resources/images/images.component.html | 30 ++++++++++++---------- .../src/app/resources/images/images.component.scss | 2 +- 6 files changed, 24 insertions(+), 32 deletions(-) diff --git a/services/self-service/src/main/resources/webapp/src/app/core/directives/updated-click-outside.directive.ts b/services/self-service/src/main/resources/webapp/src/app/core/directives/updated-click-outside.directive.ts index 1b4de30d0..bacc18cd8 100644 --- a/services/self-service/src/main/resources/webapp/src/app/core/directives/updated-click-outside.directive.ts +++ b/services/self-service/src/main/resources/webapp/src/app/core/directives/updated-click-outside.directive.ts @@ -4,16 +4,14 @@ import {Directive, ElementRef, Output, EventEmitter, HostListener} from '@angula selector: '[datalabClickedOutside]' }) export class UpdatedClickedOutsideDirective { - counter = 0; constructor(private el: ElementRef) { } @Output() public clickedOutside = new EventEmitter(); @HostListener('document:click', ['$event.target']) public onClick(target: any) { - this.counter ++; const clickedInside = this.el.nativeElement.contains(target); - if (!clickedInside && this.counter > 1) { + if (!clickedInside) { this.clickedOutside.emit(target); } } diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/page-filter/page-filter.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/page-filter/page-filter.component.html index cf4bb01e8..81449bbc8 100644 --- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/page-filter/page-filter.component.html +++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/page-filter/page-filter.component.html @@ -17,11 +17,7 @@ ~ under the License. --> -<div - class="dialog-content selection" - datalabClickedOutside - (clickedOutside)="onClickOutside()" -> +<div class="dialog-content selection"> <ng-container *ngIf="$setFilterValueObservable | async"></ng-container> @@ -65,7 +61,7 @@ [value]="selectAllValue" (click)="onClickAll(statuses, allStatusesSelected, dropdownFieldNames.statuses)" > - Select all + All </mat-option> <mat-option *ngFor="let status of ($filterDropdownData | async).statuses" @@ -103,7 +99,7 @@ [value]="selectAllValue" (click)="onClickAll(endpoints, allEndpointsSelected, dropdownFieldNames.endpoints)" > - Select all + All </mat-option> <mat-option *ngFor="let endpoint of ($filterDropdownData | async).endpoints" @@ -141,7 +137,7 @@ [value]="selectAllValue" (click)="onClickAll(templateNames, allTemplatesSelected, dropdownFieldNames.templateNames)" > - Select all + All </mat-option> <mat-option *ngFor="let template of ($filterDropdownData | async).templateNames" @@ -179,7 +175,7 @@ [value]="selectAllValue" (click)="onClickAll(sharingStatuses, allSharingStatusesSelected, dropdownFieldNames.sharingStatuses)" > - Select all + All </mat-option> <mat-option *ngFor="let status of ($filterDropdownData | async).sharingStatuses" diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/page-filter/page-filter.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/page-filter/page-filter.component.ts index 9cf0e7067..577bd8f38 100644 --- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/page-filter/page-filter.component.ts +++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/page-filter/page-filter.component.ts @@ -75,10 +75,6 @@ export class PageFilterComponent implements OnInit { this.closeFilter.emit(); } - onClickOutside(): void { - this.closeFilter.emit(); - } - onControlChange(fieldName: keyof ImageFilterFormDropdownData): void { this.filterForm.get(fieldName)?.valueChanges.pipe( tap((inputValue: string) => this.onValueChanges.emit(inputValue)) diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/page-filter/page-filter.config.ts b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/page-filter/page-filter.config.ts index 399d70c6f..871550a6d 100644 --- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/page-filter/page-filter.config.ts +++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/page-filter/page-filter.config.ts @@ -18,7 +18,7 @@ */ export enum FilterFormPlaceholders { - imageName = 'Enter image name', + imageName = 'Search in images\' names', status = 'Select status', endpoint = 'Select endpoint', templateName = 'Select template name', diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/images/images.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/images/images.component.html index 56cfc8982..517788c8b 100644 --- a/services/self-service/src/main/resources/webapp/src/app/resources/images/images.component.html +++ b/services/self-service/src/main/resources/webapp/src/app/resources/images/images.component.html @@ -94,21 +94,23 @@ <!-- </div>--> <!-- </span>--> - <button mat-raised-button [disabled]="!(dataSource | async)?.length && !($isFiltered | async)" class="butt filter__btn" (click)="onFilterClick()"> - <i class="material-icons" [ngClass]="{'filtered-icon': $isFiltered | async}">filter_list</i> - <span class="filter__btn--name" [ngClass]="{'filtered-icon': $isFiltered | async}">Filter</span> - <button *ngIf="$isFiltered | async" type="button" (click)="onResetFilterClick($event)" class="close__btn">×</button> - </button> + <div class="filter__wrapper"> + <button mat-raised-button [disabled]="!(dataSource | async)?.length && !($isFiltered | async)" class="butt filter__btn" (click)="onFilterClick()"> + <i class="material-icons" [ngClass]="{'filtered-icon': $isFiltered | async}">filter_list</i> + <span class="filter__btn--name" [ngClass]="{'filtered-icon': $isFiltered | async}">Filter</span> + <button *ngIf="$isFiltered | async" type="button" (click)="onResetFilterClick($event)" class="close__btn">×</button> + </button> - <div *ngIf="isFilterOpened | async" class="filer__wrapper"> - <datalab-page-filter - [$filterDropdownData]="$filterDropdownData" - [$filterFormStartValue]="$filterFormValue" - (filterFormValue)="onFilterApplyClick($event)" - (closeFilter)="onFilterCancelClick()" - (onValueChanges)="onControlChanges(dropdownFieldNames.imageName, $event)" - > - </datalab-page-filter> + <div *ngIf="isFilterOpened | async" class="filer-pop-up__wrapper"> + <datalab-page-filter + [$filterDropdownData]="$filterDropdownData" + [$filterFormStartValue]="$filterFormValue" + (filterFormValue)="onFilterApplyClick($event)" + (closeFilter)="onFilterCancelClick()" + (onValueChanges)="onControlChanges(dropdownFieldNames.imageName, $event)" + > + </datalab-page-filter> + </div> </div> <button diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/images/images.component.scss b/services/self-service/src/main/resources/webapp/src/app/resources/images/images.component.scss index 8e3f469c1..c1cb190ae 100644 --- a/services/self-service/src/main/resources/webapp/src/app/resources/images/images.component.scss +++ b/services/self-service/src/main/resources/webapp/src/app/resources/images/images.component.scss @@ -119,7 +119,7 @@ margin: 0 !important; } -.filer__wrapper { +.filer-pop-up__wrapper { position: absolute; top: 46px; //UNCOMMENT AFTER UNCOMMENT ACTION MENU --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
