From 9d970955653cd7b3635fcc14ce7bbc7b04cb5f16 Mon Sep 17 00:00:00 2001 From: Mathieu Suen Date: Tue, 28 Jun 2022 17:58:57 +0200 Subject: SONAR-16519 Fix rules page removing external notification --- server/sonar-web/src/main/js/api/mocks/CodingRulesMock.ts | 1 + .../main/js/apps/coding-rules/components/RuleDetailsDescription.tsx | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/server/sonar-web/src/main/js/api/mocks/CodingRulesMock.ts b/server/sonar-web/src/main/js/api/mocks/CodingRulesMock.ts index 5214c7e0bb2..f48587748d6 100644 --- a/server/sonar-web/src/main/js/api/mocks/CodingRulesMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/CodingRulesMock.ts @@ -120,6 +120,7 @@ export default class CodingRulesMock { lang: 'py', langName: 'Python', name: 'Bad Python rule', + isExternal: true, descriptionSections: undefined }) ]; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsDescription.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsDescription.tsx index 3ccee3eec6d..e8d5d4dcae6 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsDescription.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsDescription.tsx @@ -213,9 +213,9 @@ export default class RuleDetailsDescription extends React.PureComponent )} - {hasDescriptionSection && !defaultSection ? ( - - ) : ( + {hasDescriptionSection && !defaultSection && } + + {ruleDetails.isExternal && (
{translateWithParameters('issue.external_issue_description', ruleDetails.name)}
-- cgit v1.2.3