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 --- .../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 ++++++ 17 files changed, 508 insertions(+), 508 deletions(-) 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 (limited to 'server/sonar-web/src/main/js/apps/about/components') 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 ( + + + + ); +} -- cgit v1.2.3