mirror of https://github.com/MISP/MISP
add: [enrichment] Fetching data fields from the view
parent
c87de816a8
commit
9b9ef64b1f
|
@ -2457,6 +2457,7 @@ function freetextImportResultsSubmit(id, count) {
|
|||
}
|
||||
|
||||
function moduleResultsSubmit(id) {
|
||||
var typesWithData = ['attachment', 'malware-sample'];
|
||||
var data_collected = {};
|
||||
var temp;
|
||||
if ($('.meta_table').length) {
|
||||
|
@ -2506,10 +2507,11 @@ function moduleResultsSubmit(id) {
|
|||
if ($(this).find('.ObjectAttribute').length) {
|
||||
var object_attributes = [];
|
||||
$(this).find('.ObjectAttribute').each(function(a) {
|
||||
var attribute_type = $(this).find('.AttributeType').text();
|
||||
attribute = {
|
||||
object_relation: $(this).find('.ObjectRelation').text(),
|
||||
category: $(this).find('.AttributeCategory').text(),
|
||||
type: $(this).find('.AttributeType').text(),
|
||||
type: attribute_type,
|
||||
value: $(this).find('.AttributeValue').text(),
|
||||
uuid: $(this).find('.AttributeUuid').text(),
|
||||
to_ids: $(this).find('.AttributeToIds')[0].checked,
|
||||
|
@ -2528,6 +2530,9 @@ function moduleResultsSubmit(id) {
|
|||
});
|
||||
attribute['Tag'] = tags;
|
||||
}
|
||||
if (typesWithData.indexOf(attribute_type) != -1 && $(this).find('.AttributeData').length) {
|
||||
attribute['data'] = $(this).find('.AttributeData').val();
|
||||
}
|
||||
object_attributes.push(attribute);
|
||||
});
|
||||
temp['Attribute'] = object_attributes;
|
||||
|
@ -2572,6 +2577,9 @@ function moduleResultsSubmit(id) {
|
|||
});
|
||||
temp['Tag'] = tags;
|
||||
}
|
||||
if (typesWithData.indexOf(type_value) != -1 && $(this).find('.AttributeData').length) {
|
||||
temp['data'] = $(this).find('.AttributeData').val();
|
||||
}
|
||||
attributes.push(temp);
|
||||
});
|
||||
data_collected['Attribute'] = attributes;
|
||||
|
|
Loading…
Reference in New Issue