refs #2049 Improve date validation and update parameter naming in task logs
testing/ogGui-multibranch/pipeline/head There was a failure building this commit Details

pull/24/head
Lucas Lara García 2025-05-20 16:20:05 +02:00
parent b55f15f16b
commit cd45009751
2 changed files with 12 additions and 8 deletions

View File

@ -44,15 +44,10 @@ table {
display: flex;
justify-content: space-between;
align-items: center;
margin: 1.5rem 0rem 1.5rem 0rem;
margin: 1.5rem 0rem 0.5rem 0rem;
box-sizing: border-box;
}
.search-string {
flex: 1;
padding: 5px;
}
.search-boolean {
flex: 1;
padding: 5px;
@ -63,6 +58,11 @@ table {
padding: 5px;
}
.search-date {
flex: 1;
padding: 5px;
}
.mat-elevation-z8 {
box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.2);
}

View File

@ -148,6 +148,10 @@ export class ClientTaskLogsComponent implements OnInit {
const start = this.filters['startDate'];
const end = this.filters['endDate'];
if (!start || !end) {
return;
}
if (start && end && start > end) {
this.toastService.warning('La fecha de inicio no puede ser mayor que la fecha de fin');
return;
@ -204,11 +208,11 @@ export class ClientTaskLogsComponent implements OnInit {
};
if (params['startDate']) {
params['executed_at[after]'] = this.datePipe.transform(params['startDate'], 'yyyy-MM-dd');
params['executedAt[after]'] = this.datePipe.transform(params['startDate'], 'yyyy-MM-dd');
delete params['startDate'];
}
if (params['endDate']) {
params['executed_at[before]'] = this.datePipe.transform(params['endDate'], 'yyyy-MM-dd');
params['executedAt[before]'] = this.datePipe.transform(params['endDate'], 'yyyy-MM-dd');
delete params['endDate'];
}
console.log('🌐 GET', `${this.baseUrl}/traces`, params);