mirror of https://github.com/MISP/MISP
chg: [workflows:index] Link to view workflow execution results
parent
8ce148effb
commit
14ff17a6e8
|
@ -30,17 +30,17 @@ class LogsController extends AppController
|
|||
|
||||
public function admin_index()
|
||||
{
|
||||
$paramArray = array('id', 'title', 'created', 'model', 'model_id', 'action', 'user_id', 'change', 'email', 'org', 'description', 'ip');
|
||||
$filterData = array(
|
||||
'request' => $this->request,
|
||||
'named_params' => $this->params['named'],
|
||||
'paramArray' => $paramArray,
|
||||
'ordered_url_params' => func_get_args()
|
||||
);
|
||||
$exception = false;
|
||||
$filters = $this->_harvestParameters($filterData, $exception);
|
||||
unset($filterData);
|
||||
if ($this->_isRest()) {
|
||||
$paramArray = array('id', 'title', 'created', 'model', 'model_id', 'action', 'user_id', 'change', 'email', 'org', 'description', 'ip');
|
||||
$filterData = array(
|
||||
'request' => $this->request,
|
||||
'named_params' => $this->params['named'],
|
||||
'paramArray' => $paramArray,
|
||||
'ordered_url_params' => func_get_args()
|
||||
);
|
||||
$exception = false;
|
||||
$filters = $this->_harvestParameters($filterData, $exception);
|
||||
unset($filterData);
|
||||
if ($filters === false) {
|
||||
return $exception;
|
||||
}
|
||||
|
@ -100,6 +100,9 @@ class LogsController extends AppController
|
|||
if (isset($this->params['named']['filter']) && in_array($this->params['named']['filter'], array_keys($validFilters))) {
|
||||
$this->paginate['conditions']['Log.action'] = $validFilters[$this->params['named']['filter']]['values'];
|
||||
}
|
||||
foreach ($filters as $key => $value) {
|
||||
$this->paginate['conditions']["Log.$key"] = $value;
|
||||
}
|
||||
$this->set('validFilters', $validFilters);
|
||||
$this->set('filter', isset($this->params['named']['filter']) ? $this->params['named']['filter'] : false);
|
||||
$this->set('list', $this->paginate());
|
||||
|
|
|
@ -82,12 +82,25 @@
|
|||
),
|
||||
],
|
||||
[
|
||||
'title' => __('Edit associated workflows'),
|
||||
'url' => $baseurl . '/workflows/editor',
|
||||
'url_params_data_paths' => ['id'],
|
||||
'icon' => 'code',
|
||||
'dbclickAction' => true,
|
||||
],
|
||||
[
|
||||
'title' => __('View execution logs'),
|
||||
'url' => $baseurl . '/admin/logs/index/model:Workflow/action:execute_workflow',
|
||||
'url_named_params_data_paths' => ['model_id' => 'Workflow.id'],
|
||||
'icon' => 'list-alt',
|
||||
'complex_requirement' => [
|
||||
'function' => function ($row, $options) {
|
||||
return !empty($row['Workflow']);
|
||||
},
|
||||
],
|
||||
],
|
||||
[
|
||||
'title' => __('View trigger details'),
|
||||
'url' => $baseurl . '/workflows/moduleView',
|
||||
'url_params_data_paths' => ['id'],
|
||||
'icon' => 'eye',
|
||||
|
|
Loading…
Reference in New Issue