Skip to content

Commit

Permalink
[frontend] Fix mitre matrix expectation color (#1670)
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumejparis authored and Dimfacion committed Oct 27, 2024
1 parent 92e91d6 commit 0e2e2dc
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ const AttackPatternBox: FunctionComponent<AttackPatternBoxProps> = ({
if (aggregation.includes('FAILED')) {
return 'FAILED';
}
if (aggregation.includes('PARTIAL')) {
return 'PARTIAL';
}
if (aggregation.includes('PENDING')) {
return 'PENDING';
}
Expand All @@ -95,7 +98,7 @@ const AttackPatternBox: FunctionComponent<AttackPatternBoxProps> = ({
const aggregatedPrevention = (results ?? []).map((result) => result.results?.filter((r) => r.type === 'PREVENTION').map((r) => r.avgResult)).flat();
const aggregatedDetection = (results ?? []).map((result) => result.results?.filter((r) => r.type === 'DETECTION').map((r) => r.avgResult)).flat();
const aggregatedHumanResponse = (results ?? []).map((result) => result.results?.filter((r) => r.type === 'HUMAN_RESPONSE').map((r) => r.avgResult)).flat();
const aggregatedResults : ExpectationResultsByType[] = [
const aggregatedResults: ExpectationResultsByType[] = [
{
type: 'PREVENTION',
avgResult: lowestSelector(aggregatedPrevention),
Expand Down

0 comments on commit 0e2e2dc

Please sign in to comment.