chg: [logs:index] Allow to filter based on the created field in the UI

pull/8673/head
Sami Mokaddem 2022-10-14 15:30:00 +02:00
parent d63846c237
commit dccfc58a6c
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 3 additions and 0 deletions

View File

@ -101,6 +101,9 @@ class LogsController extends AppController
$this->paginate['conditions']['Log.action'] = $validFilters[$this->params['named']['filter']]['values'];
}
foreach ($filters as $key => $value) {
if ($key === 'created') {
$key = 'created >=';
}
$this->paginate['conditions']["Log.$key"] = $value;
}
$this->set('validFilters', $validFilters);