mirror of https://github.com/MISP/MISP
chg: [eventMatrix] Added description of the cluster title and set
default score to 0pull/4309/head
parent
e4148a535c
commit
4daca2c4de
|
@ -4886,7 +4886,7 @@ class EventsController extends AppController
|
|||
}
|
||||
}
|
||||
$scores = $mergedScore;
|
||||
$maxScore = max(array_values($mergedScore));
|
||||
$maxScore = !empty($mergedScore) ? max(array_values($mergedScore)) : 0;
|
||||
}
|
||||
// end FIXME
|
||||
|
||||
|
|
|
@ -149,6 +149,8 @@ foreach($tabs as $tabName => $column):
|
|||
$score = empty($scores[$tagName]) ? 0 : $scores[$tagName];
|
||||
$clusterId = isset($cell['id']) ? $cell['id'] : $name;
|
||||
$externalId = isset($cell['external_id']) ? $cell['external_id'] : '';
|
||||
$shortDescription = isset($cell['description']) ? $cell['description'] : '';
|
||||
$shortDescription = strlen($shortDescription) > 1000 ? substr($shortDescription, 0, 1000) . '[...]' : $shortDescription;
|
||||
$clusetersNamesMapping[$clusterId] = $name . ($externalId !== '' ? ' (' . $externalId. ')' : '');
|
||||
|
||||
$td .= ' class="heatCell matrix-interaction ' . ($pickingMode ? 'cell-picking"' : '"');
|
||||
|
@ -160,7 +162,7 @@ foreach($tabs as $tabName => $column):
|
|||
$td .= ' data-target-type="attribute"';
|
||||
$td .= ' data-target-id="'.h($target_id).'"';
|
||||
}
|
||||
$td .= ' title="'.h($externalId).'"';
|
||||
$td .= ' title="' . h($externalId) . (strlen($shortDescription) > 0 ? ': ' . h($shortDescription) : '') . '"';
|
||||
$td .= '>' . h($name);
|
||||
|
||||
} else { // empty cell
|
||||
|
|
Loading…
Reference in New Issue