From: Wouter Admiraal Date: Tue, 9 Apr 2019 12:05:55 +0000 (+0200) Subject: SONAR-11893 Add hotspots to the SQ about page X-Git-Tag: 7.8~357 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3ed7499cf33e511b8040dcd3b727f821b3d2f968;p=sonarqube.git SONAR-11893 Add hotspots to the SQ about page * Mock Icon components to avoid having SVG data in snapshots --- diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutApp.tsx b/server/sonar-web/src/main/js/apps/about/components/AboutApp.tsx index 7c35f893d3a..9e4e5f939bc 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutApp.tsx +++ b/server/sonar-web/src/main/js/apps/about/components/AboutApp.tsx @@ -115,10 +115,12 @@ export class AboutApp extends React.PureComponent { let bugs; let vulnerabilities; let codeSmells; + let securityHotspots; if (!loading && issueTypes) { bugs = issueTypes['BUG'] && issueTypes['BUG'].count; vulnerabilities = issueTypes['VULNERABILITY'] && issueTypes['VULNERABILITY'].count; codeSmells = issueTypes['CODE_SMELL'] && issueTypes['CODE_SMELL'].count; + securityHotspots = issueTypes['SECURITY_HOTSPOT'] && issueTypes['SECURITY_HOTSPOT'].count; } return ( @@ -149,6 +151,7 @@ export class AboutApp extends React.PureComponent { bugs={bugs} codeSmells={codeSmells} loading={loading} + securityHotspots={securityHotspots} vulnerabilities={vulnerabilities} /> diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutQualityModel.tsx b/server/sonar-web/src/main/js/apps/about/components/AboutQualityModel.tsx index cd47dccc922..897b66d2f95 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutQualityModel.tsx +++ b/server/sonar-web/src/main/js/apps/about/components/AboutQualityModel.tsx @@ -22,6 +22,7 @@ import { translate } from '../../../helpers/l10n'; import BugIcon from '../../../components/icons-components/BugIcon'; import VulnerabilityIcon from '../../../components/icons-components/VulnerabilityIcon'; import CodeSmellIcon from '../../../components/icons-components/CodeSmellIcon'; +import SecurityHotspotIcon from '../../../components/icons-components/SecurityHotspotIcon'; export default function AboutQualityModel() { return ( @@ -31,6 +32,7 @@ export default function AboutQualityModel() {
+

{translate('metric_domain.Reliability')}

@@ -41,6 +43,7 @@ export default function AboutQualityModel() {
+

{translate('metric_domain.Security')}

@@ -48,9 +51,18 @@ export default function AboutQualityModel() { {translate('issue.type.VULNERABILITY.plural')}{' '} {translate('about_page.quality_model.vulnerabilities')}

+
+
+ +
+

+ {translate('issue.type.SECURITY_HOTSPOT.plural')}{' '} + {translate('about_page.quality_model.security_hotspots')} +

+

{translate('metric_domain.Maintainability')}

diff --git a/server/sonar-web/src/main/js/apps/about/components/EntryIssueTypes.tsx b/server/sonar-web/src/main/js/apps/about/components/EntryIssueTypes.tsx index 25be2ab2c10..56896d8e129 100644 --- a/server/sonar-web/src/main/js/apps/about/components/EntryIssueTypes.tsx +++ b/server/sonar-web/src/main/js/apps/about/components/EntryIssueTypes.tsx @@ -25,15 +25,23 @@ import { getIssuesUrl } from '../../../helpers/urls'; import BugIcon from '../../../components/icons-components/BugIcon'; import VulnerabilityIcon from '../../../components/icons-components/VulnerabilityIcon'; import CodeSmellIcon from '../../../components/icons-components/CodeSmellIcon'; +import SecurityHotspotIcon from '../../../components/icons-components/SecurityHotspotIcon'; interface Props { bugs?: number; codeSmells?: number; loading: boolean; + securityHotspots?: number; vulnerabilities?: number; } -export default function EntryIssueTypes({ bugs, codeSmells, loading, vulnerabilities }: Props) { +export default function EntryIssueTypes({ + bugs, + codeSmells, + loading, + securityHotspots, + vulnerabilities +}: Props) { return (
{loading ? ( @@ -90,6 +98,25 @@ export default function EntryIssueTypes({ bugs, codeSmells, loading, vulnerabili {translate('issue.type.CODE_SMELL.plural')} + + + + {formatMeasure(securityHotspots, 'SHORT_INT')} + + + + + + + {translate('issue.type.SECURITY_HOTSPOT.plural')} + + )} diff --git a/server/sonar-web/src/main/js/apps/about/components/__tests__/AboutApp-test.tsx b/server/sonar-web/src/main/js/apps/about/components/__tests__/AboutApp-test.tsx index f18f087816e..f76f45071c6 100644 --- a/server/sonar-web/src/main/js/apps/about/components/__tests__/AboutApp-test.tsx +++ b/server/sonar-web/src/main/js/apps/about/components/__tests__/AboutApp-test.tsx @@ -26,23 +26,30 @@ import { getFacet } from '../../../../api/issues'; import { mockLocation, mockAppState, mockCurrentUser } from '../../../../helpers/testMocks'; import { waitAndUpdate } from '../../../../helpers/testUtils'; +jest.mock('../../../../components/icons-components/BugIcon'); +jest.mock('../../../../components/icons-components/VulnerabilityIcon'); +jest.mock('../../../../components/icons-components/CodeSmellIcon'); +jest.mock('../../../../components/icons-components/SecurityHotspotIcon'); +jest.mock('../../../../components/icons-components/TagsIcon'); + jest.mock('../../../../helpers/pages', () => ({ addWhitePageClass: jest.fn(), removeWhitePageClass: jest.fn() })); jest.mock('../../../../api/components', () => ({ - searchProjects: jest.fn().mockResolvedValue(5) + searchProjects: jest.fn().mockResolvedValue({ paging: { total: 5 } }) })); jest.mock('../../../../api/issues', () => ({ - getFacet: jest - .fn() - .mockResolvedValue([ - { facet: { count: 5, val: 'CODE_SMELL' } }, - { facet: { count: 10, val: 'BUG' } }, - { facet: { count: 0, val: 'VULNERABILITY' } } - ]) + getFacet: jest.fn().mockResolvedValue({ + facet: [ + { count: 5, val: 'CODE_SMELL' }, + { count: 10, val: 'BUG' }, + { count: 0, val: 'VULNERABILITY' }, + { count: 5, val: 'SECURITY_HOTSPOT' } + ] + }) })); jest.mock('../../../../app/components/GlobalContainer', () => ({ @@ -79,7 +86,7 @@ function mountRender(props: Partial = {}) { appState={mockAppState()} currentUser={mockCurrentUser()} customText="Lorem ipsum" - fetchAboutPageSettings={jest.fn()} + fetchAboutPageSettings={jest.fn().mockResolvedValue('')} location={mockLocation()} {...props} /> diff --git a/server/sonar-web/src/main/js/apps/about/components/__tests__/__snapshots__/AboutApp-test.tsx.snap b/server/sonar-web/src/main/js/apps/about/components/__tests__/__snapshots__/AboutApp-test.tsx.snap index f1923220a93..0a365f46bfb 100644 --- a/server/sonar-web/src/main/js/apps/about/components/__tests__/__snapshots__/AboutApp-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/about/components/__tests__/__snapshots__/AboutApp-test.tsx.snap @@ -28,7 +28,7 @@ exports[`should render correctly 1`] = ` "results": Array [ Object { "type": "return", - "value": undefined, + "value": Promise {}, }, ], } @@ -113,7 +113,7 @@ exports[`should render correctly 1`] = ` className="about-page-instance" >
- 0 + 5
@@ -143,7 +143,11 @@ exports[`should render correctly 1`] = `
+ > + 10 + - - - - - - - + issue.type.BUG.plural @@ -238,42 +216,16 @@ exports[`should render correctly 1`] = ` className="about-page-issue-type-link" onClick={[Function]} style={Object {}} - /> + > + 0 + - - - - - - - + issue.type.VULNERABILITY.plural @@ -301,46 +253,57 @@ exports[`should render correctly 1`] = ` className="about-page-issue-type-link" onClick={[Function]} style={Object {}} - /> + > + 5 + - - - - - - - + issue.type.CODE_SMELL.plural + + + + + 5 + + + + + + + + issue.type.SECURITY_HOTSPOT.plural + +
@@ -553,38 +516,13 @@ exports[`should render correctly 1`] = `
+

+ metric_domain.Reliability +

- - - - - - - +

+

+ metric_domain.Security +

- - - - - - - +

+
+

+ +
+

+ + issue.type.SECURITY_HOTSPOT.plural + + + about_page.quality_model.security_hotspots +

+

+ metric_domain.Maintainability +

- - - - - - - +

- - - - - - - + @@ -931,35 +806,7 @@ exports[`should render correctly 1`] = ` onClick={[Function]} style={Object {}} > - - - - - - - + @@ -987,35 +834,7 @@ exports[`should render correctly 1`] = ` onClick={[Function]} style={Object {}} > - - - - - - - + @@ -1043,35 +862,7 @@ exports[`should render correctly 1`] = ` onClick={[Function]} style={Object {}} > - - - - - - - + @@ -1099,35 +890,7 @@ exports[`should render correctly 1`] = ` onClick={[Function]} style={Object {}} > - - - - - - - + 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 c382fb64241..745204dedcd 100644 --- a/server/sonar-web/src/main/js/apps/about/styles.css +++ b/server/sonar-web/src/main/js/apps/about/styles.css @@ -35,6 +35,12 @@ padding-top: 25px; } +.about-page .boxed-group h3 { + font-weight: normal; + font-size: var(--bigFontSize); + padding-bottom: calc(1.5 * var(--gridSize)); +} + .about-page .boxed-group-inner { padding-left: 0; padding-right: 0; diff --git a/server/sonar-web/src/main/js/apps/groups/components/__tests__/EditMembers-test.tsx b/server/sonar-web/src/main/js/apps/groups/components/__tests__/EditMembers-test.tsx index 327585ebcd4..1331cff110c 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/__tests__/EditMembers-test.tsx +++ b/server/sonar-web/src/main/js/apps/groups/components/__tests__/EditMembers-test.tsx @@ -22,6 +22,9 @@ import { mount } from 'enzyme'; import EditMembers from '../EditMembers'; import { click, waitAndUpdate } from '../../../../helpers/testUtils'; +jest.mock('../../../../components/icons-components/SearchIcon'); +jest.mock('../../../../components/icons-components/BulletListIcon'); + it('should edit members', async () => { const group = { id: 3, name: 'Foo', membersCount: 5 }; const onEdit = jest.fn(); diff --git a/server/sonar-web/src/main/js/apps/groups/components/__tests__/__snapshots__/EditMembers-test.tsx.snap b/server/sonar-web/src/main/js/apps/groups/components/__tests__/__snapshots__/EditMembers-test.tsx.snap index 2b82e47237e..daf6e70e72b 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/__tests__/__snapshots__/EditMembers-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/groups/components/__tests__/__snapshots__/EditMembers-test.tsx.snap @@ -36,35 +36,7 @@ exports[`should edit members 1`] = ` } type="button" > - - - - - - - + @@ -107,35 +79,7 @@ exports[`should edit members 2`] = ` } type="button" > - - - - - - - + @@ -258,21 +202,6 @@ exports[`should edit members 2`] = ` type="search" value="" /> - - -

@@ -514,38 +443,7 @@ exports[`should edit members 2`] = ` > - - - - - - + />
@@ -655,35 +553,7 @@ exports[`should edit members 3`] = ` } type="button" > - - - - - - - + diff --git a/server/sonar-web/src/main/js/apps/overview/main/__tests__/Bugs-test.tsx b/server/sonar-web/src/main/js/apps/overview/main/__tests__/Bugs-test.tsx index 1c52153ed50..f436be6f487 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/__tests__/Bugs-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/main/__tests__/Bugs-test.tsx @@ -29,6 +29,14 @@ import { mockMetric } from '../../../../helpers/testMocks'; +jest.mock('../../../../components/icons-components/BugIcon', () => ({ + default: ({ className }: any) => +})); + +jest.mock('../../../../components/icons-components/HistoryIcon', () => ({ + default: ({ className }: any) => +})); + it('should render correctly', () => { expect(shallowRender()).toMatchSnapshot(); }); diff --git a/server/sonar-web/src/main/js/apps/overview/main/__tests__/CodeSmells-test.tsx b/server/sonar-web/src/main/js/apps/overview/main/__tests__/CodeSmells-test.tsx index eb4889945ed..b62cbe6651d 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/__tests__/CodeSmells-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/main/__tests__/CodeSmells-test.tsx @@ -28,6 +28,14 @@ import { mockMetric } from '../../../../helpers/testMocks'; +jest.mock('../../../../components/icons-components/CodeSmellIcon', () => ({ + default: ({ className }: any) => +})); + +jest.mock('../../../../components/icons-components/HistoryIcon', () => ({ + default: ({ className }: any) => +})); + it('should render correctly', () => { expect(shallowRender()).toMatchSnapshot(); }); diff --git a/server/sonar-web/src/main/js/apps/overview/main/__tests__/Coverage-test.tsx b/server/sonar-web/src/main/js/apps/overview/main/__tests__/Coverage-test.tsx index 6186947ffda..45d4916026b 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/__tests__/Coverage-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/main/__tests__/Coverage-test.tsx @@ -28,6 +28,14 @@ import { mockMetric } from '../../../../helpers/testMocks'; +jest.mock('../../../../components/ui/CoverageRating', () => ({ + default: () => +})); + +jest.mock('../../../../components/icons-components/HistoryIcon', () => ({ + default: ({ className }: any) => +})); + it('should render correctly', () => { expect(shallowRender()).toMatchSnapshot(); }); diff --git a/server/sonar-web/src/main/js/apps/overview/main/__tests__/Duplications-test.tsx b/server/sonar-web/src/main/js/apps/overview/main/__tests__/Duplications-test.tsx index e98f2c2cfd3..b82ef191921 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/__tests__/Duplications-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/main/__tests__/Duplications-test.tsx @@ -28,6 +28,14 @@ import { mockMetric } from '../../../../helpers/testMocks'; +jest.mock('../../../../components/ui/DuplicationsRating', () => ({ + default: () => +})); + +jest.mock('../../../../components/icons-components/HistoryIcon', () => ({ + default: ({ className }: any) => +})); + it('should render correctly', () => { expect(shallowRender()).toMatchSnapshot(); }); diff --git a/server/sonar-web/src/main/js/apps/overview/main/__tests__/VulnerabilitiesAndHotspots-test.tsx b/server/sonar-web/src/main/js/apps/overview/main/__tests__/VulnerabilitiesAndHotspots-test.tsx index b9b05f5ad58..a2cc6df1a1e 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/__tests__/VulnerabilitiesAndHotspots-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/main/__tests__/VulnerabilitiesAndHotspots-test.tsx @@ -28,6 +28,22 @@ import { mockMetric } from '../../../../helpers/testMocks'; +jest.mock('../../../../components/icons-components/VulnerabilityIcon', () => ({ + default: ({ className }: any) => ( + + ) +})); + +jest.mock('../../../../components/icons-components/SecurityHotspotIcon', () => ({ + default: ({ className }: any) => ( + + ) +})); + +jest.mock('../../../../components/icons-components/HistoryIcon', () => ({ + default: ({ className }: any) => +})); + it('should render correctly', () => { expect(shallowRender()).toMatchSnapshot(); }); diff --git a/server/sonar-web/src/main/js/apps/overview/main/__tests__/__snapshots__/Bugs-test.tsx.snap b/server/sonar-web/src/main/js/apps/overview/main/__tests__/__snapshots__/Bugs-test.tsx.snap index 95c23ca9f85..e409157fe3d 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/__tests__/__snapshots__/Bugs-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/overview/main/__tests__/__snapshots__/Bugs-test.tsx.snap @@ -62,38 +62,16 @@ exports[`should render correctly 1`] = ` > - - + data-mocked-icon="BugIcon" + /> overview.metric.bugs
- - + data-mocked-icon="HistoryIcon" + /> project_activity.page @@ -154,19 +132,8 @@ exports[`should render correctly 1`] = ` > - - + data-mocked-icon="BugIcon" + /> overview.metric.new_bugs diff --git a/server/sonar-web/src/main/js/apps/overview/main/__tests__/__snapshots__/CodeSmells-test.tsx.snap b/server/sonar-web/src/main/js/apps/overview/main/__tests__/__snapshots__/CodeSmells-test.tsx.snap index 1842d0aa2b8..966ddd6b874 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/__tests__/__snapshots__/CodeSmells-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/overview/main/__tests__/__snapshots__/CodeSmells-test.tsx.snap @@ -67,19 +67,8 @@ exports[`should render correctly 1`] = ` class="overview-domain-measure-history-link" > - - + data-mocked-icon="HistoryIcon" + /> project_activity.page @@ -100,38 +89,16 @@ exports[`should render correctly 1`] = ` > - - + data-mocked-icon="CodeSmellIcon" + /> overview.metric.code_smells - - + data-mocked-icon="HistoryIcon" + /> project_activity.page @@ -197,19 +164,8 @@ exports[`should render correctly 1`] = ` > - - + data-mocked-icon="CodeSmellIcon" + /> overview.metric.new_code_smells diff --git a/server/sonar-web/src/main/js/apps/overview/main/__tests__/__snapshots__/Coverage-test.tsx.snap b/server/sonar-web/src/main/js/apps/overview/main/__tests__/__snapshots__/Coverage-test.tsx.snap index 65cc3f86dcb..081c6254d82 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/__tests__/__snapshots__/Coverage-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/overview/main/__tests__/__snapshots__/Coverage-test.tsx.snap @@ -34,7 +34,11 @@ exports[`should render correctly 1`] = ` >
+ > + +
@@ -58,19 +62,8 @@ exports[`should render correctly 1`] = ` class="overview-domain-measure-history-link" > - - + data-mocked-icon="HistoryIcon" + /> project_activity.page @@ -80,19 +73,8 @@ exports[`should render correctly 1`] = ` class="overview-domain-measure-history-link" > - - + data-mocked-icon="HistoryIcon" + /> project_activity.page @@ -120,19 +102,8 @@ exports[`should render correctly 1`] = ` class="overview-domain-measure-history-link" > - - + data-mocked-icon="HistoryIcon" + /> project_activity.page diff --git a/server/sonar-web/src/main/js/apps/overview/main/__tests__/__snapshots__/Duplications-test.tsx.snap b/server/sonar-web/src/main/js/apps/overview/main/__tests__/__snapshots__/Duplications-test.tsx.snap index 7c06ddb9058..a30c4a1c8dd 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/__tests__/__snapshots__/Duplications-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/overview/main/__tests__/__snapshots__/Duplications-test.tsx.snap @@ -35,8 +35,8 @@ exports[`should render correctly 1`] = ` - - + data-mocked-icon="HistoryIcon" + /> project_activity.page @@ -212,19 +151,8 @@ exports[`should render correctly 1`] = ` > - - + data-mocked-icon="VulnerabilityIcon" + /> overview.metric.new_vulnerabilities
@@ -245,36 +173,8 @@ exports[`should render correctly 1`] = ` > - - - - - - - + data-mocked-icon="SecurityHotspotIcon" + /> overview.metric.new_security_hotspots diff --git a/server/sonar-web/src/main/js/apps/system/components/info-items/__tests__/SysInfoItem-test.tsx b/server/sonar-web/src/main/js/apps/system/components/info-items/__tests__/SysInfoItem-test.tsx index 9417813f309..d2def0a2fb2 100644 --- a/server/sonar-web/src/main/js/apps/system/components/info-items/__tests__/SysInfoItem-test.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/info-items/__tests__/SysInfoItem-test.tsx @@ -21,6 +21,8 @@ import * as React from 'react'; import { shallow, mount } from 'enzyme'; import SysInfoItem from '../SysInfoItem'; +jest.mock('../../../../../components/icons-components/AlertSuccessIcon'); + it('should render string', () => { const wrapper = shallow(); expect(wrapper.find('code').text()).toBe('/some/path/as/an/example'); diff --git a/server/sonar-web/src/main/js/apps/system/components/info-items/__tests__/__snapshots__/SysInfoItem-test.tsx.snap b/server/sonar-web/src/main/js/apps/system/components/info-items/__tests__/__snapshots__/SysInfoItem-test.tsx.snap index 6b61b4c785e..7c39d65bb9e 100644 --- a/server/sonar-web/src/main/js/apps/system/components/info-items/__tests__/__snapshots__/SysInfoItem-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/system/components/info-items/__tests__/__snapshots__/SysInfoItem-test.tsx.snap @@ -127,35 +127,7 @@ Array [ - - - - - - - + diff --git a/server/sonar-web/src/main/js/components/icons-components/__mocks__/AlertSuccessIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/__mocks__/AlertSuccessIcon.tsx new file mode 100644 index 00000000000..6f3c229e6e1 --- /dev/null +++ b/server/sonar-web/src/main/js/components/icons-components/__mocks__/AlertSuccessIcon.tsx @@ -0,0 +1,22 @@ +/* + * SonarQube + * Copyright (C) 2009-2019 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. + */ +export default function AlertSuccessIcon() { + return null; +} diff --git a/server/sonar-web/src/main/js/components/icons-components/__mocks__/BugIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/__mocks__/BugIcon.tsx new file mode 100644 index 00000000000..6500ff94ef3 --- /dev/null +++ b/server/sonar-web/src/main/js/components/icons-components/__mocks__/BugIcon.tsx @@ -0,0 +1,22 @@ +/* + * SonarQube + * Copyright (C) 2009-2019 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. + */ +export default function BugIcon() { + return null; +} diff --git a/server/sonar-web/src/main/js/components/icons-components/__mocks__/BulletListIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/__mocks__/BulletListIcon.tsx new file mode 100644 index 00000000000..76afa5e10e3 --- /dev/null +++ b/server/sonar-web/src/main/js/components/icons-components/__mocks__/BulletListIcon.tsx @@ -0,0 +1,22 @@ +/* + * SonarQube + * Copyright (C) 2009-2019 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. + */ +export default function BulletListIcon() { + return null; +} diff --git a/server/sonar-web/src/main/js/components/icons-components/__mocks__/CodeSmellIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/__mocks__/CodeSmellIcon.tsx new file mode 100644 index 00000000000..2ac884d8b5f --- /dev/null +++ b/server/sonar-web/src/main/js/components/icons-components/__mocks__/CodeSmellIcon.tsx @@ -0,0 +1,22 @@ +/* + * SonarQube + * Copyright (C) 2009-2019 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. + */ +export default function CodeSmellIcon() { + return null; +} diff --git a/server/sonar-web/src/main/js/components/icons-components/__mocks__/SearchIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/__mocks__/SearchIcon.tsx new file mode 100644 index 00000000000..fc75c18a3f1 --- /dev/null +++ b/server/sonar-web/src/main/js/components/icons-components/__mocks__/SearchIcon.tsx @@ -0,0 +1,22 @@ +/* + * SonarQube + * Copyright (C) 2009-2019 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. + */ +export default function SearchIcon() { + return null; +} diff --git a/server/sonar-web/src/main/js/components/icons-components/__mocks__/SecurityHotspotIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/__mocks__/SecurityHotspotIcon.tsx new file mode 100644 index 00000000000..bbac07e0e74 --- /dev/null +++ b/server/sonar-web/src/main/js/components/icons-components/__mocks__/SecurityHotspotIcon.tsx @@ -0,0 +1,22 @@ +/* + * SonarQube + * Copyright (C) 2009-2019 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. + */ +export default function SecurityHotspotIcon() { + return null; +} diff --git a/server/sonar-web/src/main/js/components/icons-components/__mocks__/TagsIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/__mocks__/TagsIcon.tsx new file mode 100644 index 00000000000..df33ee271b8 --- /dev/null +++ b/server/sonar-web/src/main/js/components/icons-components/__mocks__/TagsIcon.tsx @@ -0,0 +1,22 @@ +/* + * SonarQube + * Copyright (C) 2009-2019 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. + */ +export default function TagsIcon() { + return null; +} diff --git a/server/sonar-web/src/main/js/components/icons-components/__mocks__/VulnerabilityIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/__mocks__/VulnerabilityIcon.tsx new file mode 100644 index 00000000000..fc4bc119626 --- /dev/null +++ b/server/sonar-web/src/main/js/components/icons-components/__mocks__/VulnerabilityIcon.tsx @@ -0,0 +1,22 @@ +/* + * SonarQube + * Copyright (C) 2009-2019 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. + */ +export default function VulnerabilityIcon() { + return null; +} diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties index 9cb8f1ad23e..b0443129738 100644 --- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties +++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties @@ -2640,8 +2640,9 @@ about_page.languages.text=20+ programming languages are supported by SonarQube t about_page.quality_model=Quality Model about_page.quality_model.bugs=track code that is demonstrably wrong or highly likely to yield unexpected behavior. -about_page.quality_model.vulnerabilities=are raised on code that is potentially vulnerable to exploitation by hackers. +about_page.quality_model.vulnerabilities=are raised on code that can be exploited by hackers. about_page.quality_model.code_smells=will confuse maintainers or give them pause. They are measured primarily in terms of the time they will take to fix. +about_page.quality_model.security_hotspots=are raised on security-sensitive code that requires manual review to assess whether or not a vulnerability exists. about_page.clean_code=Write Clean Code about_page.clean_code.text=By fixing new issues as they appear in code, you create and maintain a clean code base. Even on legacy projects, focusing on keeping new code clean will eventually yield a code base you can be proud of.