diff options
author | Stas Vilchik <stas-vilchik@users.noreply.github.com> | 2017-03-17 09:10:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-17 09:10:48 +0100 |
commit | de4365079bad2df3bdee2133576dc913ffbf1ab2 (patch) | |
tree | a522ccb952f0d37f454e8188e13b3dec3f731912 /server/sonar-web/src/main/js/apps/about | |
parent | 6a03df65cc0c91a26150ea172a2c480e07326ea1 (diff) | |
download | sonarqube-de4365079bad2df3bdee2133576dc913ffbf1ab2.tar.gz sonarqube-de4365079bad2df3bdee2133576dc913ffbf1ab2.zip |
format code using prettier (#1774)
Diffstat (limited to 'server/sonar-web/src/main/js/apps/about')
20 files changed, 462 insertions, 405 deletions
diff --git a/server/sonar-web/src/main/js/apps/about/actions.js b/server/sonar-web/src/main/js/apps/about/actions.js index 18f1d88f09d..279c6f46c49 100644 --- a/server/sonar-web/src/main/js/apps/about/actions.js +++ b/server/sonar-web/src/main/js/apps/about/actions.js @@ -21,10 +21,11 @@ import { getValues } from '../../api/settings'; import { receiveValues } from '../settings/store/values/actions'; -export const fetchAboutPageSettings = (): Function => (dispatch: Function): Promise<*> => { - const keys = ['sonar.lf.aboutText']; +export const fetchAboutPageSettings = (): Function => + (dispatch: Function): Promise<*> => { + const keys = ['sonar.lf.aboutText']; - return getValues(keys.join()).then(values => { - dispatch(receiveValues(values)); - }); -}; + return getValues(keys.join()).then(values => { + dispatch(receiveValues(values)); + }); + }; diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutApp.js b/server/sonar-web/src/main/js/apps/about/components/AboutApp.js index 743e8ed3afd..6efe4c891d0 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutApp.js +++ b/server/sonar-web/src/main/js/apps/about/components/AboutApp.js @@ -63,33 +63,29 @@ class AboutApp extends React.Component { loading: true }; - componentDidMount () { + componentDidMount() { this.mounted = true; this.loadData(); } - componentWillUnmount () { + componentWillUnmount() { this.mounted = false; } - loadProjects () { + loadProjects() { return searchProjects({ ps: 1 }).then(r => r.paging.total); } - loadIssues () { + loadIssues() { return getFacet({ resolved: false }, 'types'); } - loadCustomText () { + loadCustomText() { return this.props.fetchAboutPageSettings(); } - loadData () { - Promise.all([ - this.loadProjects(), - this.loadIssues(), - this.loadCustomText() - ]).then(responses => { + loadData() { + Promise.all([this.loadProjects(), this.loadIssues(), this.loadCustomText()]).then(responses => { if (this.mounted) { const [projectsCount, issues] = responses; const issueTypes = keyBy(issues.facet, 'val'); @@ -102,7 +98,7 @@ class AboutApp extends React.Component { }); } - render () { + render() { if (this.state.loading) { return null; } @@ -118,69 +114,80 @@ class AboutApp extends React.Component { if (sonarqubeDotCom && sonarqubeDotCom.value === 'true') { return ( - <AboutAppForSonarQubeDotCom - bugs={bugs} - codeSmells={codeSmells} - currentUser={this.props.currentUser} - customText={customText} - projectsCount={this.state.projectsCount} - vulnerabilities={vulnerabilities}/> + <AboutAppForSonarQubeDotCom + bugs={bugs} + codeSmells={codeSmells} + currentUser={this.props.currentUser} + customText={customText} + projectsCount={this.state.projectsCount} + vulnerabilities={vulnerabilities} + /> ); } return ( - <div id="about-page" className="about-page"> - <div className="about-page-container"> - <div className="about-page-entry"> - <div className="about-page-intro"> - <h1 className="big-spacer-bottom"> - {translate('layout.sonar.slogan')} - </h1> - {!this.props.currentUser.isLoggedIn && ( - <Link to="/sessions/new" className="button button-active big-spacer-right"> - {translate('layout.login')} - </Link> - )} - <a className="button" href="https://redirect.sonarsource.com/doc/home.html" target="_blank"> - {translate('about_page.read_documentation')} - </a> - </div> - - <div className="about-page-instance"> - <AboutProjects count={this.state.projectsCount}/> - <EntryIssueTypes bugs={bugs} vulnerabilities={vulnerabilities} codeSmells={codeSmells}/> - </div> + <div id="about-page" className="about-page"> + <div className="about-page-container"> + <div className="about-page-entry"> + <div className="about-page-intro"> + <h1 className="big-spacer-bottom"> + {translate('layout.sonar.slogan')} + </h1> + {!this.props.currentUser.isLoggedIn && + <Link to="/sessions/new" className="button button-active big-spacer-right"> + {translate('layout.login')} + </Link>} + <a + className="button" + href="https://redirect.sonarsource.com/doc/home.html" + target="_blank" + > + {translate('about_page.read_documentation')} + </a> </div> - {customText != null && customText.value && ( - <div className="about-page-section" dangerouslySetInnerHTML={{ __html: customText.value }}/> - )} + <div className="about-page-instance"> + <AboutProjects count={this.state.projectsCount} /> + <EntryIssueTypes + bugs={bugs} + vulnerabilities={vulnerabilities} + codeSmells={codeSmells} + /> + </div> + </div> - <AboutLanguages/> + {customText != null && + customText.value && + <div + className="about-page-section" + dangerouslySetInnerHTML={{ __html: customText.value }} + />} - <AboutQualityModel/> + <AboutLanguages /> - <div className="flex-columns"> - <div className="flex-column flex-column-half about-page-group-boxes"> - <AboutCleanCode/> - </div> - <div className="flex-column flex-column-half about-page-group-boxes"> - <AboutLeakPeriod/> - </div> - </div> + <AboutQualityModel /> - <div className="flex-columns"> - <div className="flex-column flex-column-half about-page-group-boxes"> - <AboutQualityGates/> - </div> - <div className="flex-column flex-column-half about-page-group-boxes"> - <AboutStandards/> - </div> + <div className="flex-columns"> + <div className="flex-column flex-column-half about-page-group-boxes"> + <AboutCleanCode /> + </div> + <div className="flex-column flex-column-half about-page-group-boxes"> + <AboutLeakPeriod /> </div> + </div> - <AboutScanners/> + <div className="flex-columns"> + <div className="flex-column flex-column-half about-page-group-boxes"> + <AboutQualityGates /> + </div> + <div className="flex-column flex-column-half about-page-group-boxes"> + <AboutStandards /> + </div> </div> + + <AboutScanners /> </div> + </div> ); } } diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutAppForSonarQubeDotCom.js b/server/sonar-web/src/main/js/apps/about/components/AboutAppForSonarQubeDotCom.js index 2a42ace6915..36fb27aea43 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutAppForSonarQubeDotCom.js +++ b/server/sonar-web/src/main/js/apps/about/components/AboutAppForSonarQubeDotCom.js @@ -39,71 +39,77 @@ export default class AboutAppForSonarQubeDotCom extends React.Component { currentUser: { isLoggedIn: boolean }, customText?: string, projectsCount: number, - vulnerabilities: number, + vulnerabilities: number }; - render () { + render() { const { customText } = this.props; - return ( - <div id="about-page" className="about-page sqcom-about-page"> - <div className="sqcom-about-page-entry"> - <div className="about-page-container"> - <div className="sqcom-about-page-intro"> - <h1 className="big-spacer-bottom"> - Continuous Code Quality<br/>as a Service - </h1> - <a className="button button-active" href="https://about.sonarqube.com/get-started/" target="_blank"> - Get Started - </a> - {!this.props.currentUser.isLoggedIn && ( - <Link to="/sessions/new" className="button big-spacer-left"> - {translate('layout.login')} - </Link> - )} - </div> + <div id="about-page" className="about-page sqcom-about-page"> + <div className="sqcom-about-page-entry"> + <div className="about-page-container"> + <div className="sqcom-about-page-intro"> + <h1 className="big-spacer-bottom"> + Continuous Code Quality<br />as a Service + </h1> + <a + className="button button-active" + href="https://about.sonarqube.com/get-started/" + target="_blank" + > + Get Started + </a> + {!this.props.currentUser.isLoggedIn && + <Link to="/sessions/new" className="button big-spacer-left"> + {translate('layout.login')} + </Link>} + </div> - <div className="sqcom-about-page-instance"> - <AboutProjects count={this.props.projectsCount}/> - <EntryIssueTypesForSonarQubeDotCom - bugs={this.props.bugs} - vulnerabilities={this.props.vulnerabilities} - codeSmells={this.props.codeSmells}/> - </div> + <div className="sqcom-about-page-instance"> + <AboutProjects count={this.props.projectsCount} /> + <EntryIssueTypesForSonarQubeDotCom + bugs={this.props.bugs} + vulnerabilities={this.props.vulnerabilities} + codeSmells={this.props.codeSmells} + /> </div> </div> + </div> - <AboutRulesForSonarQubeDotCom/> + <AboutRulesForSonarQubeDotCom /> - <div className="about-page-container"> - {customText != null && customText.value && ( - <div className="about-page-section" dangerouslySetInnerHTML={{ __html: customText.value }}/> - )} + <div className="about-page-container"> + {customText != null && + customText.value && + <div + className="about-page-section" + dangerouslySetInnerHTML={{ __html: customText.value }} + />} - <AboutQualityModelForSonarQubeDotCom/> + <AboutQualityModelForSonarQubeDotCom /> - <div className="flex-columns"> - <div className="flex-column flex-column-half about-page-group-boxes"> - <AboutCleanCode/> - </div> - <div className="flex-column flex-column-half about-page-group-boxes"> - <AboutLeakPeriod/> - </div> + <div className="flex-columns"> + <div className="flex-column flex-column-half about-page-group-boxes"> + <AboutCleanCode /> </div> - - <div className="flex-columns"> - <div className="flex-column flex-column-half about-page-group-boxes"> - <AboutQualityGates/> - </div> - <div className="flex-column flex-column-half about-page-group-boxes"> - <AboutStandards/> - </div> + <div className="flex-column flex-column-half about-page-group-boxes"> + <AboutLeakPeriod /> </div> + </div> - <AboutScanners/> + <div className="flex-columns"> + <div className="flex-column flex-column-half about-page-group-boxes"> + <AboutQualityGates /> + </div> + <div className="flex-column flex-column-half about-page-group-boxes"> + <AboutStandards /> + </div> </div> + + <AboutScanners /> </div> + </div> ); } } diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutCleanCode.js b/server/sonar-web/src/main/js/apps/about/components/AboutCleanCode.js index 216a6888166..0100b0fbe1b 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutCleanCode.js +++ b/server/sonar-web/src/main/js/apps/about/components/AboutCleanCode.js @@ -24,15 +24,15 @@ import { translate } from '../../../helpers/l10n'; const link = 'https://redirect.sonarsource.com/doc/issues.html'; export default class AboutCleanCode extends React.Component { - render () { + render() { return ( - <div className="boxed-group"> - <h2>{translate('about_page.clean_code')}</h2> - <div className="boxed-group-inner"> - <p className="about-page-text">{translate('about_page.clean_code.text')}</p> - <ReadMore link={link}/> - </div> + <div className="boxed-group"> + <h2>{translate('about_page.clean_code')}</h2> + <div className="boxed-group-inner"> + <p className="about-page-text">{translate('about_page.clean_code.text')}</p> + <ReadMore link={link} /> </div> + </div> ); } } diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutLanguages.js b/server/sonar-web/src/main/js/apps/about/components/AboutLanguages.js index 632cf692877..0876d2078d2 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutLanguages.js +++ b/server/sonar-web/src/main/js/apps/about/components/AboutLanguages.js @@ -46,25 +46,24 @@ const languages = [ const half = (languages.length + 1) / 2; export default class AboutLanguages extends React.Component { - render () { + render() { return ( - <div className="boxed-group"> - <h2>{translate('about_page.languages')}</h2> - <div className="boxed-group-inner"> - <p className="about-page-text">{translate('about_page.languages.text')}</p> - <ul className="about-page-languages"> - {languages.slice(0, half).map((language, index) => ( - <li key={index}> - <a href={languages[index].url}>{languages[index].name}</a> - <br/> - {index + half < languages.length && ( - <a href={languages[index + half].url}>{languages[index + half].name}</a> - )} - </li> - ))} - </ul> - </div> + <div className="boxed-group"> + <h2>{translate('about_page.languages')}</h2> + <div className="boxed-group-inner"> + <p className="about-page-text">{translate('about_page.languages.text')}</p> + <ul className="about-page-languages"> + {languages.slice(0, half).map((language, index) => ( + <li key={index}> + <a href={languages[index].url}>{languages[index].name}</a> + <br /> + {index + half < languages.length && + <a href={languages[index + half].url}>{languages[index + half].name}</a>} + </li> + ))} + </ul> </div> + </div> ); } } diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutLeakPeriod.js b/server/sonar-web/src/main/js/apps/about/components/AboutLeakPeriod.js index ac3691aca72..edf09b00582 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutLeakPeriod.js +++ b/server/sonar-web/src/main/js/apps/about/components/AboutLeakPeriod.js @@ -24,15 +24,15 @@ import { translate } from '../../../helpers/l10n'; const link = 'https://redirect.sonarsource.com/doc/fix-the-leak.html'; export default class AboutLeakPeriod extends React.Component { - render () { + render() { return ( - <div className="boxed-group"> - <h2>{translate('about_page.fix_the_leak')}</h2> - <div className="boxed-group-inner"> - <p className="about-page-text">{translate('about_page.fix_the_leak.text')}</p> - <ReadMore link={link}/> - </div> + <div className="boxed-group"> + <h2>{translate('about_page.fix_the_leak')}</h2> + <div className="boxed-group-inner"> + <p className="about-page-text">{translate('about_page.fix_the_leak.text')}</p> + <ReadMore link={link} /> </div> + </div> ); } } 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 3710e115b04..785214d854b 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 @@ -27,20 +27,20 @@ export default class AboutProjects extends React.Component { count: React.PropTypes.number.isRequired }; - render () { + render() { return ( - <div className="about-page-projects"> + <div className="about-page-projects"> + <div> <div> - <div> - <Link to="/projects" className="about-page-projects-link"> - {formatMeasure(this.props.count, 'INT')} - </Link> - </div> - <div> - {translate('about_page.projects_analyzed')} - </div> + <Link to="/projects" className="about-page-projects-link"> + {formatMeasure(this.props.count, 'INT')} + </Link> + </div> + <div> + {translate('about_page.projects_analyzed')} </div> </div> + </div> ); } } diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutQualityGates.js b/server/sonar-web/src/main/js/apps/about/components/AboutQualityGates.js index a564b428f69..6e49863472a 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutQualityGates.js +++ b/server/sonar-web/src/main/js/apps/about/components/AboutQualityGates.js @@ -24,15 +24,15 @@ import { translate } from '../../../helpers/l10n'; const link = 'https://redirect.sonarsource.com/doc/quality-gates.html'; export default class AboutQualityGates extends React.Component { - render () { + render() { return ( - <div className="boxed-group"> - <h2>{translate('about_page.quality_gates')}</h2> - <div className="boxed-group-inner"> - <p className="about-page-text">{translate('about_page.quality_gates.text')}</p> - <ReadMore link={link}/> - </div> + <div className="boxed-group"> + <h2>{translate('about_page.quality_gates')}</h2> + <div className="boxed-group-inner"> + <p className="about-page-text">{translate('about_page.quality_gates.text')}</p> + <ReadMore link={link} /> </div> + </div> ); } } diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutQualityModel.js b/server/sonar-web/src/main/js/apps/about/components/AboutQualityModel.js index fe8566c72e3..f107c0d2195 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutQualityModel.js +++ b/server/sonar-web/src/main/js/apps/about/components/AboutQualityModel.js @@ -24,42 +24,42 @@ import VulnerabilityIcon from '../../../components/ui/VulnerabilityIcon'; import CodeSmellIcon from '../../../components/ui/CodeSmellIcon'; export default class AboutQualityModel extends React.Component { - render () { + render() { return ( - <div className="boxed-group about-quality-model"> - <h2>{translate('about_page.quality_model')}</h2> + <div className="boxed-group about-quality-model"> + <h2>{translate('about_page.quality_model')}</h2> - <div className="boxed-group-inner clearfix"> - <div className="flex-columns"> - <div className="flex-column flex-column-third"> - <div className="pull-left little-spacer-right"><BugIcon/></div> - <p className="about-page-text overflow-hidden"> - <strong>{translate('issue.type.BUG.plural')}</strong> - {' '} - {translate('about_page.quality_model.bugs')} - </p> - </div> + <div className="boxed-group-inner clearfix"> + <div className="flex-columns"> + <div className="flex-column flex-column-third"> + <div className="pull-left little-spacer-right"><BugIcon /></div> + <p className="about-page-text overflow-hidden"> + <strong>{translate('issue.type.BUG.plural')}</strong> + {' '} + {translate('about_page.quality_model.bugs')} + </p> + </div> - <div className="flex-column flex-column-third"> - <div className="pull-left little-spacer-right"><VulnerabilityIcon/></div> - <p className="about-page-text overflow-hidden"> - <strong>{translate('issue.type.VULNERABILITY.plural')}</strong> - {' '} - {translate('about_page.quality_model.vulnerabilities')} - </p> - </div> + <div className="flex-column flex-column-third"> + <div className="pull-left little-spacer-right"><VulnerabilityIcon /></div> + <p className="about-page-text overflow-hidden"> + <strong>{translate('issue.type.VULNERABILITY.plural')}</strong> + {' '} + {translate('about_page.quality_model.vulnerabilities')} + </p> + </div> - <div className="flex-column flex-column-third"> - <div className="pull-left little-spacer-right"><CodeSmellIcon/></div> - <p className="about-page-text overflow-hidden"> - <strong>{translate('issue.type.CODE_SMELL.plural')}</strong> - {' '} - {translate('about_page.quality_model.code_smells')} - </p> - </div> + <div className="flex-column flex-column-third"> + <div className="pull-left little-spacer-right"><CodeSmellIcon /></div> + <p className="about-page-text overflow-hidden"> + <strong>{translate('issue.type.CODE_SMELL.plural')}</strong> + {' '} + {translate('about_page.quality_model.code_smells')} + </p> </div> </div> </div> + </div> ); } } diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutQualityModelForSonarQubeDotCom.js b/server/sonar-web/src/main/js/apps/about/components/AboutQualityModelForSonarQubeDotCom.js index 7208fa3a82f..077d9b8c736 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutQualityModelForSonarQubeDotCom.js +++ b/server/sonar-web/src/main/js/apps/about/components/AboutQualityModelForSonarQubeDotCom.js @@ -24,42 +24,46 @@ import VulnerabilityIconForSonarQubeDotCom from './VulnerabilityIconForSonarQube import CodeSmellIconForSonarQubeDotCom from './CodeSmellIconForSonarQubeDotCom'; export default class AboutQualityModelForSonarQubeDotCom extends React.Component { - render () { + render() { return ( - <div className="boxed-group about-quality-model sqcom-about-quality-model"> - <h2>{translate('about_page.quality_model')}</h2> + <div className="boxed-group about-quality-model sqcom-about-quality-model"> + <h2>{translate('about_page.quality_model')}</h2> - <div className="boxed-group-inner clearfix"> - <div className="flex-columns"> - <div className="flex-column flex-column-third"> - <div className="pull-left little-spacer-right"><BugIconForSonarQubeDotCom/></div> - <p className="about-page-text overflow-hidden"> - <strong>{translate('issue.type.BUG.plural')}</strong> - {' '} - {translate('about_page.quality_model.bugs')} - </p> - </div> + <div className="boxed-group-inner clearfix"> + <div className="flex-columns"> + <div className="flex-column flex-column-third"> + <div className="pull-left little-spacer-right"><BugIconForSonarQubeDotCom /></div> + <p className="about-page-text overflow-hidden"> + <strong>{translate('issue.type.BUG.plural')}</strong> + {' '} + {translate('about_page.quality_model.bugs')} + </p> + </div> - <div className="flex-column flex-column-third"> - <div className="pull-left little-spacer-right"><VulnerabilityIconForSonarQubeDotCom/></div> - <p className="about-page-text overflow-hidden"> - <strong>{translate('issue.type.VULNERABILITY.plural')}</strong> - {' '} - {translate('about_page.quality_model.vulnerabilities')} - </p> + <div className="flex-column flex-column-third"> + <div className="pull-left little-spacer-right"> + <VulnerabilityIconForSonarQubeDotCom /> </div> + <p className="about-page-text overflow-hidden"> + <strong>{translate('issue.type.VULNERABILITY.plural')}</strong> + {' '} + {translate('about_page.quality_model.vulnerabilities')} + </p> + </div> - <div className="flex-column flex-column-third"> - <div className="pull-left little-spacer-right"><CodeSmellIconForSonarQubeDotCom/></div> - <p className="about-page-text overflow-hidden"> - <strong>{translate('issue.type.CODE_SMELL.plural')}</strong> - {' '} - {translate('about_page.quality_model.code_smells')} - </p> + <div className="flex-column flex-column-third"> + <div className="pull-left little-spacer-right"> + <CodeSmellIconForSonarQubeDotCom /> </div> + <p className="about-page-text overflow-hidden"> + <strong>{translate('issue.type.CODE_SMELL.plural')}</strong> + {' '} + {translate('about_page.quality_model.code_smells')} + </p> </div> </div> </div> + </div> ); } } diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutRulesForSonarQubeDotCom.js b/server/sonar-web/src/main/js/apps/about/components/AboutRulesForSonarQubeDotCom.js index 75a869c1225..140ab0444d0 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutRulesForSonarQubeDotCom.js +++ b/server/sonar-web/src/main/js/apps/about/components/AboutRulesForSonarQubeDotCom.js @@ -23,27 +23,36 @@ import { Link } from 'react-router'; import { getRulesUrl } from '../../../helpers/urls'; export default class AboutRulesForSonarQubeDotCom extends React.Component { - render () { + render() { return ( - <div className="sqcom-about-rules"> - <div className="about-page-container"> - <Link to={getRulesUrl()} className="sqcom-about-rules-link"> - +3,000 rules - <span className="spacer-left"> - <svg width="15" height="36" viewBox="0 0 15 36"> - <g transform="matrix(1,0,0,1,-267,-362)"> - <path d="M268,363L281,380L269,397" style={{ fill: 'none', stroke: '#c1d9ea', strokeWidth: 1 }}/> - </g> - </svg> - </span> - </Link> - <Link to={getRulesUrl({ languages: 'js' })} className="sqcom-about-rules-link">JavaScript</Link> - <Link to={getRulesUrl({ languages: 'java' })} className="sqcom-about-rules-link">Java</Link> - <Link to={getRulesUrl({ languages: 'c,cpp' })} className="sqcom-about-rules-link">C/C++</Link> - <Link to={getRulesUrl({ languages: 'cs' })} className="sqcom-about-rules-link">C#</Link> - <Link to={getRulesUrl()} className="button">And More</Link> - </div> + <div className="sqcom-about-rules"> + <div className="about-page-container"> + <Link to={getRulesUrl()} className="sqcom-about-rules-link"> + +3,000 rules + <span className="spacer-left"> + <svg width="15" height="36" viewBox="0 0 15 36"> + <g transform="matrix(1,0,0,1,-267,-362)"> + <path + d="M268,363L281,380L269,397" + style={{ fill: 'none', stroke: '#c1d9ea', strokeWidth: 1 }} + /> + </g> + </svg> + </span> + </Link> + <Link to={getRulesUrl({ languages: 'js' })} className="sqcom-about-rules-link"> + JavaScript + </Link> + <Link to={getRulesUrl({ languages: 'java' })} className="sqcom-about-rules-link"> + Java + </Link> + <Link to={getRulesUrl({ languages: 'c,cpp' })} className="sqcom-about-rules-link"> + C/C++ + </Link> + <Link to={getRulesUrl({ languages: 'cs' })} className="sqcom-about-rules-link">C#</Link> + <Link to={getRulesUrl()} className="button">And More</Link> </div> + </div> ); } } 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 77490fabb90..981e8c90a3b 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 @@ -24,41 +24,49 @@ const scanners = [ { key: 'sonarqube', link: 'https://redirect.sonarsource.com/doc/install-configure-scanner.html' - }, { + }, + { key: 'msbuild', link: 'https://redirect.sonarsource.com/doc/install-configure-scanner-msbuild.html' - }, { + }, + { key: 'maven', link: 'https://redirect.sonarsource.com/doc/install-configure-scanner-maven.html' - }, { + }, + { key: 'gradle', link: 'https://redirect.sonarsource.com/doc/gradle.html' - }, { + }, + { key: 'jenkins', link: 'https://redirect.sonarsource.com/plugins/jenkins.html' - }, { + }, + { key: 'ant', link: 'https://redirect.sonarsource.com/doc/install-configure-scanner-ant.html' } ]; export default class AboutScanners extends React.Component { - render () { + render() { return ( - <div className="boxed-group"> - <h2>{translate('about_page.scanners')}</h2> - <div className="boxed-group-inner"> - <p className="about-page-text">{translate('about_page.scanners.text')}</p> - <div className="about-page-analyzers"> - {scanners.map(scanner => ( - <a key={scanner.key} className="about-page-analyzer-box" href={scanner.link}> - <img src={`${window.baseUrl}/images/scanner-logos/${scanner.key}.svg`} height={60} - alt={translate('about_page.scanners', scanner.key)}/> - </a> - ))} - </div> + <div className="boxed-group"> + <h2>{translate('about_page.scanners')}</h2> + <div className="boxed-group-inner"> + <p className="about-page-text">{translate('about_page.scanners.text')}</p> + <div className="about-page-analyzers"> + {scanners.map(scanner => ( + <a key={scanner.key} className="about-page-analyzer-box" href={scanner.link}> + <img + src={`${window.baseUrl}/images/scanner-logos/${scanner.key}.svg`} + height={60} + alt={translate('about_page.scanners', scanner.key)} + /> + </a> + ))} </div> </div> + </div> ); } } 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 816627d9d5a..c1065f5058e 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 @@ -28,52 +28,56 @@ 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'; export default class AboutStandards extends React.Component { - render () { + render() { return ( - <div className="boxed-group"> - <h2>{translate('about_page.standards')}</h2> - <div className="boxed-group-inner"> - <p className="about-page-text">{translate('about_page.standards.text')}</p> + <div className="boxed-group"> + <h2>{translate('about_page.standards')}</h2> + <div className="boxed-group-inner"> + <p className="about-page-text">{translate('about_page.standards.text')}</p> - <div className="spacer-top"> - <ul className="list-inline"> - <li> - <Link to={getRulesUrl({ tags: 'misra' })} 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"> - <i className="icon-tags"/> - <span className="little-spacer-left">CERT</span> - </Link> - </li> - <li> - <Link to={getRulesUrl({ tags: 'cwe' })} 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"> - <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' })} - className="link-with-icon"> - <i className="icon-tags"/> - <span className="little-spacer-left">SANS Top 25</span> - </Link> - </li> - </ul> - </div> - - <ReadMore link={link}/> + <div className="spacer-top"> + <ul className="list-inline"> + <li> + <Link to={getRulesUrl({ tags: 'misra' })} 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"> + <i className="icon-tags" /> + <span className="little-spacer-left">CERT</span> + </Link> + </li> + <li> + <Link to={getRulesUrl({ tags: 'cwe' })} 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"> + <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' + })} + className="link-with-icon" + > + <i className="icon-tags" /> + <span className="little-spacer-left">SANS Top 25</span> + </Link> + </li> + </ul> </div> + + <ReadMore link={link} /> </div> + </div> ); } } diff --git a/server/sonar-web/src/main/js/apps/about/components/BugIconForSonarQubeDotCom.js b/server/sonar-web/src/main/js/apps/about/components/BugIconForSonarQubeDotCom.js index 03427f7d952..a116f7331e6 100644 --- a/server/sonar-web/src/main/js/apps/about/components/BugIconForSonarQubeDotCom.js +++ b/server/sonar-web/src/main/js/apps/about/components/BugIconForSonarQubeDotCom.js @@ -21,12 +21,15 @@ import React from 'react'; export default class BugIconForSonarQubeDotCom extends React.Component { - render () { + render() { /* eslint-disable max-len */ return ( - <svg viewBox="0 0 26 26" width="26" height="26"> - <path style={{ fill: 'currentcolor' }} d="M23.737 15.91l-2.298-2.297a.797.797 0 0 0-.542-.232h-2.18v-1.588l2.722-2.723a.773.773 0 0 0 .233-.542V4.243a.777.777 0 0 0-.775-.775.777.777 0 0 0-.774.775v3.962l-1.407 1.407v-.633a.777.777 0 0 0-.774-.774h-.517a4.51 4.51 0 0 0-2.852-3.446l2.698-2.698a.787.787 0 0 0 0-1.097.787.787 0 0 0-1.098 0L12.985 4.14 9.823.99a.787.787 0 0 0-1.097 0 .787.787 0 0 0 0 1.097l2.672 2.672a4.51 4.51 0 0 0-2.853 3.446H7.99a.777.777 0 0 0-.774.774v.633L5.81 8.192v-3.95a.777.777 0 0 0-.774-.774.777.777 0 0 0-.775.775v4.272c0 .206.078.4.233.542l2.723 2.723v1.6H5.035c-.207 0-.4.078-.542.233L2.195 15.91a.787.787 0 0 0 0 1.098.764.764 0 0 0 .542.232c.194 0 .4-.078.542-.232l2.078-2.078h1.86v.761l-2.789 3.64a.783.783 0 0 0-.155.477v4.505c0 .426.349.774.775.774a.777.777 0 0 0 .774-.774v-4.247l1.433-1.884a5.77 5.77 0 0 0 2.788 4.298l.077.039c.84.49 1.82.761 2.853.761a5.825 5.825 0 0 0 2.865-.761c.013-.013.039-.013.051-.026a5.75 5.75 0 0 0 2.801-4.31l1.446 1.883v4.247c0 .426.348.774.774.774a.777.777 0 0 0 .775-.774v-4.505a.811.811 0 0 0-.155-.477l-2.788-3.64v-.761H20.6l2.078 2.078a.764.764 0 0 0 .542.232c.193 0 .4-.078.542-.232a.787.787 0 0 0-.026-1.098zm-10.752-9.9c1.369 0 2.517.93 2.853 2.182h-5.705a2.954 2.954 0 0 1 2.852-2.181zm-4.22 11.527V9.754h3.433v9.254l-1.82 1.82a4.172 4.172 0 0 1-1.613-3.291zm3.046 4.04l1.149-1.15 1.148 1.15a4.188 4.188 0 0 1-1.148.167c-.388 0-.775-.064-1.15-.167zm5.356-4.04c0 1.342-.632 2.53-1.6 3.304l-1.82-1.82V9.754h3.433v7.783h-.013z"/> - </svg> + <svg viewBox="0 0 26 26" width="26" height="26"> + <path + style={{ fill: 'currentcolor' }} + d="M23.737 15.91l-2.298-2.297a.797.797 0 0 0-.542-.232h-2.18v-1.588l2.722-2.723a.773.773 0 0 0 .233-.542V4.243a.777.777 0 0 0-.775-.775.777.777 0 0 0-.774.775v3.962l-1.407 1.407v-.633a.777.777 0 0 0-.774-.774h-.517a4.51 4.51 0 0 0-2.852-3.446l2.698-2.698a.787.787 0 0 0 0-1.097.787.787 0 0 0-1.098 0L12.985 4.14 9.823.99a.787.787 0 0 0-1.097 0 .787.787 0 0 0 0 1.097l2.672 2.672a4.51 4.51 0 0 0-2.853 3.446H7.99a.777.777 0 0 0-.774.774v.633L5.81 8.192v-3.95a.777.777 0 0 0-.774-.774.777.777 0 0 0-.775.775v4.272c0 .206.078.4.233.542l2.723 2.723v1.6H5.035c-.207 0-.4.078-.542.233L2.195 15.91a.787.787 0 0 0 0 1.098.764.764 0 0 0 .542.232c.194 0 .4-.078.542-.232l2.078-2.078h1.86v.761l-2.789 3.64a.783.783 0 0 0-.155.477v4.505c0 .426.349.774.775.774a.777.777 0 0 0 .774-.774v-4.247l1.433-1.884a5.77 5.77 0 0 0 2.788 4.298l.077.039c.84.49 1.82.761 2.853.761a5.825 5.825 0 0 0 2.865-.761c.013-.013.039-.013.051-.026a5.75 5.75 0 0 0 2.801-4.31l1.446 1.883v4.247c0 .426.348.774.774.774a.777.777 0 0 0 .775-.774v-4.505a.811.811 0 0 0-.155-.477l-2.788-3.64v-.761H20.6l2.078 2.078a.764.764 0 0 0 .542.232c.193 0 .4-.078.542-.232a.787.787 0 0 0-.026-1.098zm-10.752-9.9c1.369 0 2.517.93 2.853 2.182h-5.705a2.954 2.954 0 0 1 2.852-2.181zm-4.22 11.527V9.754h3.433v9.254l-1.82 1.82a4.172 4.172 0 0 1-1.613-3.291zm3.046 4.04l1.149-1.15 1.148 1.15a4.188 4.188 0 0 1-1.148.167c-.388 0-.775-.064-1.15-.167zm5.356-4.04c0 1.342-.632 2.53-1.6 3.304l-1.82-1.82V9.754h3.433v7.783h-.013z" + /> + </svg> ); } } diff --git a/server/sonar-web/src/main/js/apps/about/components/CodeSmellIconForSonarQubeDotCom.js b/server/sonar-web/src/main/js/apps/about/components/CodeSmellIconForSonarQubeDotCom.js index ad38f5556c3..1b951e1d3fe 100644 --- a/server/sonar-web/src/main/js/apps/about/components/CodeSmellIconForSonarQubeDotCom.js +++ b/server/sonar-web/src/main/js/apps/about/components/CodeSmellIconForSonarQubeDotCom.js @@ -21,12 +21,15 @@ import React from 'react'; export default class CodeSmellIconForSonarQubeDotCom extends React.Component { - render () { + render() { /* eslint-disable max-len */ return ( - <svg viewBox="0 0 26 26" width="26" height="26"> - <path style={{ fill: 'currentcolor' }} d="M19.957 5.099a10.455 10.455 0 0 0-7.424-3.077c-1.42 0-2.792.278-4.087.825a10.426 10.426 0 0 0-3.338 2.249 10.462 10.462 0 0 0-3.076 7.427c0 1.418.279 2.791.826 4.087a10.497 10.497 0 0 0 2.25 3.338 10.426 10.426 0 0 0 3.338 2.25c1.295.546 2.67.825 4.086.825 1.419 0 2.791-.279 4.087-.826a10.426 10.426 0 0 0 3.338-2.249 10.465 10.465 0 0 0 3.075-7.425c0-1.417-.278-2.793-.823-4.086a10.396 10.396 0 0 0-2.252-3.338zm.393 10.725a8.436 8.436 0 0 1-1.818 2.695 8.452 8.452 0 0 1-5.996 2.486 8.442 8.442 0 0 1-5.997-2.486 8.455 8.455 0 0 1-2.486-5.996 8.43 8.43 0 0 1 2.486-5.995 8.452 8.452 0 0 1 5.996-2.486 8.445 8.445 0 0 1 5.997 2.486 8.452 8.452 0 0 1 2.485 5.995 8.35 8.35 0 0 1-.667 3.3zm-7.794 4.202h-.037a7.767 7.767 0 0 1-3.426-.835.317.317 0 0 1-.13-.44l2.25-3.923a.32.32 0 0 1 .403-.132c.284.119.595.189.92.189.326 0 .639-.067.92-.19a.32.32 0 0 1 .404.133l2.255 3.922c.09.157.03.36-.133.441a7.896 7.896 0 0 1-3.426.835zm-1.58-7.457c0-.003 0-.009-.003-.013a1.56 1.56 0 0 1 2.337-1.35c.468.269.781.77.781 1.35v.013a1.557 1.557 0 0 1-3.115 0zm-1.068.015H5.384a.318.318 0 0 1-.32-.334c.03-.614.19-1.992.981-3.391l.008-.016.007-.016a7.806 7.806 0 0 1 2.428-2.554.317.317 0 0 1 .448.106l2.282 3.903a.316.316 0 0 1-.082.414 2.371 2.371 0 0 0-.914 1.605.325.325 0 0 1-.314.283zm9.776-.007h-4.526a.32.32 0 0 1-.316-.282 2.371 2.371 0 0 0-.913-1.604.322.322 0 0 1-.082-.414l2.284-3.904a.317.317 0 0 1 .449-.106 7.787 7.787 0 0 1 2.426 2.554l.016.033a7.74 7.74 0 0 1 .98 3.387.319.319 0 0 1-.318.336z"/> - </svg> + <svg viewBox="0 0 26 26" width="26" height="26"> + <path + style={{ fill: 'currentcolor' }} + d="M19.957 5.099a10.455 10.455 0 0 0-7.424-3.077c-1.42 0-2.792.278-4.087.825a10.426 10.426 0 0 0-3.338 2.249 10.462 10.462 0 0 0-3.076 7.427c0 1.418.279 2.791.826 4.087a10.497 10.497 0 0 0 2.25 3.338 10.426 10.426 0 0 0 3.338 2.25c1.295.546 2.67.825 4.086.825 1.419 0 2.791-.279 4.087-.826a10.426 10.426 0 0 0 3.338-2.249 10.465 10.465 0 0 0 3.075-7.425c0-1.417-.278-2.793-.823-4.086a10.396 10.396 0 0 0-2.252-3.338zm.393 10.725a8.436 8.436 0 0 1-1.818 2.695 8.452 8.452 0 0 1-5.996 2.486 8.442 8.442 0 0 1-5.997-2.486 8.455 8.455 0 0 1-2.486-5.996 8.43 8.43 0 0 1 2.486-5.995 8.452 8.452 0 0 1 5.996-2.486 8.445 8.445 0 0 1 5.997 2.486 8.452 8.452 0 0 1 2.485 5.995 8.35 8.35 0 0 1-.667 3.3zm-7.794 4.202h-.037a7.767 7.767 0 0 1-3.426-.835.317.317 0 0 1-.13-.44l2.25-3.923a.32.32 0 0 1 .403-.132c.284.119.595.189.92.189.326 0 .639-.067.92-.19a.32.32 0 0 1 .404.133l2.255 3.922c.09.157.03.36-.133.441a7.896 7.896 0 0 1-3.426.835zm-1.58-7.457c0-.003 0-.009-.003-.013a1.56 1.56 0 0 1 2.337-1.35c.468.269.781.77.781 1.35v.013a1.557 1.557 0 0 1-3.115 0zm-1.068.015H5.384a.318.318 0 0 1-.32-.334c.03-.614.19-1.992.981-3.391l.008-.016.007-.016a7.806 7.806 0 0 1 2.428-2.554.317.317 0 0 1 .448.106l2.282 3.903a.316.316 0 0 1-.082.414 2.371 2.371 0 0 0-.914 1.605.325.325 0 0 1-.314.283zm9.776-.007h-4.526a.32.32 0 0 1-.316-.282 2.371 2.371 0 0 0-.913-1.604.322.322 0 0 1-.082-.414l2.284-3.904a.317.317 0 0 1 .449-.106 7.787 7.787 0 0 1 2.426 2.554l.016.033a7.74 7.74 0 0 1 .98 3.387.319.319 0 0 1-.318.336z" + /> + </svg> ); } } diff --git a/server/sonar-web/src/main/js/apps/about/components/EntryIssueTypes.js b/server/sonar-web/src/main/js/apps/about/components/EntryIssueTypes.js index 648f93be3dd..712dc253293 100644 --- a/server/sonar-web/src/main/js/apps/about/components/EntryIssueTypes.js +++ b/server/sonar-web/src/main/js/apps/about/components/EntryIssueTypes.js @@ -33,52 +33,58 @@ export default class EntryIssueTypes extends React.Component { codeSmells: React.PropTypes.number.isRequired }; - render () { + render() { const { bugs, vulnerabilities, codeSmells } = this.props; return ( - <div className="about-page-projects"> - <table className="about-page-issue-types"> - <tbody> - <tr> - <td className="about-page-issue-type-number"> - <Link to={getIssuesUrl({ resolved: false, types: 'BUG' })} - className="about-page-issue-type-link"> - {formatMeasure(bugs, 'SHORT_INT')} - </Link> - </td> - <td> - <span className="little-spacer-right"><BugIcon/></span> - {translate('issue.type.BUG.plural')} - </td> - </tr> - <tr> - <td className="about-page-issue-type-number"> - <Link to={getIssuesUrl({ resolved: false, types: 'VULNERABILITY' })} - className="about-page-issue-type-link"> - {formatMeasure(vulnerabilities, 'SHORT_INT')} - </Link> - </td> - <td> - <span className="little-spacer-right"><VulnerabilityIcon/></span> - {translate('issue.type.VULNERABILITY.plural')} - </td> - </tr> - <tr> - <td className="about-page-issue-type-number"> - <Link to={getIssuesUrl({ resolved: false, types: 'CODE_SMELL' })} - className="about-page-issue-type-link"> - {formatMeasure(codeSmells, 'SHORT_INT')} - </Link> - </td> - <td> - <span className="little-spacer-right"><CodeSmellIcon/></span> - {translate('issue.type.CODE_SMELL.plural')} - </td> - </tr> - </tbody> - </table> - </div> + <div className="about-page-projects"> + <table className="about-page-issue-types"> + <tbody> + <tr> + <td className="about-page-issue-type-number"> + <Link + to={getIssuesUrl({ resolved: false, types: 'BUG' })} + className="about-page-issue-type-link" + > + {formatMeasure(bugs, 'SHORT_INT')} + </Link> + </td> + <td> + <span className="little-spacer-right"><BugIcon /></span> + {translate('issue.type.BUG.plural')} + </td> + </tr> + <tr> + <td className="about-page-issue-type-number"> + <Link + to={getIssuesUrl({ resolved: false, types: 'VULNERABILITY' })} + className="about-page-issue-type-link" + > + {formatMeasure(vulnerabilities, 'SHORT_INT')} + </Link> + </td> + <td> + <span className="little-spacer-right"><VulnerabilityIcon /></span> + {translate('issue.type.VULNERABILITY.plural')} + </td> + </tr> + <tr> + <td className="about-page-issue-type-number"> + <Link + to={getIssuesUrl({ resolved: false, types: 'CODE_SMELL' })} + className="about-page-issue-type-link" + > + {formatMeasure(codeSmells, 'SHORT_INT')} + </Link> + </td> + <td> + <span className="little-spacer-right"><CodeSmellIcon /></span> + {translate('issue.type.CODE_SMELL.plural')} + </td> + </tr> + </tbody> + </table> + </div> ); } } diff --git a/server/sonar-web/src/main/js/apps/about/components/EntryIssueTypesForSonarQubeDotCom.js b/server/sonar-web/src/main/js/apps/about/components/EntryIssueTypesForSonarQubeDotCom.js index 1450efde801..8ec4c383d79 100644 --- a/server/sonar-web/src/main/js/apps/about/components/EntryIssueTypesForSonarQubeDotCom.js +++ b/server/sonar-web/src/main/js/apps/about/components/EntryIssueTypesForSonarQubeDotCom.js @@ -33,52 +33,58 @@ export default class EntryIssueTypesForSonarQubeDotCom extends React.Component { codeSmells: React.PropTypes.number.isRequired }; - render () { + render() { const { bugs, vulnerabilities, codeSmells } = this.props; return ( - <div className="about-page-projects"> - <table className="about-page-issue-types"> - <tbody> - <tr> - <td className="about-page-issue-type-number"> - <Link to={getIssuesUrl({ resolved: false, types: 'BUG' })} - className="about-page-issue-type-link"> - {formatMeasure(bugs, 'SHORT_INT')} - </Link> - </td> - <td> - <span className="little-spacer-right"><BugIconForSonarQubeDotCom/></span> - {translate('issue.type.BUG.plural')} - </td> - </tr> - <tr> - <td className="about-page-issue-type-number"> - <Link to={getIssuesUrl({ resolved: false, types: 'VULNERABILITY' })} - className="about-page-issue-type-link"> - {formatMeasure(vulnerabilities, 'SHORT_INT')} - </Link> - </td> - <td> - <span className="little-spacer-right"><VulnerabilityIconForSonarQubeDotCom/></span> - {translate('issue.type.VULNERABILITY.plural')} - </td> - </tr> - <tr> - <td className="about-page-issue-type-number"> - <Link to={getIssuesUrl({ resolved: false, types: 'CODE_SMELL' })} - className="about-page-issue-type-link"> - {formatMeasure(codeSmells, 'SHORT_INT')} - </Link> - </td> - <td> - <span className="little-spacer-right"><CodeSmellIconForSonarQubeDotCom/></span> - {translate('issue.type.CODE_SMELL.plural')} - </td> - </tr> - </tbody> - </table> - </div> + <div className="about-page-projects"> + <table className="about-page-issue-types"> + <tbody> + <tr> + <td className="about-page-issue-type-number"> + <Link + to={getIssuesUrl({ resolved: false, types: 'BUG' })} + className="about-page-issue-type-link" + > + {formatMeasure(bugs, 'SHORT_INT')} + </Link> + </td> + <td> + <span className="little-spacer-right"><BugIconForSonarQubeDotCom /></span> + {translate('issue.type.BUG.plural')} + </td> + </tr> + <tr> + <td className="about-page-issue-type-number"> + <Link + to={getIssuesUrl({ resolved: false, types: 'VULNERABILITY' })} + className="about-page-issue-type-link" + > + {formatMeasure(vulnerabilities, 'SHORT_INT')} + </Link> + </td> + <td> + <span className="little-spacer-right"><VulnerabilityIconForSonarQubeDotCom /></span> + {translate('issue.type.VULNERABILITY.plural')} + </td> + </tr> + <tr> + <td className="about-page-issue-type-number"> + <Link + to={getIssuesUrl({ resolved: false, types: 'CODE_SMELL' })} + className="about-page-issue-type-link" + > + {formatMeasure(codeSmells, 'SHORT_INT')} + </Link> + </td> + <td> + <span className="little-spacer-right"><CodeSmellIconForSonarQubeDotCom /></span> + {translate('issue.type.CODE_SMELL.plural')} + </td> + </tr> + </tbody> + </table> + </div> ); } } diff --git a/server/sonar-web/src/main/js/apps/about/components/ReadMore.js b/server/sonar-web/src/main/js/apps/about/components/ReadMore.js index 50eb2685021..2f9c515b713 100644 --- a/server/sonar-web/src/main/js/apps/about/components/ReadMore.js +++ b/server/sonar-web/src/main/js/apps/about/components/ReadMore.js @@ -25,13 +25,13 @@ export default class ReadMore extends React.Component { link: React.PropTypes.string.isRequired }; - render () { + render() { return ( - <div className="big-spacer-top"> - <a className="about-page-link-more" href={this.props.link} target="_blank"> - <span>{translate('about_page.read_more')}</span> - </a> - </div> + <div className="big-spacer-top"> + <a className="about-page-link-more" href={this.props.link} target="_blank"> + <span>{translate('about_page.read_more')}</span> + </a> + </div> ); } } diff --git a/server/sonar-web/src/main/js/apps/about/components/VulnerabilityIconForSonarQubeDotCom.js b/server/sonar-web/src/main/js/apps/about/components/VulnerabilityIconForSonarQubeDotCom.js index b088564b296..2576a3d5cd5 100644 --- a/server/sonar-web/src/main/js/apps/about/components/VulnerabilityIconForSonarQubeDotCom.js +++ b/server/sonar-web/src/main/js/apps/about/components/VulnerabilityIconForSonarQubeDotCom.js @@ -21,12 +21,15 @@ import React from 'react'; export default class VulnerabilityIconForSonarQubeDotCom extends React.Component { - render () { + render() { /* eslint-disable max-len */ return ( - <svg viewBox="0 0 26 26" width="26" height="26"> - <path style={{ fill: 'currentcolor' }} d="M7.688 9.224V5.818c0-2.622 2.16-4.756 4.813-4.756 2.654 0 4.802 2.134 4.813 4.756v.931c0 .5-.413.909-.919.909a.916.916 0 0 1-.919-.909v-.93c0-1.624-1.332-2.94-2.975-2.94s-2.975 1.316-2.975 2.94v3.405h7.892c1.401 0 2.539 1.124 2.539 2.509v9.706c0 1.442-1.195 2.623-2.654 2.623H7.688c-1.46 0-2.654-1.18-2.654-2.623v-9.706c0-1.385 1.137-2.509 2.539-2.509h.115zm9.615 13.033a.814.814 0 0 0 .816-.806v-9.718a.692.692 0 0 0-.701-.692H7.573c-.39 0-.7.306-.7.692v9.718c0 .442.367.806.815.806h9.615zm-4.802-8.98c-1.045 0-1.907.84-1.907 1.884 0 .704.402 1.329.988 1.647v2.304c0 .5.414.908.92.908a.916.916 0 0 0 .918-.908v-2.316c.586-.318.988-.942.988-1.646a1.904 1.904 0 0 0-1.907-1.873zM22.99 8.804l-1.7-.681c-.47-.182-1.01.034-1.194.5a.904.904 0 0 0 .505 1.18l1.712.681c.115.046.23.068.344.068a.908.908 0 0 0 .85-.567.91.91 0 0 0-.517-1.18zm-2.837-1.703a.939.939 0 0 0 1.206.488l1.689-.715a.9.9 0 0 0 .482-1.192c-.195-.465-.735-.67-1.206-.477l-1.689.716a.876.876 0 0 0-.482 1.18zm-1.068-1.124c-.471-.181-.69-.715-.506-1.192l.69-1.68c.183-.465.723-.681 1.194-.5.471.182.69.716.506 1.181l-.69 1.692a.908.908 0 0 1-.85.567.932.932 0 0 1-.344-.068z"/> - </svg> + <svg viewBox="0 0 26 26" width="26" height="26"> + <path + style={{ fill: 'currentcolor' }} + d="M7.688 9.224V5.818c0-2.622 2.16-4.756 4.813-4.756 2.654 0 4.802 2.134 4.813 4.756v.931c0 .5-.413.909-.919.909a.916.916 0 0 1-.919-.909v-.93c0-1.624-1.332-2.94-2.975-2.94s-2.975 1.316-2.975 2.94v3.405h7.892c1.401 0 2.539 1.124 2.539 2.509v9.706c0 1.442-1.195 2.623-2.654 2.623H7.688c-1.46 0-2.654-1.18-2.654-2.623v-9.706c0-1.385 1.137-2.509 2.539-2.509h.115zm9.615 13.033a.814.814 0 0 0 .816-.806v-9.718a.692.692 0 0 0-.701-.692H7.573c-.39 0-.7.306-.7.692v9.718c0 .442.367.806.815.806h9.615zm-4.802-8.98c-1.045 0-1.907.84-1.907 1.884 0 .704.402 1.329.988 1.647v2.304c0 .5.414.908.92.908a.916.916 0 0 0 .918-.908v-2.316c.586-.318.988-.942.988-1.646a1.904 1.904 0 0 0-1.907-1.873zM22.99 8.804l-1.7-.681c-.47-.182-1.01.034-1.194.5a.904.904 0 0 0 .505 1.18l1.712.681c.115.046.23.068.344.068a.908.908 0 0 0 .85-.567.91.91 0 0 0-.517-1.18zm-2.837-1.703a.939.939 0 0 0 1.206.488l1.689-.715a.9.9 0 0 0 .482-1.192c-.195-.465-.735-.67-1.206-.477l-1.689.716a.876.876 0 0 0-.482 1.18zm-1.068-1.124c-.471-.181-.69-.715-.506-1.192l.69-1.68c.183-.465.723-.681 1.194-.5.471.182.69.716.506 1.181l-.69 1.692a.908.908 0 0 1-.85.567.932.932 0 0 1-.344-.068z" + /> + </svg> ); } } diff --git a/server/sonar-web/src/main/js/apps/about/routes.js b/server/sonar-web/src/main/js/apps/about/routes.js index 9b1d3ec370d..a8d72cc6e72 100644 --- a/server/sonar-web/src/main/js/apps/about/routes.js +++ b/server/sonar-web/src/main/js/apps/about/routes.js @@ -21,6 +21,4 @@ import React from 'react'; import { IndexRoute } from 'react-router'; import AboutApp from './components/AboutApp'; -export default ( - <IndexRoute component={AboutApp}/> -); +export default <IndexRoute component={AboutApp} />; |