From 637740fb682629d84d66c5f7c59b0a4acf2f1ad1 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Tue, 3 Oct 2017 15:53:33 +0200 Subject: SONAR-9378 finish renaming in web app --- .../js/app/components/DefaultHelmetContainer.js | 8 +- .../src/main/js/app/components/GlobalFooter.js | 10 +- .../js/app/components/GlobalFooterContainer.js | 2 +- .../components/GlobalFooterForSonarQubeDotCom.js | 51 ------- .../js/app/components/GlobalFooterSonarCloud.js | 51 +++++++ .../app/components/__tests__/GlobalFooter-test.js | 6 +- .../GlobalFooterForSonarQubeDotCom-test.js | 26 ---- .../__tests__/GlobalFooterSonarCloud-test.js | 26 ++++ .../__snapshots__/GlobalFooter-test.js.snap | 2 +- .../GlobalFooterForSonarQubeDotCom-test.js.snap | 59 -------- .../GlobalFooterSonarCloud-test.js.snap | 59 ++++++++ .../src/main/js/apps/about/components/AboutApp.js | 12 +- .../about/components/AboutAppForSonarQubeDotCom.js | 111 --------------- .../AboutAppForSonarQubeDotComLazyLoader.js | 45 ------- .../js/apps/about/components/AboutAppSonarCloud.js | 111 +++++++++++++++ .../components/AboutAppSonarCloudLazyLoader.js | 45 +++++++ .../AboutQualityModelForSonarQubeDotCom.js | 66 --------- .../components/AboutQualityModelSonarCloud.js | 66 +++++++++ .../components/AboutRulesForSonarQubeDotCom.js | 79 ----------- .../apps/about/components/AboutRulesSonarCloud.js | 79 +++++++++++ .../about/components/BugIconForSonarQubeDotCom.js | 33 ----- .../js/apps/about/components/BugIconSonarCloud.js | 33 +++++ .../components/CodeSmellIconForSonarQubeDotCom.js | 33 ----- .../about/components/CodeSmellIconSonarCloud.js | 33 +++++ .../EntryIssueTypesForSonarQubeDotCom.js | 102 -------------- .../about/components/EntryIssueTypesSonarCloud.js | 102 ++++++++++++++ .../VulnerabilityIconForSonarQubeDotCom.js | 33 ----- .../components/VulnerabilityIconSonarCloud.js | 33 +++++ .../src/main/js/apps/about/sonarcloud-styles.css | 150 +++++++++++++++++++++ .../js/apps/about/sonarqube-dot-com-styles.css | 150 --------------------- 30 files changed, 807 insertions(+), 809 deletions(-) delete mode 100644 server/sonar-web/src/main/js/app/components/GlobalFooterForSonarQubeDotCom.js create mode 100644 server/sonar-web/src/main/js/app/components/GlobalFooterSonarCloud.js delete mode 100644 server/sonar-web/src/main/js/app/components/__tests__/GlobalFooterForSonarQubeDotCom-test.js create mode 100644 server/sonar-web/src/main/js/app/components/__tests__/GlobalFooterSonarCloud-test.js delete mode 100644 server/sonar-web/src/main/js/app/components/__tests__/__snapshots__/GlobalFooterForSonarQubeDotCom-test.js.snap create mode 100644 server/sonar-web/src/main/js/app/components/__tests__/__snapshots__/GlobalFooterSonarCloud-test.js.snap delete mode 100644 server/sonar-web/src/main/js/apps/about/components/AboutAppForSonarQubeDotCom.js delete mode 100644 server/sonar-web/src/main/js/apps/about/components/AboutAppForSonarQubeDotComLazyLoader.js create mode 100644 server/sonar-web/src/main/js/apps/about/components/AboutAppSonarCloud.js create mode 100644 server/sonar-web/src/main/js/apps/about/components/AboutAppSonarCloudLazyLoader.js delete mode 100644 server/sonar-web/src/main/js/apps/about/components/AboutQualityModelForSonarQubeDotCom.js create mode 100644 server/sonar-web/src/main/js/apps/about/components/AboutQualityModelSonarCloud.js delete mode 100644 server/sonar-web/src/main/js/apps/about/components/AboutRulesForSonarQubeDotCom.js create mode 100644 server/sonar-web/src/main/js/apps/about/components/AboutRulesSonarCloud.js delete mode 100644 server/sonar-web/src/main/js/apps/about/components/BugIconForSonarQubeDotCom.js create mode 100644 server/sonar-web/src/main/js/apps/about/components/BugIconSonarCloud.js delete mode 100644 server/sonar-web/src/main/js/apps/about/components/CodeSmellIconForSonarQubeDotCom.js create mode 100644 server/sonar-web/src/main/js/apps/about/components/CodeSmellIconSonarCloud.js delete mode 100644 server/sonar-web/src/main/js/apps/about/components/EntryIssueTypesForSonarQubeDotCom.js create mode 100644 server/sonar-web/src/main/js/apps/about/components/EntryIssueTypesSonarCloud.js delete mode 100644 server/sonar-web/src/main/js/apps/about/components/VulnerabilityIconForSonarQubeDotCom.js create mode 100644 server/sonar-web/src/main/js/apps/about/components/VulnerabilityIconSonarCloud.js create mode 100644 server/sonar-web/src/main/js/apps/about/sonarcloud-styles.css delete mode 100644 server/sonar-web/src/main/js/apps/about/sonarqube-dot-com-styles.css (limited to 'server/sonar-web/src/main/js') diff --git a/server/sonar-web/src/main/js/app/components/DefaultHelmetContainer.js b/server/sonar-web/src/main/js/app/components/DefaultHelmetContainer.js index 8a3be89e41f..0ba3947f417 100644 --- a/server/sonar-web/src/main/js/app/components/DefaultHelmetContainer.js +++ b/server/sonar-web/src/main/js/app/components/DefaultHelmetContainer.js @@ -22,13 +22,11 @@ import { connect } from 'react-redux'; import Helmet from 'react-helmet'; import { getGlobalSettingValue } from '../../store/rootReducer'; -function DefaultHelmetContainer({ children, sonarqubeDotCom }) { +function DefaultHelmetContainer({ children, onSonarCloud }) { return (
{children}
@@ -36,7 +34,7 @@ function DefaultHelmetContainer({ children, sonarqubeDotCom }) { } const mapStateToProps = state => ({ - sonarqubeDotCom: getGlobalSettingValue(state, 'sonar.sonarcloud.enabled') + onSonarCloud: getGlobalSettingValue(state, 'sonar.sonarcloud.enabled') }); export default connect(mapStateToProps)(DefaultHelmetContainer); diff --git a/server/sonar-web/src/main/js/app/components/GlobalFooter.js b/server/sonar-web/src/main/js/app/components/GlobalFooter.js index 2f104f6958f..6cd008827fa 100644 --- a/server/sonar-web/src/main/js/app/components/GlobalFooter.js +++ b/server/sonar-web/src/main/js/app/components/GlobalFooter.js @@ -20,7 +20,7 @@ // @flow import React from 'react'; import { Link } from 'react-router'; -import GlobalFooterForSonarQubeDotCom from './GlobalFooterForSonarQubeDotCom'; +import GlobalFooterSonarCloud from './GlobalFooterSonarCloud'; import GlobalFooterBranding from './GlobalFooterBranding'; import { translate, translateWithParameters } from '../../helpers/l10n'; @@ -28,16 +28,16 @@ import { translate, translateWithParameters } from '../../helpers/l10n'; type Props = { hideLoggedInInfo?: boolean, productionDatabase: boolean, - sonarqubeDotCom?: { value: string }, + onSonarCloud?: { value: string }, sonarqubeVersion?: string }; */ export default function GlobalFooter( - { hideLoggedInInfo, productionDatabase, sonarqubeDotCom, sonarqubeVersion } /*: Props */ + { hideLoggedInInfo, productionDatabase, onSonarCloud, sonarqubeVersion } /*: Props */ ) { - if (sonarqubeDotCom && sonarqubeDotCom.value === 'true') { - return ; + if (onSonarCloud && onSonarCloud.value === 'true') { + return ; } return ( diff --git a/server/sonar-web/src/main/js/app/components/GlobalFooterContainer.js b/server/sonar-web/src/main/js/app/components/GlobalFooterContainer.js index 4a2a7725cef..8d68f322369 100644 --- a/server/sonar-web/src/main/js/app/components/GlobalFooterContainer.js +++ b/server/sonar-web/src/main/js/app/components/GlobalFooterContainer.js @@ -25,7 +25,7 @@ import GlobalFooter from './GlobalFooter'; const mapStateToProps = state => ({ sonarqubeVersion: getAppState(state).version, productionDatabase: getAppState(state).productionDatabase, - sonarqubeDotCom: getGlobalSettingValue(state, 'sonar.sonarcloud.enabled') + onSonarCloud: getGlobalSettingValue(state, 'sonar.sonarcloud.enabled') }); export default connect(mapStateToProps)(GlobalFooter); diff --git a/server/sonar-web/src/main/js/app/components/GlobalFooterForSonarQubeDotCom.js b/server/sonar-web/src/main/js/app/components/GlobalFooterForSonarQubeDotCom.js deleted file mode 100644 index f05bb330fda..00000000000 --- a/server/sonar-web/src/main/js/app/components/GlobalFooterForSonarQubeDotCom.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2017 SonarSource SA - * mailto:info 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 { translate } from '../../helpers/l10n'; - -export default function GlobalFooterForSonarQubeDotCom() { - return ( - - ); -} diff --git a/server/sonar-web/src/main/js/app/components/GlobalFooterSonarCloud.js b/server/sonar-web/src/main/js/app/components/GlobalFooterSonarCloud.js new file mode 100644 index 00000000000..d81f101e78b --- /dev/null +++ b/server/sonar-web/src/main/js/app/components/GlobalFooterSonarCloud.js @@ -0,0 +1,51 @@ +/* + * SonarQube + * Copyright (C) 2009-2017 SonarSource SA + * mailto:info 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 { translate } from '../../helpers/l10n'; + +export default function GlobalFooterSonarCloud() { + return ( + + ); +} diff --git a/server/sonar-web/src/main/js/app/components/__tests__/GlobalFooter-test.js b/server/sonar-web/src/main/js/app/components/__tests__/GlobalFooter-test.js index 54b528bb743..74ef097213f 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/GlobalFooter-test.js +++ b/server/sonar-web/src/main/js/app/components/__tests__/GlobalFooter-test.js @@ -31,7 +31,7 @@ it('should not render the only logged in information', () => { ) @@ -48,8 +48,8 @@ it('should display the sq version', () => { ).toMatchSnapshot(); }); -it('should render SonarqubeDotCom footer', () => { +it('should render SonarCloud footer', () => { expect( - shallow() + shallow() ).toMatchSnapshot(); }); diff --git a/server/sonar-web/src/main/js/app/components/__tests__/GlobalFooterForSonarQubeDotCom-test.js b/server/sonar-web/src/main/js/app/components/__tests__/GlobalFooterForSonarQubeDotCom-test.js deleted file mode 100644 index 38610ea8353..00000000000 --- a/server/sonar-web/src/main/js/app/components/__tests__/GlobalFooterForSonarQubeDotCom-test.js +++ /dev/null @@ -1,26 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2017 SonarSource SA - * mailto:info 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 { shallow } from 'enzyme'; -import React from 'react'; -import GlobalFooterForSonarQubeDotCom from '../GlobalFooterForSonarQubeDotCom'; - -it('should render correctly', () => { - expect(shallow()).toMatchSnapshot(); -}); diff --git a/server/sonar-web/src/main/js/app/components/__tests__/GlobalFooterSonarCloud-test.js b/server/sonar-web/src/main/js/app/components/__tests__/GlobalFooterSonarCloud-test.js new file mode 100644 index 00000000000..2f41d408c61 --- /dev/null +++ b/server/sonar-web/src/main/js/app/components/__tests__/GlobalFooterSonarCloud-test.js @@ -0,0 +1,26 @@ +/* + * SonarQube + * Copyright (C) 2009-2017 SonarSource SA + * mailto:info 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 { shallow } from 'enzyme'; +import React from 'react'; +import GlobalFooterSonarCloud from '../GlobalFooterSonarCloud'; + +it('should render correctly', () => { + expect(shallow()).toMatchSnapshot(); +}); diff --git a/server/sonar-web/src/main/js/app/components/__tests__/__snapshots__/GlobalFooter-test.js.snap b/server/sonar-web/src/main/js/app/components/__tests__/__snapshots__/GlobalFooter-test.js.snap index 19b4e955356..438127ce0bc 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/__snapshots__/GlobalFooter-test.js.snap +++ b/server/sonar-web/src/main/js/app/components/__tests__/__snapshots__/GlobalFooter-test.js.snap @@ -98,7 +98,7 @@ exports[`should not render the only logged in information 1`] = ` `; -exports[`should render SonarqubeDotCom footer 1`] = ``; +exports[`should render SonarCloud footer 1`] = ``; exports[`should render the only logged in information 1`] = ` -`; diff --git a/server/sonar-web/src/main/js/app/components/__tests__/__snapshots__/GlobalFooterSonarCloud-test.js.snap b/server/sonar-web/src/main/js/app/components/__tests__/__snapshots__/GlobalFooterSonarCloud-test.js.snap new file mode 100644 index 00000000000..9abb73d6d77 --- /dev/null +++ b/server/sonar-web/src/main/js/app/components/__tests__/__snapshots__/GlobalFooterSonarCloud-test.js.snap @@ -0,0 +1,59 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`should render correctly 1`] = ` + +`; 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 c748fa60444..dbb199b9b59 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 @@ -36,7 +36,7 @@ import { getFacet } from '../../../api/issues'; import { getAppState, getCurrentUser, getGlobalSettingValue } from '../../../store/rootReducer'; import { translate } from '../../../helpers/l10n'; import { fetchAboutPageSettings } from '../actions'; -import AboutAppForSonarQubeDotComLazyLoader from './AboutAppForSonarQubeDotComLazyLoader'; +import AboutAppSonarCloudLazyLoader from './AboutAppSonarCloudLazyLoader'; import '../styles.css'; /*:: @@ -62,7 +62,7 @@ class AboutApp extends React.PureComponent { currentUser: { isLoggedIn: boolean }, customText?: string, fetchAboutPageSettings: () => Promise<*>, - sonarqubeDotCom?: { value: string } + onSonarCloud?: { value: string } }; */ @@ -107,7 +107,7 @@ class AboutApp extends React.PureComponent { } render() { - const { customText, sonarqubeDotCom } = this.props; + const { customText, onSonarCloud } = this.props; const { loading, issueTypes, projectsCount } = this.state; let bugs; @@ -119,9 +119,9 @@ class AboutApp extends React.PureComponent { codeSmells = issueTypes['CODE_SMELL'] && issueTypes['CODE_SMELL'].count; } - if (sonarqubeDotCom && sonarqubeDotCom.value === 'true') { + if (onSonarCloud && onSonarCloud.value === 'true') { return ( - ({ appState: getAppState(state), currentUser: getCurrentUser(state), customText: getGlobalSettingValue(state, 'sonar.lf.aboutText'), - sonarqubeDotCom: getGlobalSettingValue(state, 'sonar.sonarcloud.enabled') + onSonarCloud: getGlobalSettingValue(state, 'sonar.sonarcloud.enabled') }); const mapDispatchToProps = { fetchAboutPageSettings }; 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 deleted file mode 100644 index b3e048a1d1e..00000000000 --- a/server/sonar-web/src/main/js/apps/about/components/AboutAppForSonarQubeDotCom.js +++ /dev/null @@ -1,111 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2017 SonarSource SA - * mailto:info 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 AboutProjects from './AboutProjects'; -import EntryIssueTypesForSonarQubeDotCom from './EntryIssueTypesForSonarQubeDotCom'; -import AboutRulesForSonarQubeDotCom from './AboutRulesForSonarQubeDotCom'; -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 SonarCloudGetStarted from './SonarCloudGetStarted'; -import '../sonarqube-dot-com-styles.css'; - -/*:: -type Props = { - appState: { - defaultOrganization: string, - organizationsEnabled: boolean - }, - bugs: number, - codeSmells: number, - currentUser: { isLoggedIn: boolean }, - customText?: string, - loading: boolean, - projectsCount: number, - vulnerabilities: number -}; -*/ - -export default function AboutAppForSonarQubeDotCom(props /*: Props */) { - const { customText } = props; - - return ( -
-
-
-
-

- Continuous Code Quality
as a Service -

- {!props.currentUser.isLoggedIn && } -
- -
- - -
-
-
- - - -
- {customText != null && - customText.value && ( -
- )} - - - -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- - -
-
- ); -} diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutAppForSonarQubeDotComLazyLoader.js b/server/sonar-web/src/main/js/apps/about/components/AboutAppForSonarQubeDotComLazyLoader.js deleted file mode 100644 index 8d22b8f8b43..00000000000 --- a/server/sonar-web/src/main/js/apps/about/components/AboutAppForSonarQubeDotComLazyLoader.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2017 SonarSource SA - * mailto:info 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 class AboutAppForSonarQubeDotComLazyLoader extends React.PureComponent { - constructor(props) { - super(props); - this.state = { - AboutAppForSonarQubeDotCom: null - }; - } - - componentDidMount() { - if (!this.state.AboutAppForSonarQubeDotCom) { - import('./AboutAppForSonarQubeDotCom').then(({ default: AboutAppForSonarQubeDotCom }) => - this.setState({ AboutAppForSonarQubeDotCom }) - ); - } - } - - render() { - const { AboutAppForSonarQubeDotCom } = this.state; - if (AboutAppForSonarQubeDotCom) { - return ; - } - return null; - } -} diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutAppSonarCloud.js b/server/sonar-web/src/main/js/apps/about/components/AboutAppSonarCloud.js new file mode 100644 index 00000000000..8373d23cc12 --- /dev/null +++ b/server/sonar-web/src/main/js/apps/about/components/AboutAppSonarCloud.js @@ -0,0 +1,111 @@ +/* + * SonarQube + * Copyright (C) 2009-2017 SonarSource SA + * mailto:info 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 AboutProjects from './AboutProjects'; +import EntryIssueTypesSonarCloud from './EntryIssueTypesSonarCloud'; +import AboutRulesSonarCloud from './AboutRulesSonarCloud'; +import AboutCleanCode from './AboutCleanCode'; +import AboutQualityModelSonarCloud from './AboutQualityModelSonarCloud'; +import AboutQualityGates from './AboutQualityGates'; +import AboutLeakPeriod from './AboutLeakPeriod'; +import AboutStandards from './AboutStandards'; +import AboutScanners from './AboutScanners'; +import SonarCloudGetStarted from './SonarCloudGetStarted'; +import '../sonarcloud-styles.css'; + +/*:: +type Props = { + appState: { + defaultOrganization: string, + organizationsEnabled: boolean + }, + bugs: number, + codeSmells: number, + currentUser: { isLoggedIn: boolean }, + customText?: string, + loading: boolean, + projectsCount: number, + vulnerabilities: number +}; +*/ + +export default function AboutAppSonarCloud(props /*: Props */) { + const { customText } = props; + + return ( +
+
+
+
+

+ Continuous Code Quality
as a Service +

+ {!props.currentUser.isLoggedIn && } +
+ +
+ + +
+
+
+ + + +
+ {customText != null && + customText.value && ( +
+ )} + + + +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ + +
+
+ ); +} diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutAppSonarCloudLazyLoader.js b/server/sonar-web/src/main/js/apps/about/components/AboutAppSonarCloudLazyLoader.js new file mode 100644 index 00000000000..b18c0780e7b --- /dev/null +++ b/server/sonar-web/src/main/js/apps/about/components/AboutAppSonarCloudLazyLoader.js @@ -0,0 +1,45 @@ +/* + * SonarQube + * Copyright (C) 2009-2017 SonarSource SA + * mailto:info 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 class AboutAppSonarCloudLazyLoader extends React.PureComponent { + constructor(props) { + super(props); + this.state = { + AboutAppSonarCloud: null + }; + } + + componentDidMount() { + if (!this.state.AboutAppSonarCloud) { + import('./AboutAppSonarCloud').then(({ default: AboutAppSonarCloud }) => + this.setState({ AboutAppSonarCloud }) + ); + } + } + + render() { + const { AboutAppSonarCloud } = this.state; + if (AboutAppSonarCloud) { + return ; + } + return null; + } +} 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 deleted file mode 100644 index 277c1ea2036..00000000000 --- a/server/sonar-web/src/main/js/apps/about/components/AboutQualityModelForSonarQubeDotCom.js +++ /dev/null @@ -1,66 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2017 SonarSource SA - * mailto:info 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 function AboutQualityModelForSonarQubeDotCom() { - 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/AboutQualityModelSonarCloud.js b/server/sonar-web/src/main/js/apps/about/components/AboutQualityModelSonarCloud.js new file mode 100644 index 00000000000..df5d87996eb --- /dev/null +++ b/server/sonar-web/src/main/js/apps/about/components/AboutQualityModelSonarCloud.js @@ -0,0 +1,66 @@ +/* + * SonarQube + * Copyright (C) 2009-2017 SonarSource SA + * mailto:info 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 BugIconSonarCloud from './BugIconSonarCloud'; +import VulnerabilityIconSonarCloud from './VulnerabilityIconSonarCloud'; +import CodeSmellIconSonarCloud from './CodeSmellIconSonarCloud'; + +export default function AboutQualityModelSonarCloud() { + 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 deleted file mode 100644 index 1669da98c6a..00000000000 --- a/server/sonar-web/src/main/js/apps/about/components/AboutRulesForSonarQubeDotCom.js +++ /dev/null @@ -1,79 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2017 SonarSource SA - * mailto:info 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'; - -/*:: -type Props = { - appState: { - defaultOrganization: string, - organizationsEnabled: boolean - } -}; -*/ - -export default function AboutRulesForSonarQubeDotCom(props /*: Props */) { - const organization = props.appState.defaultOrganization; - - return ( -
-
- - +3,000 rules - - - - - - - - - - JavaScript - - - Java - - - C/C++ - - - C# - - - And More - -
-
- ); -} diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutRulesSonarCloud.js b/server/sonar-web/src/main/js/apps/about/components/AboutRulesSonarCloud.js new file mode 100644 index 00000000000..67f3037edb2 --- /dev/null +++ b/server/sonar-web/src/main/js/apps/about/components/AboutRulesSonarCloud.js @@ -0,0 +1,79 @@ +/* + * SonarQube + * Copyright (C) 2009-2017 SonarSource SA + * mailto:info 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'; + +/*:: +type Props = { + appState: { + defaultOrganization: string, + organizationsEnabled: boolean + } +}; +*/ + +export default function AboutRulesSonarCloud(props /*: Props */) { + const organization = props.appState.defaultOrganization; + + return ( +
+
+ + +3,000 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 deleted file mode 100644 index 808b95d011f..00000000000 --- a/server/sonar-web/src/main/js/apps/about/components/BugIconForSonarQubeDotCom.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2017 SonarSource SA - * mailto:info 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 function BugIconForSonarQubeDotCom() { - /* eslint-disable max-len */ - return ( - - - - ); -} diff --git a/server/sonar-web/src/main/js/apps/about/components/BugIconSonarCloud.js b/server/sonar-web/src/main/js/apps/about/components/BugIconSonarCloud.js new file mode 100644 index 00000000000..7ba3dadede8 --- /dev/null +++ b/server/sonar-web/src/main/js/apps/about/components/BugIconSonarCloud.js @@ -0,0 +1,33 @@ +/* + * SonarQube + * Copyright (C) 2009-2017 SonarSource SA + * mailto:info 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 function BugIconSonarCloud() { + /* 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 deleted file mode 100644 index e4c0df6452b..00000000000 --- a/server/sonar-web/src/main/js/apps/about/components/CodeSmellIconForSonarQubeDotCom.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2017 SonarSource SA - * mailto:info 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 function CodeSmellIconForSonarQubeDotCom() { - /* eslint-disable max-len */ - return ( - - - - ); -} diff --git a/server/sonar-web/src/main/js/apps/about/components/CodeSmellIconSonarCloud.js b/server/sonar-web/src/main/js/apps/about/components/CodeSmellIconSonarCloud.js new file mode 100644 index 00000000000..dc9030b2273 --- /dev/null +++ b/server/sonar-web/src/main/js/apps/about/components/CodeSmellIconSonarCloud.js @@ -0,0 +1,33 @@ +/* + * SonarQube + * Copyright (C) 2009-2017 SonarSource SA + * mailto:info 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 function CodeSmellIconSonarCloud() { + /* eslint-disable max-len */ + return ( + + + + ); +} 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 deleted file mode 100644 index 582bf582d38..00000000000 --- a/server/sonar-web/src/main/js/apps/about/components/EntryIssueTypesForSonarQubeDotCom.js +++ /dev/null @@ -1,102 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2017 SonarSource SA - * mailto:info 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 { 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'; - -/*:: -type Props = { - bugs: ?number, - codeSmells: ?number, - loading: boolean, - vulnerabilities: ?number -}; -*/ - -export default function EntryIssueTypesForSonarQubeDotCom( - { bugs, codeSmells, loading, vulnerabilities } /*: Props */ -) { - return ( -
- {loading && } - {!loading && ( - - - - - - - - - - - - - - - -
- - {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/EntryIssueTypesSonarCloud.js b/server/sonar-web/src/main/js/apps/about/components/EntryIssueTypesSonarCloud.js new file mode 100644 index 00000000000..8a46248ae16 --- /dev/null +++ b/server/sonar-web/src/main/js/apps/about/components/EntryIssueTypesSonarCloud.js @@ -0,0 +1,102 @@ +/* + * SonarQube + * Copyright (C) 2009-2017 SonarSource SA + * mailto:info 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 { formatMeasure } from '../../../helpers/measures'; +import { translate } from '../../../helpers/l10n'; +import { getIssuesUrl } from '../../../helpers/urls'; +import BugIconSonarCloud from './BugIconSonarCloud'; +import VulnerabilityIconSonarCloud from './VulnerabilityIconSonarCloud'; +import CodeSmellIconSonarCloud from './CodeSmellIconSonarCloud'; + +/*:: +type Props = { + bugs: ?number, + codeSmells: ?number, + loading: boolean, + vulnerabilities: ?number +}; +*/ + +export default function EntryIssueTypesSonarCloud( + { bugs, codeSmells, loading, vulnerabilities } /*: Props */ +) { + return ( +
+ {loading && } + {!loading && ( + + + + + + + + + + + + + + + +
+ + {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/VulnerabilityIconForSonarQubeDotCom.js b/server/sonar-web/src/main/js/apps/about/components/VulnerabilityIconForSonarQubeDotCom.js deleted file mode 100644 index 8f666af2f04..00000000000 --- a/server/sonar-web/src/main/js/apps/about/components/VulnerabilityIconForSonarQubeDotCom.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2017 SonarSource SA - * mailto:info 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 function VulnerabilityIconForSonarQubeDotCom() { - /* eslint-disable max-len */ - return ( - - - - ); -} diff --git a/server/sonar-web/src/main/js/apps/about/components/VulnerabilityIconSonarCloud.js b/server/sonar-web/src/main/js/apps/about/components/VulnerabilityIconSonarCloud.js new file mode 100644 index 00000000000..442d15a1b7e --- /dev/null +++ b/server/sonar-web/src/main/js/apps/about/components/VulnerabilityIconSonarCloud.js @@ -0,0 +1,33 @@ +/* + * SonarQube + * Copyright (C) 2009-2017 SonarSource SA + * mailto:info 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 function VulnerabilityIconSonarCloud() { + /* eslint-disable max-len */ + return ( + + + + ); +} diff --git a/server/sonar-web/src/main/js/apps/about/sonarcloud-styles.css b/server/sonar-web/src/main/js/apps/about/sonarcloud-styles.css new file mode 100644 index 00000000000..88db615075e --- /dev/null +++ b/server/sonar-web/src/main/js/apps/about/sonarcloud-styles.css @@ -0,0 +1,150 @@ +@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 .page-limited { + display: flex; + justify-content: space-between; + align-items: center; + padding-top: 0; + padding-bottom: 0; +} + +.sqcom-about-page-intro { +} + +.sqcom-about-page-intro > h1 { + line-height: 44px; + color: #fff; + font-size: 36px; + font-weight: 300; +} + +.sonarcloud-about-github-button { + display: inline-block; + height: 44px; + line-height: 46px; + padding-left: 20px; + padding-right: 20px; + border: none; + border-radius: 3px; + background-color: #444; + color: #fff !important; + font-size: 15px; + font-weight: 500; + text-transform: uppercase; +} + +.sonarcloud-about-github-button:hover, +.sonarcloud-about-github-button:focus { + background-color: #333; +} + +.sonarcloud-about-github-button img { + margin-top: 12px; + margin-right: 10px; +} + +.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; + min-height: 105px; + 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: #4193c8; +} + +.sqcom-about-rules .page-limited { + display: flex; + justify-content: space-between; + align-items: center; + padding-top: 0; + padding-bottom: 0; +} + +.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: #3988bc; + color: #fff; +} + +.sqcom-about-rules-link:hover path { + fill: #fff; +} + +.sqcom-about-quality-model svg { + transform: translateY(-3px) !important; +} + +.sqcom-get-started .oauth-providers > ul { + width: 380px; + justify-content: space-between; + font-size: 14px; + margin-bottom: -30px; +} 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 deleted file mode 100644 index 88db615075e..00000000000 --- a/server/sonar-web/src/main/js/apps/about/sonarqube-dot-com-styles.css +++ /dev/null @@ -1,150 +0,0 @@ -@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 .page-limited { - display: flex; - justify-content: space-between; - align-items: center; - padding-top: 0; - padding-bottom: 0; -} - -.sqcom-about-page-intro { -} - -.sqcom-about-page-intro > h1 { - line-height: 44px; - color: #fff; - font-size: 36px; - font-weight: 300; -} - -.sonarcloud-about-github-button { - display: inline-block; - height: 44px; - line-height: 46px; - padding-left: 20px; - padding-right: 20px; - border: none; - border-radius: 3px; - background-color: #444; - color: #fff !important; - font-size: 15px; - font-weight: 500; - text-transform: uppercase; -} - -.sonarcloud-about-github-button:hover, -.sonarcloud-about-github-button:focus { - background-color: #333; -} - -.sonarcloud-about-github-button img { - margin-top: 12px; - margin-right: 10px; -} - -.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; - min-height: 105px; - 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: #4193c8; -} - -.sqcom-about-rules .page-limited { - display: flex; - justify-content: space-between; - align-items: center; - padding-top: 0; - padding-bottom: 0; -} - -.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: #3988bc; - color: #fff; -} - -.sqcom-about-rules-link:hover path { - fill: #fff; -} - -.sqcom-about-quality-model svg { - transform: translateY(-3px) !important; -} - -.sqcom-get-started .oauth-providers > ul { - width: 380px; - justify-content: space-between; - font-size: 14px; - margin-bottom: -30px; -} -- cgit v1.2.3