diff --git a/src/app/Dashboard/AutomatedAnalysis/AutomatedAnalysisCardList.tsx b/src/app/Dashboard/AutomatedAnalysis/AutomatedAnalysisCardList.tsx index 1153d418d..0a632a391 100644 --- a/src/app/Dashboard/AutomatedAnalysis/AutomatedAnalysisCardList.tsx +++ b/src/app/Dashboard/AutomatedAnalysis/AutomatedAnalysisCardList.tsx @@ -59,6 +59,7 @@ import { } from '@patternfly/react-table'; import * as React from 'react'; import { useTranslation } from 'react-i18next'; +import { transformAADescription } from '../dashboard-utils'; export interface AutomatedAnalysisCardListProps { evaluations: CategorizedRuleEvaluations[]; @@ -141,14 +142,14 @@ export const AutomatedAnalysisCardList: React.FC {t('SCORE', { ns: 'common' })} - {t('DESCRIPTION', { ns: 'common' })} + {t('DESCRIPTION', { ns: 'common' })} {flatFiltered.map((evaluation) => { return ( - + {evaluation.name} @@ -161,7 +162,9 @@ export const AutomatedAnalysisCardList: React.FC {icon(evaluation.score)} - {evaluation.description} + + {transformAADescription(evaluation.description)} + ); })} diff --git a/src/app/Dashboard/AutomatedAnalysis/ClickableAutomatedAnalysisLabel.tsx b/src/app/Dashboard/AutomatedAnalysis/ClickableAutomatedAnalysisLabel.tsx index 376b4a6ea..264b64266 100644 --- a/src/app/Dashboard/AutomatedAnalysis/ClickableAutomatedAnalysisLabel.tsx +++ b/src/app/Dashboard/AutomatedAnalysis/ClickableAutomatedAnalysisLabel.tsx @@ -39,11 +39,12 @@ import { AutomatedAnalysisScore, RuleEvaluation } from '@app/Shared/Services/Report.service'; import { portalRoot } from '@app/utils/utils'; import { Label, LabelProps, Popover } from '@patternfly/react-core'; -import { InfoCircleIcon } from '@patternfly/react-icons'; +import { CheckCircleIcon, ExclamationCircleIcon, InfoCircleIcon, WarningTriangleIcon } from '@patternfly/react-icons'; import { css } from '@patternfly/react-styles'; import popoverStyles from '@patternfly/react-styles/css/components/Popover/popover'; import React from 'react'; import { useTranslation } from 'react-i18next'; +import { transformAADescription } from '../dashboard-utils'; export interface ClickableAutomatedAnalysisLabelProps { label: RuleEvaluation; @@ -92,6 +93,18 @@ export const ClickableAutomatedAnalysisLabel: React.FunctionComponent { + return label.score == AutomatedAnalysisScore.NA_SCORE ? ( + + ) : label.score < AutomatedAnalysisScore.ORANGE_SCORE_THRESHOLD ? ( + + ) : label.score < AutomatedAnalysisScore.RED_SCORE_THRESHOLD ? ( + + ) : ( + + ); + }, [label.score]); + return ( {label.score == AutomatedAnalysisScore.NA_SCORE ? 'N/A' : label.score.toFixed(1)}

-

{label.description}

+ {transformAADescription(label.description)} } appendTo={portalRoot} >