aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/about/components/AboutStandards.js
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2017-03-28 16:42:37 +0200
committerStas Vilchik <stas-vilchik@users.noreply.github.com>2017-04-03 10:38:52 +0200
commitadb4265900d35345f8d900dca47cc6c2f490cb21 (patch)
tree1a3e27f58ff84c51cccd3f36d6a13ce2eec26c24 /server/sonar-web/src/main/js/apps/about/components/AboutStandards.js
parent32a73efa05cb12056a93f08b9124e647213f1f02 (diff)
downloadsonarqube-adb4265900d35345f8d900dca47cc6c2f490cb21.tar.gz
sonarqube-adb4265900d35345f8d900dca47cc6c2f490cb21.zip
SONAR-9005 support rules for organizations
Diffstat (limited to 'server/sonar-web/src/main/js/apps/about/components/AboutStandards.js')
-rw-r--r--server/sonar-web/src/main/js/apps/about/components/AboutStandards.js26
1 files changed, 19 insertions, 7 deletions
diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutStandards.js b/server/sonar-web/src/main/js/apps/about/components/AboutStandards.js
index 295fabe38df..a2991500f31 100644
--- a/server/sonar-web/src/main/js/apps/about/components/AboutStandards.js
+++ b/server/sonar-web/src/main/js/apps/about/components/AboutStandards.js
@@ -27,9 +27,21 @@ const link = 'https://redirect.sonarsource.com/doc/rules.html';
const owaspTags = 'owasp-a1,owasp-a2,owasp-a3,owasp-a4,owasp-a5,' +
'owasp-a6,owasp-a7,owasp-a8,owasp-a9,owasp-a10';
+const sans25Tags = 'sans-top25-porous,sans-top25-risky,sans-top25-insecure';
export default class AboutStandards extends React.Component {
+ props: {
+ appState: {
+ defaultOrganization: string,
+ organizationsEnabled: boolean
+ }
+ };
+
render() {
+ const organization = this.props.appState.organizationsEnabled
+ ? this.props.appState.defaultOrganization
+ : null;
+
return (
<div className="boxed-group">
<h2>{translate('about_page.standards')}</h2>
@@ -39,34 +51,34 @@ export default class AboutStandards extends React.Component {
<div className="spacer-top">
<ul className="list-inline">
<li>
- <Link to={getRulesUrl({ tags: 'misra' })} className="link-with-icon">
+ <Link to={getRulesUrl({ tags: 'misra' }, organization)} className="link-with-icon">
<i className="icon-tags" />
<span className="little-spacer-left">MISRA</span>
</Link>
</li>
<li>
- <Link to={getRulesUrl({ tags: 'cert' })} className="link-with-icon">
+ <Link to={getRulesUrl({ tags: 'cert' }, organization)} className="link-with-icon">
<i className="icon-tags" />
<span className="little-spacer-left">CERT</span>
</Link>
</li>
<li>
- <Link to={getRulesUrl({ tags: 'cwe' })} className="link-with-icon">
+ <Link to={getRulesUrl({ tags: 'cwe' }, organization)} className="link-with-icon">
<i className="icon-tags" />
<span className="little-spacer-left">CWE</span>
</Link>
</li>
<li>
- <Link to={getRulesUrl({ tags: owaspTags })} className="link-with-icon">
+ <Link
+ to={getRulesUrl({ tags: owaspTags }, organization)}
+ className="link-with-icon">
<i className="icon-tags" />
<span className="little-spacer-left">OWASP Top 10</span>
</Link>
</li>
<li>
<Link
- to={getRulesUrl({
- tags: 'sans-top25-porous,sans-top25-risky,sans-top25-insecure'
- })}
+ to={getRulesUrl({ tags: sans25Tags }, organization)}
className="link-with-icon">
<i className="icon-tags" />
<span className="little-spacer-left">SANS Top 25</span>