mirror of https://github.com/MISP/MISP
chg: [logs:search] Added support of JSON return format
parent
63d6669dea
commit
f038fca803
|
@ -349,21 +349,25 @@ class LogsController extends AppController
|
|||
}
|
||||
$this->set('list', $list);
|
||||
|
||||
// and store into session
|
||||
$this->Session->write('paginate_conditions_log', $this->paginate);
|
||||
$this->Session->write('paginate_conditions_log_email', $filters['email']);
|
||||
$this->Session->write('paginate_conditions_log_org', $filters['org']);
|
||||
$this->Session->write('paginate_conditions_log_action', $filters['action']);
|
||||
$this->Session->write('paginate_conditions_log_model', $filters['model']);
|
||||
$this->Session->write('paginate_conditions_log_model_id', $filters['model_id']);
|
||||
$this->Session->write('paginate_conditions_log_title', $filters['title']);
|
||||
$this->Session->write('paginate_conditions_log_change', $filters['change']);
|
||||
if (Configure::read('MISP.log_client_ip')) {
|
||||
$this->Session->write('paginate_conditions_log_ip', $filters['ip']);
|
||||
}
|
||||
if ($this->_isRest()) {
|
||||
return $this->RestResponse->viewData($list, $this->response->type());
|
||||
} else {
|
||||
// and store into session
|
||||
$this->Session->write('paginate_conditions_log', $this->paginate);
|
||||
$this->Session->write('paginate_conditions_log_email', $filters['email']);
|
||||
$this->Session->write('paginate_conditions_log_org', $filters['org']);
|
||||
$this->Session->write('paginate_conditions_log_action', $filters['action']);
|
||||
$this->Session->write('paginate_conditions_log_model', $filters['model']);
|
||||
$this->Session->write('paginate_conditions_log_model_id', $filters['model_id']);
|
||||
$this->Session->write('paginate_conditions_log_title', $filters['title']);
|
||||
$this->Session->write('paginate_conditions_log_change', $filters['change']);
|
||||
if (Configure::read('MISP.log_client_ip')) {
|
||||
$this->Session->write('paginate_conditions_log_ip', $filters['ip']);
|
||||
}
|
||||
|
||||
// set the same view as the index page
|
||||
$this->render('admin_index');
|
||||
// set the same view as the index page
|
||||
$this->render('admin_index');
|
||||
}
|
||||
} else {
|
||||
// get from Session
|
||||
$filters['email'] = $this->Session->read('paginate_conditions_log_email');
|
||||
|
|
Loading…
Reference in New Issue