chg: [eventMatrix] Added description of the cluster title and set

default score to 0
pull/4309/head
mokaddem 2019-02-26 09:07:21 +01:00
parent e4148a535c
commit 4daca2c4de
2 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -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