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
testing/ogGui-multibranch/pipeline/head There was a failure building this commit
Details
parent
b55f15f16b
commit
cd45009751
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue