aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/about/components/AboutIssues.js
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2016-11-16 18:02:24 +0100
committerStas Vilchik <vilchiks@gmail.com>2016-11-16 18:09:28 +0100
commit3fbca710166bc435d3c957088e253044a1588e9e (patch)
tree2048aea7cfa4036642eb1bfde9afe60ff0c1f91f /server/sonar-web/src/main/js/apps/about/components/AboutIssues.js
parentce59355081e759025cd0426ac8e315c603c2272b (diff)
downloadsonarqube-3fbca710166bc435d3c957088e253044a1588e9e.tar.gz
sonarqube-3fbca710166bc435d3c957088e253044a1588e9e.zip
SONAR-8382 apply feedback
Diffstat (limited to 'server/sonar-web/src/main/js/apps/about/components/AboutIssues.js')
-rw-r--r--server/sonar-web/src/main/js/apps/about/components/AboutIssues.js34
1 files changed, 22 insertions, 12 deletions
diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutIssues.js b/server/sonar-web/src/main/js/apps/about/components/AboutIssues.js
index d097d4bca08..f762de45f26 100644
--- a/server/sonar-web/src/main/js/apps/about/components/AboutIssues.js
+++ b/server/sonar-web/src/main/js/apps/about/components/AboutIssues.js
@@ -29,38 +29,48 @@ export default class AboutIssues extends React.Component {
};
render () {
+ const displayNumbers = this.props.bugs > 0 || this.props.vulnerabilities > 0 || this.props.codeSmells > 0;
+
return (
<div className="about-page-section about-page-section-gray">
<div className="about-page-container">
<h2 className="about-page-header text-center">Track incoming issues using the SonarQube Quality Model</h2>
<div className="about-page-issues">
<div className="about-page-issues-box">
- <a className="about-page-issues-number" href={getIssuesUrl({ resolved: false, types: 'BUG' })}>
- {formatMeasure(this.props.bugs, 'SHORT_INT')}
- </a>
+ {displayNumbers && (
+ <a className="about-page-issues-number"
+ href={getIssuesUrl({ resolved: false, types: 'BUG' })}>
+ {formatMeasure(this.props.bugs, 'SHORT_INT')}
+ </a>
+ )}
<div className="about-page-issues-description">
<h3 className="about-page-issues-header">Bugs</h3>
<p className="about-page-issues-text">
- Bugs track code that is demonstrably wrong or highly likely to be yielding unexpected behavior.
+ Bugs track code that is demonstrably wrong or highly likely to yield unexpected behavior.
</p>
</div>
</div>
<div className="about-page-issues-box">
- <a className="about-page-issues-number"
- href={getIssuesUrl({ resolved: false, types: 'VULNERABILITY' })}>
- {formatMeasure(this.props.vulnerabilities, 'SHORT_INT')}
- </a>
+ {displayNumbers && (
+ <a className="about-page-issues-number"
+ href={getIssuesUrl({ resolved: false, types: 'VULNERABILITY' })}>
+ {formatMeasure(this.props.vulnerabilities, 'SHORT_INT')}
+ </a>
+ )}
<div className="about-page-issues-description">
<h3 className="about-page-issues-header">Vulnerabilities</h3>
<p className="about-page-issues-text">
- Vulnerabilities are raised on code that potentially vulnerable to exploitation by hackers.
+ Vulnerabilities are raised on code that is potentially vulnerable to exploitation by hackers.
</p>
</div>
</div>
<div className="about-page-issues-box">
- <a className="about-page-issues-number" href={getIssuesUrl({ resolved: false, types: 'CODE_SMELL' })}>
- {formatMeasure(this.props.codeSmells, 'SHORT_INT')}
- </a>
+ {displayNumbers && (
+ <a className="about-page-issues-number"
+ href={getIssuesUrl({ resolved: false, types: 'CODE_SMELL' })}>
+ {formatMeasure(this.props.codeSmells, 'SHORT_INT')}
+ </a>
+ )}
<div className="about-page-issues-description">
<h3 className="about-page-issues-header">Code Smells</h3>
<p className="about-page-issues-text">