Skip to content

Commit

Permalink
[frontend] Fix attack patterns matrix columns sorting by score (#8424)
Browse files Browse the repository at this point in the history
  • Loading branch information
SouadHadjiat committed Sep 20, 2024
1 parent 68efd7f commit 8d96bd4
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,11 @@ class AttackPatternsMatrixColumnsComponent extends Component {
R.values,
)(selectedPatterns),
);
const killChains = R.sortBy(R.prop('name'), R.uniq(data.attackPatternsMatrix.attackPatternsOfPhases.map((a) => a.kill_chain_name)));
const killChains = R.uniq(data.attackPatternsMatrix.attackPatternsOfPhases.map((a) => a.kill_chain_name))
.sort((a, b) => a.localeCompare(b));
const attackPatternsOfPhases = data.attackPatternsMatrix.attackPatternsOfPhases
.filter((a) => a.kill_chain_name === this.state.currentKillChain)
.sort((a, b) => a.x_opencti_order - b.x_opencti_order)
.map((a) => {
return {
...a,
Expand Down

0 comments on commit 8d96bd4

Please sign in to comment.