mirror of https://github.com/MISP/MISP
Merge branch '2.4' of github.com:MISP/MISP into 2.4
commit
11df6ef401
|
@ -26,7 +26,7 @@ class EventsController extends AppController
|
|||
);
|
||||
|
||||
private $acceptedFilteringNamedParams = array('sort', 'direction', 'focus', 'extended', 'overrideLimit', 'filterColumnsOverwrite', 'attributeFilter', 'extended', 'page',
|
||||
'searchFor', 'attributeFilter', 'proposal', 'correlation', 'warning', 'deleted', 'includeRelatedTags', 'distribution', 'taggedAttributes', 'galaxyAttachedAttributes', 'objectType', 'attributeType', 'focus', 'extended', 'overrideLimit', 'filterColumnsOverwrite', 'feed', 'server', 'toIDS'
|
||||
'searchFor', 'proposal', 'correlation', 'warning', 'deleted', 'includeRelatedTags', 'distribution', 'taggedAttributes', 'galaxyAttachedAttributes', 'objectType', 'attributeType', 'focus', 'extended', 'overrideLimit', 'filterColumnsOverwrite', 'feed', 'server', 'toIDS'
|
||||
);
|
||||
|
||||
public $defaultFilteringRules = array(
|
||||
|
@ -5038,7 +5038,11 @@ class EventsController extends AppController
|
|||
|
||||
private function __queryEnrichment($attribute, $module, $options, $type)
|
||||
{
|
||||
$data = array('module' => $module, 'attribute' => $attribute[0]['Attribute'], 'event_id' => $attribute[0]['Event']['id']);
|
||||
if ($this->Event->Attribute->typeIsAttachment($attribute[0]['Attribute']['type'])) {
|
||||
$attribute[0]['Attribute']['data'] = $this->Event->Attribute->base64EncodeAttachment($attribute[0]['Attribute']);
|
||||
}
|
||||
$event_id = $attribute[0]['Event']['id'];
|
||||
$data = array('module' => $module, 'attribute' => $attribute[0]['Attribute'], 'event_id' => $event_id);
|
||||
if (!empty($options)) {
|
||||
$data['config'] = $options;
|
||||
}
|
||||
|
@ -5053,6 +5057,21 @@ class EventsController extends AppController
|
|||
if (!is_array($result)) {
|
||||
throw new Exception($result);
|
||||
}
|
||||
$attributes = array();
|
||||
$objects = array();
|
||||
if (isset($result['results']['Attribute']) && !empty($result['results']['Attribute'])) {
|
||||
foreach ($result['results']['Attribute'] as $tmp_attribute) {
|
||||
array_push($attributes, $this->Event->Attribute->captureAttribute($tmp_attribute, $event_id, $this->Auth->user()));
|
||||
}
|
||||
unset($result['results']['Attribute']);
|
||||
}
|
||||
if (isset($result['results']['Object']) && !empty($result['results']['Object'])) {
|
||||
foreach ($result['results']['Object'] as $tmp_object) {
|
||||
$this->Event->Object->captureObject($tmp_object, $event_id, $this->Auth->user());
|
||||
array_push($objects, $tmp_object);
|
||||
}
|
||||
unset($result['results']['Object']);
|
||||
}
|
||||
// MORE MAGIC TO COME
|
||||
}
|
||||
|
||||
|
|
|
@ -3010,12 +3010,12 @@ function syncUserSelected() {
|
|||
}
|
||||
|
||||
function filterAttributes(filter, id) {
|
||||
url = "/events/viewEventAttributes/" + id + "/attributeFilter:" + filter;
|
||||
url = "/events/viewEventAttributes/" + id;
|
||||
if(filter === 'value'){
|
||||
filter = $('#quickFilterField').val().trim();
|
||||
url += filter.length > 0 ? "/searchFor:" + filter : "";
|
||||
} else if(filter !== 'all') {
|
||||
url += "/filterColumnsOverwrite:" + filter;
|
||||
url += "/attributeFilter:" + filter
|
||||
filter = $('#quickFilterField').val().trim();
|
||||
url += filter.length > 0 ? "/searchFor:" + filter : "";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue