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 committed Oct 25, 2024
1 parent d03b23a commit a7f9559
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 a7f9559

Please sign in to comment.