diff --git a/ogWebconsole/src/app/components/task-logs/client-task-logs/client-task-logs.component.ts b/ogWebconsole/src/app/components/task-logs/client-task-logs/client-task-logs.component.ts index 2db9e1b..897622d 100644 --- a/ogWebconsole/src/app/components/task-logs/client-task-logs/client-task-logs.component.ts +++ b/ogWebconsole/src/app/components/task-logs/client-task-logs/client-task-logs.component.ts @@ -35,7 +35,6 @@ export class ClientTaskLogsComponent implements OnInit { mode: ProgressBarMode = 'buffer'; progress = 0; bufferValue = 0; - dateRange = new FormControl(); filteredCommands2 = Object.keys(COMMAND_TYPES).map(key => ({ name: key, @@ -135,7 +134,9 @@ export class ClientTaskLogsComponent implements OnInit { } onOptionCommandSelected(selectedCommand: any): void { - this.filters['command'] = selectedCommand.id; + this.filters['command'] = selectedCommand.name; + console.log('Comando seleccionado:', selectedCommand); + console.log('Valor que se usarĂ¡ para el filtro:', selectedCommand.name); this.loadTraces(); } @@ -191,22 +192,13 @@ export class ClientTaskLogsComponent implements OnInit { .set('itemsPerPage', this.itemsPerPage.toString()); if (this.filters['command']) { - params = params.set('command.id', this.filters['command']); + params = params.set('command.name', this.filters['command']); } if (this.filters['status']) { params = params.set('status', this.filters['status']); } - const range = this.dateRange?.value; - if (range?.start && range?.end) { - const fromDate = this.datePipe.transform(range.start, 'yyyy-MM-dd'); - const toDate = this.datePipe.transform(range.end, 'yyyy-MM-dd'); - - params = params.set('executedAt[after]', fromDate!); - params = params.set('executedAt[before]', toDate!); - } - const url = `${this.baseUrl}/traces`; this.http.get(url, { params }).subscribe( @@ -240,7 +232,6 @@ export class ClientTaskLogsComponent implements OnInit { this.loading = true; clientSearchCommandInput.value = null; clientSearchStatusInput.value = null; - this.dateRange.reset(); this.filters = {}; this.loadTraces(); }