aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathieu Suen <mathieu.suen@sonarsource.com>2022-06-28 17:58:57 +0200
committersonartech <sonartech@sonarsource.com>2022-06-29 20:03:16 +0000
commit9d970955653cd7b3635fcc14ce7bbc7b04cb5f16 (patch)
treeb3c90cec3dc56651e472ffe82814b372ed265868
parenta5cdbef3659bb0c7ac30ff356fcd2834b3718eaf (diff)
downloadsonarqube-9d970955653cd7b3635fcc14ce7bbc7b04cb5f16.tar.gz
sonarqube-9d970955653cd7b3635fcc14ce7bbc7b04cb5f16.zip
SONAR-16519 Fix rules page removing external notification
-rw-r--r--server/sonar-web/src/main/js/api/mocks/CodingRulesMock.ts1
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsDescription.tsx6
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<Props, S
/>
)}
- {hasDescriptionSection && !defaultSection ? (
- <RuleTabViewer ruleDetails={ruleDetails} />
- ) : (
+ {hasDescriptionSection && !defaultSection && <RuleTabViewer ruleDetails={ruleDetails} />}
+
+ {ruleDetails.isExternal && (
<div className="coding-rules-detail-description rule-desc markdown">
{translateWithParameters('issue.external_issue_description', ruleDetails.name)}
</div>