Refactor resetFilters method to accept input parameters for command and status filters
testing/ogGui-multibranch/pipeline/head There was a failure building this commit Details

pull/22/head
Lucas Lara García 2025-05-08 14:11:45 +02:00
parent 60684d2c50
commit 28336603ad
4 changed files with 26 additions and 23 deletions

View File

@ -10,7 +10,7 @@
</div>
<div class="images-button-row">
<button class="action-button" (click)="resetFilters()" joyrideStep="resetFiltersStep"
<button class="action-button" (click)="resetFilters(commandSearchInput, commandStatusInput)" joyrideStep="resetFiltersStep"
text="{{ 'resetFiltersStepText' | translate }}">
{{ 'resetFilters' | translate }}
</button>

View File

@ -218,8 +218,10 @@ export class ClientTaskLogsComponent implements OnInit {
);
}
resetFilters() {
resetFilters(clientSearchCommandInput: any, clientSearchStatusInput: any) {
this.loading = true;
clientSearchCommandInput.value = null;
clientSearchStatusInput.value = null;
this.filters = {};
this.loadTraces();
}

View File

@ -9,8 +9,8 @@
</div>
<div class="images-button-row">
<button class="action-button" (click)="resetFilters()" joyrideStep="resetFiltersStep"
text="{{ 'resetFiltersStepText' | translate }}">
<button class="action-button" (click)="resetFilters(commandSearchInput, commandStatusInput)"
joyrideStep="resetFiltersStep" text="{{ 'resetFiltersStepText' | translate }}">
{{ 'resetFilters' | translate }}
</button>
</div>
@ -56,7 +56,8 @@
<mat-form-field appearance="fill" class="search-boolean">
<mat-label i18n="@@searchLabel">Estado</mat-label>
<mat-select (selectionChange)="onOptionStatusSelected($event.value)" placeholder="Seleccionar opción" #commandStatusInput>
<mat-select (selectionChange)="onOptionStatusSelected($event.value)" placeholder="Seleccionar opción"
#commandStatusInput>
<mat-option [value]="'failed'">Fallido</mat-option>
<mat-option [value]="'pending'">Pendiente de ejecutar</mat-option>
<mat-option [value]="'in-progress'">Ejecutando</mat-option>
@ -83,7 +84,8 @@
<ng-container *ngSwitchCase="'status'">
<ng-container *ngIf="trace.status === 'in-progress' && trace.progress; else statusChip">
<div class="progress-container">
<mat-progress-bar class="example-margin" [mode]="mode" [value]="trace.progress" [bufferValue]="bufferValue">
<mat-progress-bar class="example-margin" [mode]="mode" [value]="trace.progress"
[bufferValue]="bufferValue">
</mat-progress-bar>
<span>{{trace.progress}}%</span>
</div>
@ -106,11 +108,8 @@
trace.status
}}
</mat-chip>
<button *ngIf="trace.status === 'in-progress' && trace.command === 'deploy-image'"
mat-icon-button
(click)="cancelTrace(trace)"
class="cancel-button"
matTooltip="Cancelar transmisión de imagen">
<button *ngIf="trace.status === 'in-progress' && trace.command === 'deploy-image'" mat-icon-button
(click)="cancelTrace(trace)" class="cancel-button" matTooltip="Cancelar transmisión de imagen">
<mat-icon>cancel</mat-icon>
</button>
</div>

View File

@ -262,8 +262,10 @@ export class TaskLogsComponent implements OnInit {
}
resetFilters() {
resetFilters(clientSearchCommandInput: any, clientSearchStatusInput: any) {
this.loading = true;
clientSearchCommandInput.value = null;
clientSearchStatusInput.value = null;
this.filters = {};
this.loadTraces();
}