mirror of https://github.com/MISP/MISP
add: [enrichment] Added MISP Objects distribution in the view
parent
fcca264eb7
commit
590a18656d
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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'])) { ?>
|
||||
|
|
Loading…
Reference in New Issue