mirror of https://github.com/MISP/MISP
fix: [UI] Correlation for attributes
parent
881e151ddc
commit
1519afb488
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
if (!empty($event['Related' . $scope][$object['id']])) {
|
||||
$i = 0;
|
||||
$linkColour = ($scope == 'Attribute') ? 'red' : 'white';
|
||||
$linkColour = $scope === 'Attribute' ? 'red' : 'white';
|
||||
$withPivot = isset($withPivot) ? $withPivot : false;
|
||||
// remove duplicates
|
||||
$relatedEvents = array();
|
||||
|
@ -15,16 +15,16 @@
|
|||
$count = count($event['Related' . $scope][$object['id']]);
|
||||
foreach ($event['Related' . $scope][$object['id']] as $relatedAttribute) {
|
||||
if ($i == 4 && $count > 5) {
|
||||
$expandButton = __('Show %s more...', $count - 4);
|
||||
$expandButton = __('Show %s more…', $count - 4);
|
||||
echo sprintf(
|
||||
'<li class="no-side-padding correlation-expand-button useCursorPointer linkButton %s">%s</li>',
|
||||
'<li class="no-side-padding correlation-expand-button useCursorPointer linkButton %s">%s</li> ',
|
||||
$linkColour,
|
||||
$expandButton
|
||||
);
|
||||
}
|
||||
$relatedData = array(
|
||||
'Orgc' => !empty($orgTable[$relatedAttribute['org_id']]) ? $orgTable[$relatedAttribute['org_id']] : 'N/A',
|
||||
'Date' => isset($relatedAttribute['date']) ? $relatedAttribute['date'] : 'N/A',
|
||||
'Orgc' => $orgTable[$relatedAttribute['org_id']] ?? 'N/A',
|
||||
'Date' => $relatedAttribute['date'] ?? 'N/A',
|
||||
'Event' => $relatedAttribute['info'],
|
||||
'Correlating Value' => $relatedAttribute['value']
|
||||
);
|
||||
|
@ -59,13 +59,13 @@
|
|||
}
|
||||
if (!empty($object['correlation_exclusion'])) {
|
||||
echo sprintf(
|
||||
'<span class="bold red" title="%s">%s</span> ',
|
||||
'<span class="red" title="%s">%s</span> ',
|
||||
__('The attribute value matches a correlation exclusion rule defined by a site-administrator for this instance. Click the magnifying glass to search for all occurrences of the value.'),
|
||||
__('Excluded.')
|
||||
);
|
||||
} else if (!empty($object['over_correlation'])) {
|
||||
echo sprintf(
|
||||
'<span class="bold red" title="%s">%s</span> ',
|
||||
'<span class="red" title="%s">%s</span> ',
|
||||
__('The instance threshold for the maximum number of correlations for the given attribute value has been exceeded. Click the magnifying glass to search for all occurrences of the value.'),
|
||||
__('Too many correlations.')
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue