From: Stas Vilchik Date: Tue, 7 Feb 2017 15:31:36 +0000 (+0100) Subject: SONAR-8750 Display a branding landing page X-Git-Tag: 6.3-RC1~122 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7e62aa89c132359ea678677d89943efefcaae7e8;p=sonarqube.git SONAR-8750 Display a branding landing page --- diff --git a/server/sonar-web/src/main/js/api/settings.js b/server/sonar-web/src/main/js/api/settings.js index 2e5ce2b4bfa..0276d4cd8bf 100644 --- a/server/sonar-web/src/main/js/api/settings.js +++ b/server/sonar-web/src/main/js/api/settings.js @@ -96,8 +96,3 @@ export function getServerId () { export function generateServerId (organization, ip) { return postJSON('/api/server_id/generate', { organization, ip }); } - -// TODO replace with /api/settings -export const getSettingValue = key => ( - getJSON(`/api/properties/${key}`).then(r => r[0] ? r[0].value : null) -); diff --git a/server/sonar-web/src/main/js/apps/about/actions.js b/server/sonar-web/src/main/js/apps/about/actions.js new file mode 100644 index 00000000000..e07cd9df5e0 --- /dev/null +++ b/server/sonar-web/src/main/js/apps/about/actions.js @@ -0,0 +1,30 @@ +/* + * SonarQube + * Copyright (C) 2009-2016 SonarSource SA + * mailto:contact AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +// @flow +import { getValues } from '../../api/settings'; +import { receiveValues } from '../settings/store/values/actions'; + +export const fetchAboutPageSettings = (): Function => (dispatch: Function): Promise<*> => { + const keys = ['sonar.lf.aboutText']; + + 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 21db6186dee..fbc571db81e 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 @@ -33,10 +33,11 @@ import AboutStandards from './AboutStandards'; import AboutScanners from './AboutScanners'; import { searchProjects } from '../../../api/components'; import { getFacet } from '../../../api/issues'; -import * as settingsAPI from '../../../api/settings'; -import { getCurrentUser } from '../../../store/rootReducer'; -import '../styles.css'; +import { getCurrentUser, getSettingValue } from '../../../store/rootReducer'; import { translate } from '../../../helpers/l10n'; +import { fetchAboutPageSettings } from '../actions'; +import AboutAppForSonarQubeDotCom from './AboutAppForSonarQubeDotCom'; +import '../styles.css'; type State = { loading: boolean, @@ -45,15 +46,17 @@ type State = { [key: string]: { count: number } - }, - customText?: string + } }; class AboutApp extends React.Component { mounted: boolean; props: { - currentUser: { isLoggedIn: boolean } + currentUser: { isLoggedIn: boolean }, + customText?: string, + fetchAboutPageSettings: () => Promise<*>, + sonarqubeDotCom?: { value: string } }; state: State = { @@ -78,7 +81,7 @@ class AboutApp extends React.Component { } loadCustomText () { - return settingsAPI.getSettingValue('sonar.lf.aboutText'); + return this.props.fetchAboutPageSettings(); } loadData () { @@ -88,12 +91,11 @@ class AboutApp extends React.Component { this.loadCustomText() ]).then(responses => { if (this.mounted) { - const [projectsCount, issues, customText] = responses; + const [projectsCount, issues] = responses; const issueTypes = keyBy(issues.facet, 'val'); this.setState({ projectsCount, issueTypes, - customText, loading: false }); } @@ -105,7 +107,7 @@ class AboutApp extends React.Component { return null; } - const { customText } = this.state; + const { customText, sonarqubeDotCom } = this.props; // $FlowFixMe const bugs = this.state.issueTypes['BUG'].count; @@ -114,6 +116,18 @@ class AboutApp extends React.Component { // $FlowFixMe const codeSmells = this.state.issueTypes['CODE_SMELL'].count; + if (sonarqubeDotCom && sonarqubeDotCom.value === 'true') { + return ( + + ); + } + return (
@@ -138,8 +152,8 @@ class AboutApp extends React.Component {
- {customText != null && customText.length > 0 && ( -
+ {customText != null && customText.value && ( +
)} @@ -172,7 +186,11 @@ class AboutApp extends React.Component { } const mapStateToProps = state => ({ - currentUser: getCurrentUser(state) + currentUser: getCurrentUser(state), + customText: getSettingValue(state, 'sonar.lf.aboutText'), + sonarqubeDotCom: getSettingValue(state, 'sonar.lf.sonarqube.com.enabled') }); -export default connect(mapStateToProps)(AboutApp); +const mapDispatchToProps = { fetchAboutPageSettings }; + +export default connect(mapStateToProps, mapDispatchToProps)(AboutApp); 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 new file mode 100644 index 00000000000..2c58a9d5d6f --- /dev/null +++ b/server/sonar-web/src/main/js/apps/about/components/AboutAppForSonarQubeDotCom.js @@ -0,0 +1,112 @@ +/* + * SonarQube + * Copyright (C) 2009-2016 SonarSource SA + * mailto:contact AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +// @flow +import React from 'react'; +import { Link } from 'react-router'; +import AboutProjects from './AboutProjects'; +import EntryIssueTypesForSonarQubeDotCom from './EntryIssueTypesForSonarQubeDotCom'; +import AboutRulesForSonarQubeDotCom from './AboutRulesForSonarQubeDotCom'; +import AboutLanguages from './AboutLanguages'; +import AboutCleanCode from './AboutCleanCode'; +import AboutQualityModelForSonarQubeDotCom from './AboutQualityModelForSonarQubeDotCom'; +import AboutQualityGates from './AboutQualityGates'; +import AboutLeakPeriod from './AboutLeakPeriod'; +import AboutStandards from './AboutStandards'; +import AboutScanners from './AboutScanners'; +import { translate } from '../../../helpers/l10n'; +import '../sonarqube-dot-com-styles.css'; + +export default class AboutAppForSonarQubeDotCom extends React.Component { + props: { + bugs: number, + codeSmells: number, + currentUser: { isLoggedIn: boolean }, + customText?: string, + projectsCount: number, + vulnerabilities: number, + }; + + render () { + const { customText } = this.props; + + + return ( +
+
+
+
+

+ Continuous Code Quality
as a Service +

+ + Get Started + + {!this.props.currentUser.isLoggedIn && ( + + {translate('layout.login')} + + )} +
+ +
+ + +
+
+
+ + + +
+ {customText != null && customText.value && ( +
+ )} + + + + + +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ + +
+
+ ); + } +} 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 ecaf724f924..0fd88aa97f2 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 @@ -31,12 +31,14 @@ export default class AboutProjects extends React.Component { return (
- - {formatMeasure(this.props.count, 'INT')} - -
-
- {translate('about_page.projects_analyzed')} +
+ + {formatMeasure(this.props.count, 'INT')} + +
+
+ {translate('about_page.projects_analyzed')} +
); 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 new file mode 100644 index 00000000000..86cfdb0f5e7 --- /dev/null +++ b/server/sonar-web/src/main/js/apps/about/components/AboutQualityModelForSonarQubeDotCom.js @@ -0,0 +1,65 @@ +/* + * SonarQube + * Copyright (C) 2009-2016 SonarSource SA + * mailto:contact AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +import React from 'react'; +import { translate } from '../../../helpers/l10n'; +import BugIconForSonarQubeDotCom from './BugIconForSonarQubeDotCom'; +import VulnerabilityIconForSonarQubeDotCom from './VulnerabilityIconForSonarQubeDotCom'; +import CodeSmellIconForSonarQubeDotCom from './CodeSmellIconForSonarQubeDotCom'; + +export default class AboutQualityModelForSonarQubeDotCom extends React.Component { + render () { + return ( +
+

{translate('about_page.quality_model')}

+ +
+
+
+
+

+ {translate('issue.type.BUG.plural')} + {' '} + {translate('about_page.quality_model.bugs')} +

+
+ +
+
+

+ {translate('issue.type.VULNERABILITY.plural')} + {' '} + {translate('about_page.quality_model.vulnerabilities')} +

+
+ +
+
+

+ {translate('issue.type.CODE_SMELL.plural')} + {' '} + {translate('about_page.quality_model.code_smells')} +

+
+
+
+
+ ); + } +} 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 new file mode 100644 index 00000000000..d16567bf084 --- /dev/null +++ b/server/sonar-web/src/main/js/apps/about/components/AboutRulesForSonarQubeDotCom.js @@ -0,0 +1,49 @@ +/* + * SonarQube + * Copyright (C) 2009-2016 SonarSource SA + * mailto:contact AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +// @flow +import React from 'react'; +import { Link } from 'react-router'; +import { getRulesUrl } from '../../../helpers/urls'; + +export default class AboutRulesForSonarQubeDotCom extends React.Component { + render () { + return ( +
+
+ + +2000 rules + + + + + + + + + JavaScript + Java + C/C++ + C# + And More +
+
+ ); + } +} 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 new file mode 100644 index 00000000000..858fffc0774 --- /dev/null +++ b/server/sonar-web/src/main/js/apps/about/components/BugIconForSonarQubeDotCom.js @@ -0,0 +1,32 @@ +/* + * SonarQube + * Copyright (C) 2009-2016 SonarSource SA + * mailto:contact AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +// @flow +import React from 'react'; + +export default class BugIconForSonarQubeDotCom extends React.Component { + render () { + /* eslint-disable max-len */ + return ( + + + + ); + } +} 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 new file mode 100644 index 00000000000..1e7887c0766 --- /dev/null +++ b/server/sonar-web/src/main/js/apps/about/components/CodeSmellIconForSonarQubeDotCom.js @@ -0,0 +1,32 @@ +/* + * SonarQube + * Copyright (C) 2009-2016 SonarSource SA + * mailto:contact AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +// @flow +import React from 'react'; + +export default class CodeSmellIconForSonarQubeDotCom extends React.Component { + render () { + /* eslint-disable max-len */ + return ( + + + + ); + } +} 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 d55a975fd69..9b4816a6d24 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 @@ -38,38 +38,46 @@ export default class EntryIssueTypes extends React.Component { return (
-
    -
  • -
    - - {formatMeasure(bugs, 'SHORT_INT')} - -
    - - {translate('issue.type.BUG.plural')} -
  • -
  • -
    - - {formatMeasure(vulnerabilities, 'SHORT_INT')} - -
    - - {translate('issue.type.VULNERABILITY.plural')} -
  • -
  • -
    - - {formatMeasure(codeSmells, 'SHORT_INT')} - -
    - - {translate('issue.type.CODE_SMELL.plural')} -
  • -
+ + + + + + + + + + + + + + + +
+ + {formatMeasure(bugs, 'SHORT_INT')} + + + + {translate('issue.type.BUG.plural')} +
+ + {formatMeasure(vulnerabilities, 'SHORT_INT')} + + + + {translate('issue.type.VULNERABILITY.plural')} +
+ + {formatMeasure(codeSmells, 'SHORT_INT')} + + + + {translate('issue.type.CODE_SMELL.plural')} +
); } 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 new file mode 100644 index 00000000000..ba634437720 --- /dev/null +++ b/server/sonar-web/src/main/js/apps/about/components/EntryIssueTypesForSonarQubeDotCom.js @@ -0,0 +1,84 @@ +/* + * SonarQube + * Copyright (C) 2009-2016 SonarSource SA + * mailto:contact AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * 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'; +import { translate } from '../../../helpers/l10n'; +import { getIssuesUrl } from '../../../helpers/urls'; +import BugIconForSonarQubeDotCom from './BugIconForSonarQubeDotCom'; +import VulnerabilityIconForSonarQubeDotCom from './VulnerabilityIconForSonarQubeDotCom'; +import CodeSmellIconForSonarQubeDotCom from './CodeSmellIconForSonarQubeDotCom'; + +export default class EntryIssueTypesForSonarQubeDotCom extends React.Component { + static propTypes = { + bugs: React.PropTypes.number.isRequired, + vulnerabilities: React.PropTypes.number.isRequired, + codeSmells: React.PropTypes.number.isRequired + }; + + render () { + const { bugs, vulnerabilities, codeSmells } = this.props; + + return ( +
+ + + + + + + + + + + + + + + +
+ + {formatMeasure(bugs, 'SHORT_INT')} + + + + {translate('issue.type.BUG.plural')} +
+ + {formatMeasure(vulnerabilities, 'SHORT_INT')} + + + + {translate('issue.type.VULNERABILITY.plural')} +
+ + {formatMeasure(codeSmells, 'SHORT_INT')} + + + + {translate('issue.type.CODE_SMELL.plural')} +
+
+ ); + } +} diff --git a/server/sonar-web/src/main/js/apps/about/components/IconLock.js b/server/sonar-web/src/main/js/apps/about/components/IconLock.js deleted file mode 100644 index fbdc836fad9..00000000000 --- a/server/sonar-web/src/main/js/apps/about/components/IconLock.js +++ /dev/null @@ -1,29 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2016 SonarSource SA - * mailto:contact AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -import React from 'react'; - -export default function () { - /* eslint-disable max-len */ - return ( - - - - ); -} diff --git a/server/sonar-web/src/main/js/apps/about/components/OAuthProvider.css b/server/sonar-web/src/main/js/apps/about/components/OAuthProvider.css deleted file mode 100644 index 0718acd0253..00000000000 --- a/server/sonar-web/src/main/js/apps/about/components/OAuthProvider.css +++ /dev/null @@ -1,29 +0,0 @@ -.oauth-provider { - display: block; - width: 180px; - line-height: 22px; - padding: 8px 12px; - border: none; - border-radius: 2px; - box-sizing: border-box; - background-color: #236a97; - color: #fff; - text-align: center; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.oauth-provider:hover, -.oauth-provider:focus { - color: #fff; - box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.3); -} - -.oauth-provider > span { - padding-left: 6px; -} - -.oauth-provider-sonarqube { - background-color: #4b9fd5; -} diff --git a/server/sonar-web/src/main/js/apps/about/components/OAuthProvider.js b/server/sonar-web/src/main/js/apps/about/components/OAuthProvider.js deleted file mode 100644 index 1ae53658a2b..00000000000 --- a/server/sonar-web/src/main/js/apps/about/components/OAuthProvider.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2016 SonarSource SA - * mailto:contact AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -import React from 'react'; -import './OAuthProvider.css'; - -export default class OAuthProvider extends React.Component { - static propTypes = { - provider: React.PropTypes.shape({ - key: React.PropTypes.string.isRequired, - name: React.PropTypes.string.isRequired, - iconPath: React.PropTypes.string.isRequired, - backgroundColor: React.PropTypes.string.isRequired - }).isRequired - }; - - render () { - const { key, name, iconPath, backgroundColor } = this.props.provider; - - const url = window.baseUrl + '/sessions/init/' + key; - const label = 'Log in with ' + name; - - return ( - - {name} - {label} - - ); - } -} 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 new file mode 100644 index 00000000000..41ca97ce2f1 --- /dev/null +++ b/server/sonar-web/src/main/js/apps/about/components/VulnerabilityIconForSonarQubeDotCom.js @@ -0,0 +1,32 @@ +/* + * SonarQube + * Copyright (C) 2009-2016 SonarSource SA + * mailto:contact AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +// @flow +import React from 'react'; + +export default class VulnerabilityIconForSonarQubeDotCom extends React.Component { + render () { + /* eslint-disable max-len */ + return ( + + + + ); + } +} diff --git a/server/sonar-web/src/main/js/apps/about/sonarqube-dot-com-styles.css b/server/sonar-web/src/main/js/apps/about/sonarqube-dot-com-styles.css new file mode 100644 index 00000000000..0607c3dff15 --- /dev/null +++ b/server/sonar-web/src/main/js/apps/about/sonarqube-dot-com-styles.css @@ -0,0 +1,146 @@ +@import url('https://fonts.googleapis.com/css?family=Roboto:300,400,500,700'); + +.sqcom-about-page { + font-family: 'Roboto', sans-serif; + font-size: 15px !important; + font-weight: 300; +} + +.sqcom-about-page-entry { + padding-top: 65px; + padding-bottom: 65px; + background-color: #4b9fd5; +} + +.sqcom-about-page-entry a { + color: #4b9fd5; +} + +.sqcom-about-page-entry .about-page-container { + display: flex; + justify-content: space-between; + align-items: center; +} + +.sqcom-about-page-intro { + +} + +.sqcom-about-page-intro > h1 { + line-height: 56px; + color: #fff; + font-size: 44px; + font-weight: 300; +} + +.sqcom-about-page-intro > .button { + height: 44px; + line-height: 42px; + padding-left: 20px; + padding-right: 20px; + border-color: #fff; + border-radius: 3px; + color: #fff; + font-size: 16px; + font-weight: 500; + text-transform: uppercase; + transition: none; +} + +.sqcom-about-page-intro > .button:hover { + background-color: #fff; + color: #4b9fd5; +} + +.sqcom-about-page-intro > .button-active { + border-color: #b0eb41; + background-color: #b0eb41; + color: #225463; +} + +.sqcom-about-page-intro > .button-active:hover { + border-color: #91d315; + background-color: #91d315; + color: #225463; +} + +.sqcom-about-page-instance { + display: flex; + align-items: stretch; +} + +.sqcom-about-page-instance .about-page-projects { + display: flex; + justify-content: center; + align-items: center; + min-width: 190px; + margin-left: 15px; + padding: 25px; + background-color: #fff; + color: #686868; + font-size: 18px; + font-weight: 300; +} + +.sqcom-about-page-instance .about-page-projects-link { + font-weight: 400; +} + +.sqcom-about-page-instance .about-page-issue-types > li + li { + margin-top: 20px; +} + +.sqcom-about-rules { + margin-bottom: 45px; + background-color: #3988bc; +} + +.sqcom-about-rules .about-page-container { + display: flex; + justify-content: space-between; + align-items: center; +} + +.sqcom-about-rules .button { + height: 33px; + line-height: 30px; + padding-left: 15px; + padding-right: 15px; + border-color: #fff; + border-radius: 3px; + color: #fff; + font-size: 14px; + font-weight: bold; + text-transform: uppercase; +} + +.sqcom-about-rules .button:hover { + background-color: #fff; + color: #4b9fd5; +} + +.sqcom-about-rules-link { + line-height: 36px; + padding: 24px 40px; + border: none; + color: #c1d9ea; + font-size: 20px; +} + +.sqcom-about-rules-link:first-child { + margin-left: -40px; +} + +.sqcom-about-rules-link:hover { + background-color: #398cc8; + color: #fff; +} + +.sqcom-about-rules-link:hover path { + fill: #fff; +} + +.sqcom-about-quality-model svg { + transform: translateY(-3px) !important; +} + 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 d09ede5c5f7..7d06cd0caf9 100644 --- a/server/sonar-web/src/main/js/apps/about/styles.css +++ b/server/sonar-web/src/main/js/apps/about/styles.css @@ -7,6 +7,8 @@ } .about-page .boxed-group h2 { + padding-left: 0; + padding-right: 0; font-size: 18px; } @@ -15,6 +17,8 @@ } .about-page .boxed-group-inner { + padding-left: 0; + padding-right: 0; padding-bottom: 25px; } @@ -81,8 +85,8 @@ text-align: left; } -.about-page-issue-types > li + li { - margin-top: 12px; +.about-page-issue-types tr + tr td { + padding-top: 12px; } .about-page-issue-types svg { @@ -91,9 +95,7 @@ } .about-page-issue-type-number { - display: inline-block; - min-width: 60px; - margin-right: 16px; + padding-right: 16px; text-align: right; } @@ -102,61 +104,9 @@ font-weight: bold; } -.about-login-form-header { - margin-bottom: 30px; - font-size: 18px; - font-weight: bold; -} - -.about-page-sign-up { - margin-top: 20px; - color: rgba(255, 255, 255, 0.7); -} - -.about-page-sign-up a { - color: #4b9fd5; - border-color: #4b9fd5; -} - -.about-page-auth-providers { - width: 200px; -} - -.about-page-auth-providers .oauth-provider { - width: 100%; -} - -.about-page-auth-providers .oauth-provider + .oauth-provider { - margin-top: 20px; -} - .about-page-section { - padding-bottom: 40px; -} - -.about-page-section-gray { - border-top: 1px solid #e6e6e6; - border-bottom: 1px solid #e6e6e6; - background-color: #f3f3f3; -} - -.about-page-section-image { - position: absolute; - z-index: 5; - top: -80px; - right: 100%; -} - -.about-page-center-container .about-page-section-image { - right: auto; - left: -210px; -} - -.about-page-header { - line-height: 1; - margin-bottom: 30px; - font-size: 28px; - font-weight: bold; + padding-top: 20px; + padding-bottom: 10px; } .about-page-text { @@ -171,40 +121,6 @@ border-bottom: 1px solid #cae3f2; } -.about-page-issues { - margin-top: 80px; -} - -.about-page-issues-box { - float: left; - width: 33%; - text-align: center; -} - -.about-page-issues-number { - display: inline-block; - font-size: 32px; - font-weight: bold; -} - -.about-page-issues-description { - margin-top: 12px; - padding: 0 15px; - line-height: 1.4; -} - -.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; - text-transform: uppercase; -} - .about-page-languages { display: flex; justify-content: space-between;