Skip to content

Commit

Permalink
switches revert field
Browse files Browse the repository at this point in the history
  • Loading branch information
dplumlee committed Jan 5, 2021
1 parent 1ce59c6 commit 724b666
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ describe('helpers', () => {
const wrapper = shallow<React.ReactElement>(result[0].description as React.ReactElement);
expect(result[0].title).toEqual('Mitre Attack');
expect(wrapper.find('[data-test-subj="threatTacticLink"]').text()).toEqual(
i18n.UNKNOWN_TACTIC
'Collection (TA000999)'
);
expect(wrapper.find('[data-test-subj="threatTechniqueLink"]').text()).toEqual(
'Audio Capture (T1123)'
Expand All @@ -237,7 +237,7 @@ describe('helpers', () => {
'Collection (TA0009)'
);
expect(wrapper.find('[data-test-subj="threatTechniqueLink"]').text()).toEqual(
i18n.UNKNOWN_TECHNIQUE
'Audio Capture (T1123456)'
);
});

Expand Down Expand Up @@ -270,7 +270,7 @@ describe('helpers', () => {
'Audio Capture (T1123)'
);
expect(wrapper.find('[data-test-subj="threatSubtechniqueLink"]').text()).toEqual(
i18n.UNKNOWN_SUBTECHNIQUE
'Audio Capture Data (T1123.000123)'
);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ export const buildThreatDescription = ({ label, threat }: BuildThreatDescription
href={singleThreat.tactic.reference}
target="_blank"
>
{tactic != null ? tactic.text : i18n.UNKNOWN_TACTIC}
{tactic != null
? tactic.text
: `${singleThreat.tactic.name} (${singleThreat.tactic.id})`}
</EuiLink>
<EuiFlexGroup gutterSize="none" alignItems="flexStart" direction="column">
{singleThreat.technique.map((technique, techniqueIndex) => {
Expand All @@ -165,7 +167,9 @@ export const buildThreatDescription = ({ label, threat }: BuildThreatDescription
iconType={ListTreeIcon}
size="xs"
>
{myTechnique != null ? myTechnique.label : i18n.UNKNOWN_TECHNIQUE}
{myTechnique != null
? myTechnique.label
: `${technique.name} (${technique.id})`}
</TechniqueLinkItem>
<EuiFlexGroup gutterSize="none" alignItems="flexStart" direction="column">
{technique.subtechnique != null &&
Expand All @@ -186,7 +190,7 @@ export const buildThreatDescription = ({ label, threat }: BuildThreatDescription
>
{mySubtechnique != null
? mySubtechnique.label
: i18n.UNKNOWN_SUBTECHNIQUE}
: `${subtechnique.name} (${subtechnique.id})`}
</TechniqueLinkItem>
</SubtechniqueFlexItem>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,24 +96,3 @@ export const THRESHOLD_RESULTS_AGGREGATED_BY = i18n.translate(
defaultMessage: 'Results aggregated by',
}
);

export const UNKNOWN_TACTIC = i18n.translate(
'xpack.securitySolution.detectionEngine.ruleDescription.unknownTactic',
{
defaultMessage: 'Unknown Tactic',
}
);

export const UNKNOWN_TECHNIQUE = i18n.translate(
'xpack.securitySolution.detectionEngine.ruleDescription.unknownTechnique',
{
defaultMessage: 'Unknown Technique',
}
);

export const UNKNOWN_SUBTECHNIQUE = i18n.translate(
'xpack.securitySolution.detectionEngine.ruleDescription.unknownSubtechnique',
{
defaultMessage: 'Unknown Subtechnique',
}
);

0 comments on commit 724b666

Please sign in to comment.