add: [enrichment] Added MISP Objects distribution in the view

pull/4419/head
chrisr3d 2019-04-03 22:44:21 +02:00
parent fcca264eb7
commit 590a18656d
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
2 changed files with 26 additions and 0 deletions

View File

@ -5105,6 +5105,11 @@ class EventsController extends AppController
}
if (isset($result['results']['Object']) && !empty($result['results']['Object'])) {
foreach ($result['results']['Object'] as $tmp_object) {
if (!isset($tmp_object['distribution'])) {
$tmp_object['distribution'] = $defaultDistribution;
} else {
$tmp_object['distribution'] = (int)$tmp_object['distribution'];
}
foreach ($tmp_object['Attribute'] as &$tmp_attribute) {
$tmp_attribute = $this->__fillAttribute($tmp_attribute, $defaultDistribution);
}

View File

@ -46,6 +46,27 @@
<td class="bold"><?php echo __('UUID');?></td>
<td class='ObjectUUID'><?php echo h($object['uuid']); ?></td>
</tr>
<tr>
<td class="bold"><?php echo __('Distribution');?></td>
<td style="width:60px;text-align:center;">
<select class='ObjectDistribution' style='padding:0px;height:20px;margin-bottom:0px;'>
<?php
foreach ($distributions as $distKey => $distValue) {
echo '<option value="' . $distKey . '" ' . ($distKey == $object['distribution'] ? 'selected="selected"' : '') . '>' . $distValue . '</option>';
}
?>
</select>
</td>
<div style="display:none;">
<select class='ObjectSharingGroup' style='padding:0px;height:20px;margin-top:3px;margin-bottom:0px;'>
<?php
foreach ($sgs as $sgKey => $sgValue) {
echo '<option value="' . h($sgKey) . '">' . h($sgValue) . '</option>';
}
?>
</select>
</div>
</tr>
</tbody>
</table>
<?php if (isset($object['ObjectReference']) && !empty($object['ObjectReference'])) { ?>