diff options
Diffstat (limited to 'server/sonar-web/src')
4 files changed, 34 insertions, 20 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"> diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutProjects.js b/server/sonar-web/src/main/js/apps/about/components/AboutProjects.js index d79982b5c8a..af7852bb772 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutProjects.js +++ b/server/sonar-web/src/main/js/apps/about/components/AboutProjects.js @@ -18,7 +18,6 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; -import { Link } from 'react-router'; import { formatMeasure } from '../../../helpers/measures'; export default class AboutProjects extends React.Component { @@ -33,7 +32,7 @@ export default class AboutProjects extends React.Component { return ( <div className="about-page-text"> {count > 0 ? ( - <Link to="/projects">{label}</Link> + <a href={window.baseUrl + '/projects'}>{label}</a> ) : 'Put your projects'} {' '} under continuous<br/>code quality management diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutScanners.js b/server/sonar-web/src/main/js/apps/about/components/AboutScanners.js index 2ae938b32ca..efc5d092a21 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutScanners.js +++ b/server/sonar-web/src/main/js/apps/about/components/AboutScanners.js @@ -41,7 +41,8 @@ export default class AboutScanners extends React.Component { alt="SonarQube Scanner"/> </div> <p className="about-page-text"> - This Java-based command-line tool can analyze any languages SonarQube supports. + The SonarQube Scanner is a Java-based command-line tool that can analyze any languages SonarQube + supports. </p> <div className="big-spacer-top"> <a className="about-page-link-more" href={links.sonarqube} target="_blank"> @@ -56,8 +57,8 @@ export default class AboutScanners extends React.Component { alt="SonarQube Scanner for MSBuild"/> </div> <p className="about-page-text"> - Built in collaboration with Microsoft this is the recommended way to launch a SonarQube analysis on - MSBuild projects and solutions. + Built in collaboration with Microsoft, the SonarQube Scanner for MSBuild is the recommended way to + launch a SonarQube analysis on MSBuild projects and solutions. </p> <div className="big-spacer-top"> <a className="about-page-link-more" href={links.msbuild} target="_blank"> diff --git a/server/sonar-web/src/main/js/apps/about/styles.css b/server/sonar-web/src/main/js/apps/about/styles.css index cd6953ee9c5..1c79a4a3d33 100644 --- a/server/sonar-web/src/main/js/apps/about/styles.css +++ b/server/sonar-web/src/main/js/apps/about/styles.css @@ -150,12 +150,16 @@ min-height: 120px; padding: 25px 20px 25px; border: 1px solid #e6e6e6; - border-top: none; - border-bottom-left-radius: 2px; - border-bottom-right-radius: 2px; + border-radius: 2px; background-color: #fff; } +.about-page-issues-number + .about-page-issues-description { + border-top: none; + border-top-left-radius: 0; + border-top-right-radius: 0; +} + .about-page-issues-header { margin-bottom: 20px; font-size: 21px; |