diff options
author | Philippe Perrin <philippe.perrin@sonarsource.com> | 2021-07-16 14:50:53 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2021-07-21 20:03:01 +0000 |
commit | 22e0696a0924aee4746155771412460085ccb0df (patch) | |
tree | 672a899f67c1df1cc8e582d9329a656c41e236d3 | |
parent | a57b5dd4d8ba48dd55a80111f1c6db54cb36c63d (diff) | |
download | sonarqube-22e0696a0924aee4746155771412460085ccb0df.tar.gz sonarqube-22e0696a0924aee4746155771412460085ccb0df.zip |
SONAR-14617 Target local sonar-ui-common project
330 files changed, 2391 insertions, 796 deletions
diff --git a/build.gradle b/build.gradle index ad2d148b3cb..2d192137221 100644 --- a/build.gradle +++ b/build.gradle @@ -651,6 +651,10 @@ subprojects { // their concurrent execution even in case when one or more of these tasks not // scheduled. def yarnInstallTasks = allprojects.findResults { it -> it.tasks.findByName('yarn') } + +// Drop :server:sonar-ui-common:yarn from the list because it will be creating a circular dependency +yarnInstallTasks.eachWithIndex { t, i -> if (t.path == ':server:sonar-ui-common:yarn') yarnInstallTasks.remove(i) } + yarnInstallTasks.drop(1).eachWithIndex { it, i -> it.mustRunAfter(yarnInstallTasks[0..i]) } // by default, Yarn will update lock file if it is not up to date with "package.json" diff --git a/server/sonar-docs/build.gradle b/server/sonar-docs/build.gradle index d0fc7a471b9..b620475a4c3 100644 --- a/server/sonar-docs/build.gradle +++ b/server/sonar-docs/build.gradle @@ -55,6 +55,10 @@ task extractAnalyzerDocFiles { } } +yarn.configure { + dependsOn tasks.getByPath(':server:sonar-ui-common:yarn_run') +} + yarn_run { def docsVersion = version.split("[.-]").take(2).join('.') environment = [ GATSBY_DOCS_VERSION: docsVersion ] diff --git a/server/sonar-docs/package.json b/server/sonar-docs/package.json index 7e58a2012f8..64eb7a6a417 100644 --- a/server/sonar-docs/package.json +++ b/server/sonar-docs/package.json @@ -23,7 +23,7 @@ "react-helmet": "5.2.1", "react-typography": "0.16.19", "rehype-react": "6.1.0", - "sonar-ui-common": "1.0.33", + "sonar-ui-common": "../sonar-ui-common/build/dist", "typography": "0.16.19" }, "devDependencies": { diff --git a/server/sonar-docs/yarn.lock b/server/sonar-docs/yarn.lock index d59ad06240d..5d71ab30bab 100644 --- a/server/sonar-docs/yarn.lock +++ b/server/sonar-docs/yarn.lock @@ -13691,10 +13691,8 @@ sockjs@0.3.19: faye-websocket "^0.10.0" uuid "^3.0.1" -sonar-ui-common@1.0.33: +sonar-ui-common@../sonar-ui-common/build/dist: version "1.0.33" - resolved "https://repox.jfrog.io/repox/api/npm/npm/sonar-ui-common/-/sonar-ui-common-1.0.33.tgz#8eb6f40b1ab81b802a8eb92fd549598432e9dc26" - integrity sha1-jrb0Cxq4G4Aqjrkv1UlZhDLp3CY= dependencies: "@types/react-select" "1.2.6" classnames "2.2.6" diff --git a/server/sonar-ui-common/HEADER b/server/sonar-ui-common/HEADER deleted file mode 100644 index e288f64a23b..00000000000 --- a/server/sonar-ui-common/HEADER +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Sonar UI Common - * Copyright (C) 2019-2020 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. - */
\ No newline at end of file diff --git a/server/sonar-ui-common/build.gradle b/server/sonar-ui-common/build.gradle new file mode 100644 index 00000000000..e3f264ae0b0 --- /dev/null +++ b/server/sonar-ui-common/build.gradle @@ -0,0 +1,66 @@ +description = 'SonarSource :: Sonar UI Common' + +sonarqube { + properties { + property "sonar.sources", "components,helpers" + property "sonar.exclusions", "**/__tests__/**" + property "sonar.test", "components,helpers" + property "sonar.test.inclusions", "**/__tests__/**" + property "sonar.eslint.reportPaths", "eslint-report.json" + property "sonar.javascript.lcov.reportPaths", "coverage/lcov.info" + property "sonar.coverage.exclusions", "components/icons/*,helpers/testUtils.ts,helpers/keycodes.ts" + property "sonar.typescript.lcov.reportPaths", "build/coverage/lcov.info" + property "sonar.eslint.reportPaths", "build/eslint-report.json" + } +} + +yarn_run { + ['config', 'scripts', 'components', 'helpers'].each { + inputs.dir(it).withPathSensitivity(PathSensitivity.RELATIVE) + } + ['package.json', 'tsconfig.json', 'yarn.lock'].each { + inputs.file(it).withPathSensitivity(PathSensitivity.RELATIVE) + } + outputs.cacheIf { true } + args = ['build'] + ignoreExitValue = false +} + +"yarn_check-ci" { + // Note that outputs are not relocatable, because contain absolute paths, and that's why inputs are not relativized + ['config', 'scripts', 'components', 'helpers'].each { + inputs.dir(it) + } + ['package.json', 'yarn.lock', 'tsconfig.json'].each { + inputs.file(it) + } + + dependsOn(yarn) +} + +"yarn_validate-ci" { + // Note that outputs are not relocatable, because contain absolute paths, and that's why inputs are not relativized + ['config', 'scripts', 'components', 'helpers'].each { + inputs.dir(it) + } + ['.eslintrc', 'package.json', 'yarn.lock', 'tsconfig.json'].each { + inputs.file(it) + } + outputs.file("eslint-report.json") + outputs.dir("coverage") + outputs.cacheIf { true } + + dependsOn(yarn) +} + +def sources = fileTree(dir: "components") + fileTree(dir: "config") + fileTree(dir: "helpers") + +task licenseCheckWeb(type: com.hierynomus.gradle.license.tasks.LicenseCheck) { + source = sources +} +licenseMain.dependsOn licenseCheckWeb + +task licenseFormatWeb(type: com.hierynomus.gradle.license.tasks.LicenseFormat) { + source = sources +} +licenseFormat.dependsOn licenseFormatWeb
\ No newline at end of file diff --git a/server/sonar-ui-common/components/__tests__/getHistory-test.ts b/server/sonar-ui-common/components/__tests__/getHistory-test.ts index 251db853a84..2df78cdd02e 100644 --- a/server/sonar-ui-common/components/__tests__/getHistory-test.ts +++ b/server/sonar-ui-common/components/__tests__/getHistory-test.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/__tests__/lazyLoadComponent-test.tsx b/server/sonar-ui-common/components/__tests__/lazyLoadComponent-test.tsx index 9528fb85dae..216163e9432 100644 --- a/server/sonar-ui-common/components/__tests__/lazyLoadComponent-test.tsx +++ b/server/sonar-ui-common/components/__tests__/lazyLoadComponent-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/charts/AdvancedTimeline.css b/server/sonar-ui-common/components/charts/AdvancedTimeline.css index e372b129e19..d71ef2dee96 100644 --- a/server/sonar-ui-common/components/charts/AdvancedTimeline.css +++ b/server/sonar-ui-common/components/charts/AdvancedTimeline.css @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/charts/AdvancedTimeline.tsx b/server/sonar-ui-common/components/charts/AdvancedTimeline.tsx index 7357f2479a4..0a9bd4125d0 100644 --- a/server/sonar-ui-common/components/charts/AdvancedTimeline.tsx +++ b/server/sonar-ui-common/components/charts/AdvancedTimeline.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -205,6 +205,7 @@ export default class AdvancedTimeline extends React.PureComponent<Props, State> const parentBbox = event.currentTarget.getBoundingClientRect(); const mouseXPos = (event.pageX - parentBbox.left) / parentBbox.width; const xRange = xScale.range(); + const speed = event.deltaMode ? (25 / event.deltaMode) * this.props.zoomSpeed : this.props.zoomSpeed; diff --git a/server/sonar-ui-common/components/charts/BarChart.css b/server/sonar-ui-common/components/charts/BarChart.css index be261a9eb33..849885a4cda 100644 --- a/server/sonar-ui-common/components/charts/BarChart.css +++ b/server/sonar-ui-common/components/charts/BarChart.css @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/charts/BarChart.tsx b/server/sonar-ui-common/components/charts/BarChart.tsx index 470d5be9e26..9f337c99ef5 100644 --- a/server/sonar-ui-common/components/charts/BarChart.tsx +++ b/server/sonar-ui-common/components/charts/BarChart.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/charts/BubbleChart.css b/server/sonar-ui-common/components/charts/BubbleChart.css index fc8be5f29c7..c5faa9af5a1 100644 --- a/server/sonar-ui-common/components/charts/BubbleChart.css +++ b/server/sonar-ui-common/components/charts/BubbleChart.css @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/charts/BubbleChart.tsx b/server/sonar-ui-common/components/charts/BubbleChart.tsx index dcaf101b672..d0a7ae7da23 100644 --- a/server/sonar-ui-common/components/charts/BubbleChart.tsx +++ b/server/sonar-ui-common/components/charts/BubbleChart.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/charts/ColorGradientLegend.css b/server/sonar-ui-common/components/charts/ColorGradientLegend.css index 214832dc2e5..a6c96275921 100644 --- a/server/sonar-ui-common/components/charts/ColorGradientLegend.css +++ b/server/sonar-ui-common/components/charts/ColorGradientLegend.css @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/charts/ColorGradientLegend.tsx b/server/sonar-ui-common/components/charts/ColorGradientLegend.tsx index 50c253a1182..05c417695c5 100644 --- a/server/sonar-ui-common/components/charts/ColorGradientLegend.tsx +++ b/server/sonar-ui-common/components/charts/ColorGradientLegend.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/charts/DonutChart.tsx b/server/sonar-ui-common/components/charts/DonutChart.tsx index 195b5922139..e3c7b60abd2 100644 --- a/server/sonar-ui-common/components/charts/DonutChart.tsx +++ b/server/sonar-ui-common/components/charts/DonutChart.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/charts/Histogram.css b/server/sonar-ui-common/components/charts/Histogram.css index b3db9818586..8ca78c53e4b 100644 --- a/server/sonar-ui-common/components/charts/Histogram.css +++ b/server/sonar-ui-common/components/charts/Histogram.css @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/charts/Histogram.tsx b/server/sonar-ui-common/components/charts/Histogram.tsx index ff39eadf163..61948c4e2a3 100644 --- a/server/sonar-ui-common/components/charts/Histogram.tsx +++ b/server/sonar-ui-common/components/charts/Histogram.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/charts/LineChart.css b/server/sonar-ui-common/components/charts/LineChart.css index a8148c036f6..37d7f95698c 100644 --- a/server/sonar-ui-common/components/charts/LineChart.css +++ b/server/sonar-ui-common/components/charts/LineChart.css @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/charts/LineChart.tsx b/server/sonar-ui-common/components/charts/LineChart.tsx index 9267b42fb43..ea48e43c4e0 100644 --- a/server/sonar-ui-common/components/charts/LineChart.tsx +++ b/server/sonar-ui-common/components/charts/LineChart.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/charts/TreeMap.css b/server/sonar-ui-common/components/charts/TreeMap.css index 379acf633e9..fe9e1d24b18 100644 --- a/server/sonar-ui-common/components/charts/TreeMap.css +++ b/server/sonar-ui-common/components/charts/TreeMap.css @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/charts/TreeMap.tsx b/server/sonar-ui-common/components/charts/TreeMap.tsx index 6d99476b225..de082a37a99 100644 --- a/server/sonar-ui-common/components/charts/TreeMap.tsx +++ b/server/sonar-ui-common/components/charts/TreeMap.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/charts/TreeMapRect.tsx b/server/sonar-ui-common/components/charts/TreeMapRect.tsx index b691a1259bc..7226fd51928 100644 --- a/server/sonar-ui-common/components/charts/TreeMapRect.tsx +++ b/server/sonar-ui-common/components/charts/TreeMapRect.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/charts/ZoomTimeLine.css b/server/sonar-ui-common/components/charts/ZoomTimeLine.css index 4274a32a267..21997431077 100644 --- a/server/sonar-ui-common/components/charts/ZoomTimeLine.css +++ b/server/sonar-ui-common/components/charts/ZoomTimeLine.css @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/charts/ZoomTimeLine.tsx b/server/sonar-ui-common/components/charts/ZoomTimeLine.tsx index b3c75c478c3..de281613fbe 100644 --- a/server/sonar-ui-common/components/charts/ZoomTimeLine.tsx +++ b/server/sonar-ui-common/components/charts/ZoomTimeLine.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -174,9 +174,7 @@ export default class ZoomTimeLine extends React.PureComponent<Props, State> { xArray[1] > xRange[0] && xArray[1] < xRange[xRange.length - 1] ? xScale.invert(xArray[1]) : undefined; - if (this.props.startDate !== startDate || this.props.endDate !== endDate) { - this.props.updateZoom(startDate, endDate); - } + this.props.updateZoom(startDate, endDate); }; renderBaseLine = (xScale: XScale, yScale: YScale) => { diff --git a/server/sonar-ui-common/components/charts/__tests__/AdvancedTimeline-test.tsx b/server/sonar-ui-common/components/charts/__tests__/AdvancedTimeline-test.tsx index 736ffcf10fa..1e16ab14f49 100644 --- a/server/sonar-ui-common/components/charts/__tests__/AdvancedTimeline-test.tsx +++ b/server/sonar-ui-common/components/charts/__tests__/AdvancedTimeline-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -36,11 +36,18 @@ jest.mock('d3-scale', () => { jest.mock('lodash', () => { const lodash = jest.requireActual('lodash'); - return { ...lodash, throttle: (f) => f }; + return { ...lodash, throttle: (f: any) => f }; }); it('should render correctly', () => { expect(shallowRender()).toMatchSnapshot(); + expect(shallowRender({ disableZoom: false, updateZoom: () => {} })).toMatchSnapshot( + 'Zoom enabled' + ); + expect(shallowRender({ formatYTick: (t) => `Nicer tick ${t}` })).toMatchSnapshot('format y tick'); + expect(shallowRender({ width: undefined })).toMatchSnapshot('no width'); + expect(shallowRender({ height: undefined })).toMatchSnapshot('no height'); + expect(shallowRender({ showAreas: undefined })).toMatchSnapshot('no areas'); }); it('should render leak correctly', () => { @@ -144,6 +151,98 @@ it('should update tootlips when selected date changes', () => { expect(updateTooltip).toBeCalled(); }); +it('should handle scroll correcly', () => { + let updateZoom = jest.fn(); + let preventDefault = jest.fn(); + let wrapper = shallowRender({ updateZoom }); + wrapper.instance().handleWheel(({ + preventDefault, + deltaX: 1, + deltaY: -2, + deltaZ: 0, + pageX: 100, + pageY: 1, + currentTarget: ({ + getBoundingClientRect: () => ({ + bottom: 0, + height: 100, + width: 50, + left: 0, + right: 0, + top: 10, + x: 12, + y: 23, + toJSON: () => '', + }), + } as any) as SVGElement, + } as any) as React.WheelEvent<SVGElement>); + expect(preventDefault).toBeCalled(); + expect(updateZoom).toBeCalledWith(new Date('2019-10-01T06:24:00.000Z'), undefined); + + updateZoom = jest.fn(); + preventDefault = jest.fn(); + wrapper = shallowRender({ updateZoom }); + wrapper.instance().handleWheel(({ + preventDefault, + deltaX: 1, + deltaY: 2, + deltaZ: 0, + pageX: 100, + pageY: 1, + deltaMode: 25, + currentTarget: ({ + getBoundingClientRect: () => ({ + bottom: 0, + height: 100, + width: 50, + left: 0, + right: 0, + top: 10, + x: 12, + y: 23, + toJSON: () => '', + }), + } as any) as SVGElement, + } as any) as React.WheelEvent<SVGElement>); + expect(preventDefault).toBeCalled(); + expect(updateZoom).toBeCalledWith(undefined, new Date('2019-10-02T20:48:00.000Z')); +}); + +it('should handle mouse out correcly', () => { + const updateTooltip = jest.fn(); + const wrapper = shallowRender({ updateTooltip: undefined }); + wrapper.setState({ + mouseOver: true, + selectedDate: new Date(), + selectedDateXPos: 1, + selectedDateIdx: 1, + }); + wrapper.instance().handleMouseOut(); + expect(wrapper.state().mouseOver).toBe(true); + + wrapper.setProps({ updateTooltip }); + wrapper.instance().handleMouseOut(); + expect(wrapper.state().mouseOver).toBe(false); + expect(wrapper.state().selectedDate).toBeUndefined(); + expect(wrapper.state().selectedDateXPos).toBeUndefined(); + expect(wrapper.state().selectedDateIdx).toBeUndefined(); + wrapper.instance().handleMouseOut(); +}); + +it('should handle click correcly', () => { + const updateSelectedDate = jest.fn(); + const wrapper = shallowRender({ updateSelectedDate }); + wrapper.setState({ selectedDate: new Date() }); + + wrapper.instance().handleClick(); + expect(updateSelectedDate).toBeCalledWith(wrapper.state().selectedDate); + + wrapper.setProps({ updateSelectedDate: undefined }); + updateSelectedDate.mockClear(); + wrapper.instance().handleClick(); + expect(updateSelectedDate).not.toBeCalled(); +}); + function shallowRender(props?: Partial<AdvancedTimeline['props']>) { return shallow<AdvancedTimeline>( <AdvancedTimeline @@ -154,6 +253,7 @@ function shallowRender(props?: Partial<AdvancedTimeline['props']>) { { name: 'test-1', type: 'test-type-1', + translatedName: '', data: [ { x: new Date('2019-10-01'), @@ -168,6 +268,7 @@ function shallowRender(props?: Partial<AdvancedTimeline['props']>) { { name: 'test-2', type: 'test-type-2', + translatedName: '', data: [ { x: new Date('2019-10-03'), @@ -183,10 +284,11 @@ function shallowRender(props?: Partial<AdvancedTimeline['props']>) { ); } -function mockData(i: number, date: string) { +function mockData(i: number, date: string): T.Chart.Serie { return { name: `t${i}`, type: 'type', + translatedName: '', data: [{ x: new Date(date), y: i }], }; } diff --git a/server/sonar-ui-common/components/charts/__tests__/BarChart-test.tsx b/server/sonar-ui-common/components/charts/__tests__/BarChart-test.tsx index 3ba15c91639..b578e564fad 100644 --- a/server/sonar-ui-common/components/charts/__tests__/BarChart-test.tsx +++ b/server/sonar-ui-common/components/charts/__tests__/BarChart-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/charts/__tests__/BubbleChart-test.tsx b/server/sonar-ui-common/components/charts/__tests__/BubbleChart-test.tsx index 20b57acc0a1..dd68ae319b5 100644 --- a/server/sonar-ui-common/components/charts/__tests__/BubbleChart-test.tsx +++ b/server/sonar-ui-common/components/charts/__tests__/BubbleChart-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/charts/__tests__/ColorGradientLegend-test.tsx b/server/sonar-ui-common/components/charts/__tests__/ColorGradientLegend-test.tsx index cf5a9cb4f5a..76a7c853758 100644 --- a/server/sonar-ui-common/components/charts/__tests__/ColorGradientLegend-test.tsx +++ b/server/sonar-ui-common/components/charts/__tests__/ColorGradientLegend-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/charts/__tests__/DonutChart-test.tsx b/server/sonar-ui-common/components/charts/__tests__/DonutChart-test.tsx index 62e7f9f3e26..a26593699ce 100644 --- a/server/sonar-ui-common/components/charts/__tests__/DonutChart-test.tsx +++ b/server/sonar-ui-common/components/charts/__tests__/DonutChart-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/charts/__tests__/Histogram-test.tsx b/server/sonar-ui-common/components/charts/__tests__/Histogram-test.tsx index 58c92c1e003..15f4754aae0 100644 --- a/server/sonar-ui-common/components/charts/__tests__/Histogram-test.tsx +++ b/server/sonar-ui-common/components/charts/__tests__/Histogram-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/charts/__tests__/LineChart-test.tsx b/server/sonar-ui-common/components/charts/__tests__/LineChart-test.tsx index 77128abefdb..b9c609ac202 100644 --- a/server/sonar-ui-common/components/charts/__tests__/LineChart-test.tsx +++ b/server/sonar-ui-common/components/charts/__tests__/LineChart-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/charts/__tests__/TreeMap-test.tsx b/server/sonar-ui-common/components/charts/__tests__/TreeMap-test.tsx index 168ad9a2066..8b951a9d215 100644 --- a/server/sonar-ui-common/components/charts/__tests__/TreeMap-test.tsx +++ b/server/sonar-ui-common/components/charts/__tests__/TreeMap-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/charts/__tests__/ZoomTimeLine-test.tsx b/server/sonar-ui-common/components/charts/__tests__/ZoomTimeLine-test.tsx index 07b2378fc45..27f3b5c854e 100644 --- a/server/sonar-ui-common/components/charts/__tests__/ZoomTimeLine-test.tsx +++ b/server/sonar-ui-common/components/charts/__tests__/ZoomTimeLine-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - +import { scaleTime } from 'd3-scale'; import { shallow } from 'enzyme'; import * as React from 'react'; import testTheme from '../../../config/jest/testTheme'; @@ -41,6 +41,11 @@ const series = [ }, ]; +it('should render correctly', () => { + expect(shallowRender({ width: undefined })).toMatchSnapshot('no width'); + expect(shallowRender({ height: undefined })).toMatchSnapshot('no height'); +}); + it('should draw a graph with lines', () => { const wrapper = shallowRender(); expect(wrapper.find('.line-chart-grid').exists()).toBe(true); @@ -67,6 +72,29 @@ it('should render areas under the graph lines', () => { expect(shallowRender({ showAreas: true }).find('.line-chart-area').exists()).toBe(true); }); +it('should handle zoom update correctly', () => { + const updateZoom = jest.fn(); + const startDate = new Date('1970-01-01T00:00:00.001Z'); + const endDate = new Date('2000-01-01T00:00:00.001Z'); + let wrapper = shallowRender({ updateZoom, startDate, endDate }); + wrapper + .instance() + .handleZoomUpdate(scaleTime().domain([startDate, endDate]).range([0, 150]), [3, 50]); + expect(updateZoom).toBeCalledWith( + new Date('1970-08-08T03:21:36.001Z'), + new Date('1980-01-01T08:00:00.001Z') + ); + + updateZoom.mockClear(); + + // We throttle the handleZoomUpdate so re-render to avoid issue + wrapper = shallowRender({ updateZoom, startDate, endDate }); + wrapper + .instance() + .handleZoomUpdate(scaleTime().domain([startDate, endDate]).range([0, 150]), [-1, 151]); + expect(updateZoom).toBeCalledWith(undefined, undefined); +}); + function shallowRender(props: Partial<ZoomTimeLine['props']> = {}) { return shallow<ZoomTimeLine>( <ZoomTimeLine diff --git a/server/sonar-ui-common/components/charts/__tests__/__snapshots__/AdvancedTimeline-test.tsx.snap b/server/sonar-ui-common/components/charts/__tests__/__snapshots__/AdvancedTimeline-test.tsx.snap index d3b1d291acc..f4569f0f9fa 100644 --- a/server/sonar-ui-common/components/charts/__tests__/__snapshots__/AdvancedTimeline-test.tsx.snap +++ b/server/sonar-ui-common/components/charts/__tests__/__snapshots__/AdvancedTimeline-test.tsx.snap @@ -301,6 +301,1085 @@ exports[`should render correctly 1`] = ` </svg> `; +exports[`should render correctly: Zoom enabled 1`] = ` +<svg + className="line-chart" + height={100} + width={100} +> + <defs> + <clipPath + id="chart-clip" + > + <rect + height={34} + transform="translate(0,-5)" + width={30} + /> + </clipPath> + </defs> + <g + transform="translate(60, 26)" + > + <g> + <g + key="0" + > + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={24} + y2={24} + /> + </g> + <g + key="0.2" + > + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={22.4} + y2={22.4} + /> + </g> + <g + key="0.4" + > + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={20.8} + y2={20.8} + /> + </g> + <g + key="0.6" + > + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={19.200000000000003} + y2={19.200000000000003} + /> + </g> + <g + key="0.8" + > + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={17.6} + y2={17.6} + /> + </g> + <g + key="1" + > + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={16} + y2={16} + /> + </g> + <g + key="1.2" + > + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={14.400000000000002} + y2={14.400000000000002} + /> + </g> + <g + key="1.4" + > + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={12.800000000000002} + y2={12.800000000000002} + /> + </g> + <g + key="1.6" + > + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={11.2} + y2={11.2} + /> + </g> + <g + key="1.8" + > + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={9.600000000000001} + y2={9.600000000000001} + /> + </g> + <g + key="2" + > + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={8} + y2={8} + /> + </g> + <g + key="2.2" + > + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={6.399999999999999} + y2={6.399999999999999} + /> + </g> + <g + key="2.4" + > + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={4.800000000000002} + y2={4.800000000000002} + /> + </g> + <g + key="2.6" + > + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={3.1999999999999993} + y2={3.1999999999999993} + /> + </g> + <g + key="2.8" + > + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={1.6000000000000023} + y2={1.6000000000000023} + /> + </g> + <g + key="3" + > + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={0} + y2={0} + /> + </g> + </g> + <g + transform="translate(0, 20)" + > + <text + className="line-chart-tick" + key="0" + textAnchor="end" + transform="rotate(-35, 1.875, 24)" + x={1.875} + y={24} + > + October + </text> + <text + className="line-chart-tick" + key="1" + textAnchor="end" + transform="rotate(-35, 5.625, 24)" + x={5.625} + y={24} + > + 06 AM + </text> + <text + className="line-chart-tick" + key="2" + textAnchor="end" + transform="rotate(-35, 9.375, 24)" + x={9.375} + y={24} + > + 12 PM + </text> + <text + className="line-chart-tick" + key="3" + textAnchor="end" + transform="rotate(-35, 13.125, 24)" + x={13.125} + y={24} + > + 06 PM + </text> + <text + className="line-chart-tick" + key="4" + textAnchor="end" + transform="rotate(-35, 16.875, 24)" + x={16.875} + y={24} + > + Wed 02 + </text> + <text + className="line-chart-tick" + key="5" + textAnchor="end" + transform="rotate(-35, 20.625, 24)" + x={20.625} + y={24} + > + 06 AM + </text> + <text + className="line-chart-tick" + key="6" + textAnchor="end" + transform="rotate(-35, 24.375, 24)" + x={24.375} + y={24} + > + 12 PM + </text> + <text + className="line-chart-tick" + key="7" + textAnchor="end" + transform="rotate(-35, 28.125, 24)" + x={28.125} + y={24} + > + 06 PM + </text> + </g> + <g> + <path + className="line-chart-path line-chart-path-0" + d="M0,16L15,8" + key="test-1" + /> + <path + className="line-chart-path line-chart-path-1" + d="M30,0Z" + key="test-2" + /> + </g> + <g> + <circle + className="line-chart-dot line-chart-dot-1" + cx={30} + cy={0} + key="test-20" + r="2" + /> + </g> + <rect + className="chart-mouse-events-overlay" + height={24} + onWheel={[Function]} + width={30} + /> + </g> +</svg> +`; + +exports[`should render correctly: format y tick 1`] = ` +<svg + className="line-chart" + height={100} + width={100} +> + <g + transform="translate(60, 26)" + > + <g> + <g + key="0" + > + <text + className="line-chart-tick line-chart-tick-x" + dx="-1em" + dy="0.3em" + textAnchor="end" + x={0} + y={24} + > + Nicer tick 0 + </text> + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={24} + y2={24} + /> + </g> + <g + key="0.2" + > + <text + className="line-chart-tick line-chart-tick-x" + dx="-1em" + dy="0.3em" + textAnchor="end" + x={0} + y={22.4} + > + Nicer tick 0.2 + </text> + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={22.4} + y2={22.4} + /> + </g> + <g + key="0.4" + > + <text + className="line-chart-tick line-chart-tick-x" + dx="-1em" + dy="0.3em" + textAnchor="end" + x={0} + y={20.8} + > + Nicer tick 0.4 + </text> + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={20.8} + y2={20.8} + /> + </g> + <g + key="0.6" + > + <text + className="line-chart-tick line-chart-tick-x" + dx="-1em" + dy="0.3em" + textAnchor="end" + x={0} + y={19.200000000000003} + > + Nicer tick 0.6 + </text> + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={19.200000000000003} + y2={19.200000000000003} + /> + </g> + <g + key="0.8" + > + <text + className="line-chart-tick line-chart-tick-x" + dx="-1em" + dy="0.3em" + textAnchor="end" + x={0} + y={17.6} + > + Nicer tick 0.8 + </text> + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={17.6} + y2={17.6} + /> + </g> + <g + key="1" + > + <text + className="line-chart-tick line-chart-tick-x" + dx="-1em" + dy="0.3em" + textAnchor="end" + x={0} + y={16} + > + Nicer tick 1 + </text> + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={16} + y2={16} + /> + </g> + <g + key="1.2" + > + <text + className="line-chart-tick line-chart-tick-x" + dx="-1em" + dy="0.3em" + textAnchor="end" + x={0} + y={14.400000000000002} + > + Nicer tick 1.2 + </text> + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={14.400000000000002} + y2={14.400000000000002} + /> + </g> + <g + key="1.4" + > + <text + className="line-chart-tick line-chart-tick-x" + dx="-1em" + dy="0.3em" + textAnchor="end" + x={0} + y={12.800000000000002} + > + Nicer tick 1.4 + </text> + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={12.800000000000002} + y2={12.800000000000002} + /> + </g> + <g + key="1.6" + > + <text + className="line-chart-tick line-chart-tick-x" + dx="-1em" + dy="0.3em" + textAnchor="end" + x={0} + y={11.2} + > + Nicer tick 1.6 + </text> + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={11.2} + y2={11.2} + /> + </g> + <g + key="1.8" + > + <text + className="line-chart-tick line-chart-tick-x" + dx="-1em" + dy="0.3em" + textAnchor="end" + x={0} + y={9.600000000000001} + > + Nicer tick 1.8 + </text> + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={9.600000000000001} + y2={9.600000000000001} + /> + </g> + <g + key="2" + > + <text + className="line-chart-tick line-chart-tick-x" + dx="-1em" + dy="0.3em" + textAnchor="end" + x={0} + y={8} + > + Nicer tick 2 + </text> + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={8} + y2={8} + /> + </g> + <g + key="2.2" + > + <text + className="line-chart-tick line-chart-tick-x" + dx="-1em" + dy="0.3em" + textAnchor="end" + x={0} + y={6.399999999999999} + > + Nicer tick 2.2 + </text> + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={6.399999999999999} + y2={6.399999999999999} + /> + </g> + <g + key="2.4" + > + <text + className="line-chart-tick line-chart-tick-x" + dx="-1em" + dy="0.3em" + textAnchor="end" + x={0} + y={4.800000000000002} + > + Nicer tick 2.4 + </text> + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={4.800000000000002} + y2={4.800000000000002} + /> + </g> + <g + key="2.6" + > + <text + className="line-chart-tick line-chart-tick-x" + dx="-1em" + dy="0.3em" + textAnchor="end" + x={0} + y={3.1999999999999993} + > + Nicer tick 2.6 + </text> + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={3.1999999999999993} + y2={3.1999999999999993} + /> + </g> + <g + key="2.8" + > + <text + className="line-chart-tick line-chart-tick-x" + dx="-1em" + dy="0.3em" + textAnchor="end" + x={0} + y={1.6000000000000023} + > + Nicer tick 2.8 + </text> + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={1.6000000000000023} + y2={1.6000000000000023} + /> + </g> + <g + key="3" + > + <text + className="line-chart-tick line-chart-tick-x" + dx="-1em" + dy="0.3em" + textAnchor="end" + x={0} + y={0} + > + Nicer tick 3 + </text> + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={0} + y2={0} + /> + </g> + </g> + <g + transform="translate(0, 20)" + > + <text + className="line-chart-tick" + key="0" + textAnchor="end" + transform="rotate(-35, 1.875, 24)" + x={1.875} + y={24} + > + October + </text> + <text + className="line-chart-tick" + key="1" + textAnchor="end" + transform="rotate(-35, 5.625, 24)" + x={5.625} + y={24} + > + 06 AM + </text> + <text + className="line-chart-tick" + key="2" + textAnchor="end" + transform="rotate(-35, 9.375, 24)" + x={9.375} + y={24} + > + 12 PM + </text> + <text + className="line-chart-tick" + key="3" + textAnchor="end" + transform="rotate(-35, 13.125, 24)" + x={13.125} + y={24} + > + 06 PM + </text> + <text + className="line-chart-tick" + key="4" + textAnchor="end" + transform="rotate(-35, 16.875, 24)" + x={16.875} + y={24} + > + Wed 02 + </text> + <text + className="line-chart-tick" + key="5" + textAnchor="end" + transform="rotate(-35, 20.625, 24)" + x={20.625} + y={24} + > + 06 AM + </text> + <text + className="line-chart-tick" + key="6" + textAnchor="end" + transform="rotate(-35, 24.375, 24)" + x={24.375} + y={24} + > + 12 PM + </text> + <text + className="line-chart-tick" + key="7" + textAnchor="end" + transform="rotate(-35, 28.125, 24)" + x={28.125} + y={24} + > + 06 PM + </text> + </g> + <g> + <path + className="line-chart-path line-chart-path-0" + d="M0,16L15,8" + key="test-1" + /> + <path + className="line-chart-path line-chart-path-1" + d="M30,0Z" + key="test-2" + /> + </g> + <g> + <circle + className="line-chart-dot line-chart-dot-1" + cx={30} + cy={0} + key="test-20" + r="2" + /> + </g> + <rect + className="chart-mouse-events-overlay" + height={24} + width={30} + /> + </g> +</svg> +`; + +exports[`should render correctly: no areas 1`] = ` +<svg + className="line-chart" + height={100} + width={100} +> + <g + transform="translate(60, 26)" + > + <g> + <g + key="0" + > + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={24} + y2={24} + /> + </g> + <g + key="0.2" + > + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={22.4} + y2={22.4} + /> + </g> + <g + key="0.4" + > + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={20.8} + y2={20.8} + /> + </g> + <g + key="0.6" + > + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={19.200000000000003} + y2={19.200000000000003} + /> + </g> + <g + key="0.8" + > + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={17.6} + y2={17.6} + /> + </g> + <g + key="1" + > + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={16} + y2={16} + /> + </g> + <g + key="1.2" + > + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={14.400000000000002} + y2={14.400000000000002} + /> + </g> + <g + key="1.4" + > + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={12.800000000000002} + y2={12.800000000000002} + /> + </g> + <g + key="1.6" + > + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={11.2} + y2={11.2} + /> + </g> + <g + key="1.8" + > + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={9.600000000000001} + y2={9.600000000000001} + /> + </g> + <g + key="2" + > + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={8} + y2={8} + /> + </g> + <g + key="2.2" + > + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={6.399999999999999} + y2={6.399999999999999} + /> + </g> + <g + key="2.4" + > + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={4.800000000000002} + y2={4.800000000000002} + /> + </g> + <g + key="2.6" + > + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={3.1999999999999993} + y2={3.1999999999999993} + /> + </g> + <g + key="2.8" + > + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={1.6000000000000023} + y2={1.6000000000000023} + /> + </g> + <g + key="3" + > + <line + className="line-chart-grid" + x1={0} + x2={30} + y1={0} + y2={0} + /> + </g> + </g> + <g + transform="translate(0, 20)" + > + <text + className="line-chart-tick" + key="0" + textAnchor="end" + transform="rotate(-35, 1.875, 24)" + x={1.875} + y={24} + > + October + </text> + <text + className="line-chart-tick" + key="1" + textAnchor="end" + transform="rotate(-35, 5.625, 24)" + x={5.625} + y={24} + > + 06 AM + </text> + <text + className="line-chart-tick" + key="2" + textAnchor="end" + transform="rotate(-35, 9.375, 24)" + x={9.375} + y={24} + > + 12 PM + </text> + <text + className="line-chart-tick" + key="3" + textAnchor="end" + transform="rotate(-35, 13.125, 24)" + x={13.125} + y={24} + > + 06 PM + </text> + <text + className="line-chart-tick" + key="4" + textAnchor="end" + transform="rotate(-35, 16.875, 24)" + x={16.875} + y={24} + > + Wed 02 + </text> + <text + className="line-chart-tick" + key="5" + textAnchor="end" + transform="rotate(-35, 20.625, 24)" + x={20.625} + y={24} + > + 06 AM + </text> + <text + className="line-chart-tick" + key="6" + textAnchor="end" + transform="rotate(-35, 24.375, 24)" + x={24.375} + y={24} + > + 12 PM + </text> + <text + className="line-chart-tick" + key="7" + textAnchor="end" + transform="rotate(-35, 28.125, 24)" + x={28.125} + y={24} + > + 06 PM + </text> + </g> + <g> + <path + className="line-chart-path line-chart-path-0" + d="M0,16L15,8" + key="test-1" + /> + <path + className="line-chart-path line-chart-path-1" + d="M30,0Z" + key="test-2" + /> + </g> + <g> + <circle + className="line-chart-dot line-chart-dot-1" + cx={30} + cy={0} + key="test-20" + r="2" + /> + </g> + <rect + className="chart-mouse-events-overlay" + height={24} + width={30} + /> + </g> +</svg> +`; + +exports[`should render correctly: no height 1`] = `<div />`; + +exports[`should render correctly: no width 1`] = `<div />`; + exports[`should render leak legend correctly 1`] = ` <Fragment> <rect diff --git a/server/sonar-ui-common/components/charts/__tests__/__snapshots__/ZoomTimeLine-test.tsx.snap b/server/sonar-ui-common/components/charts/__tests__/__snapshots__/ZoomTimeLine-test.tsx.snap new file mode 100644 index 00000000000..adb3c28e914 --- /dev/null +++ b/server/sonar-ui-common/components/charts/__tests__/__snapshots__/ZoomTimeLine-test.tsx.snap @@ -0,0 +1,5 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`should render correctly: no height 1`] = `<div />`; + +exports[`should render correctly: no width 1`] = `<div />`; diff --git a/server/sonar-ui-common/components/controls/ActionsDropdown.tsx b/server/sonar-ui-common/components/controls/ActionsDropdown.tsx index 06f01d629b0..e4de6ff3baa 100644 --- a/server/sonar-ui-common/components/controls/ActionsDropdown.tsx +++ b/server/sonar-ui-common/components/controls/ActionsDropdown.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/BackButton.tsx b/server/sonar-ui-common/components/controls/BackButton.tsx index 3c747be6910..0022b4f322e 100644 --- a/server/sonar-ui-common/components/controls/BackButton.tsx +++ b/server/sonar-ui-common/components/controls/BackButton.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/BoxedGroupAccordion.tsx b/server/sonar-ui-common/components/controls/BoxedGroupAccordion.tsx index 5677b2292e6..ce713c7c9c1 100644 --- a/server/sonar-ui-common/components/controls/BoxedGroupAccordion.tsx +++ b/server/sonar-ui-common/components/controls/BoxedGroupAccordion.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/BoxedTabs.tsx b/server/sonar-ui-common/components/controls/BoxedTabs.tsx index 043c62d800d..976cb63f348 100644 --- a/server/sonar-ui-common/components/controls/BoxedTabs.tsx +++ b/server/sonar-ui-common/components/controls/BoxedTabs.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/Checkbox.css b/server/sonar-ui-common/components/controls/Checkbox.css index ab709bb19cd..6306f855eb6 100644 --- a/server/sonar-ui-common/components/controls/Checkbox.css +++ b/server/sonar-ui-common/components/controls/Checkbox.css @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -17,7 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - .icon-checkbox { display: inline-block; line-height: 1; diff --git a/server/sonar-ui-common/components/controls/Checkbox.tsx b/server/sonar-ui-common/components/controls/Checkbox.tsx index 307dc1c263f..1526eb501fc 100644 --- a/server/sonar-ui-common/components/controls/Checkbox.tsx +++ b/server/sonar-ui-common/components/controls/Checkbox.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/ClickEventBoundary.tsx b/server/sonar-ui-common/components/controls/ClickEventBoundary.tsx index 96a25e4c5c8..64891b31b47 100644 --- a/server/sonar-ui-common/components/controls/ClickEventBoundary.tsx +++ b/server/sonar-ui-common/components/controls/ClickEventBoundary.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/ConfirmButton.tsx b/server/sonar-ui-common/components/controls/ConfirmButton.tsx index 737b18e2f3e..9ab6717f2b7 100644 --- a/server/sonar-ui-common/components/controls/ConfirmButton.tsx +++ b/server/sonar-ui-common/components/controls/ConfirmButton.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/ConfirmModal.tsx b/server/sonar-ui-common/components/controls/ConfirmModal.tsx index 295d4f882ca..44a4010beb7 100644 --- a/server/sonar-ui-common/components/controls/ConfirmModal.tsx +++ b/server/sonar-ui-common/components/controls/ConfirmModal.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/DocumentClickHandler.tsx b/server/sonar-ui-common/components/controls/DocumentClickHandler.tsx index a6bb044b2a8..45765c95874 100644 --- a/server/sonar-ui-common/components/controls/DocumentClickHandler.tsx +++ b/server/sonar-ui-common/components/controls/DocumentClickHandler.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/Dropdown.css b/server/sonar-ui-common/components/controls/Dropdown.css index 783ed430e86..41b7bd79b15 100644 --- a/server/sonar-ui-common/components/controls/Dropdown.css +++ b/server/sonar-ui-common/components/controls/Dropdown.css @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/Dropdown.tsx b/server/sonar-ui-common/components/controls/Dropdown.tsx index a39be19c82e..89b5733cf9a 100644 --- a/server/sonar-ui-common/components/controls/Dropdown.tsx +++ b/server/sonar-ui-common/components/controls/Dropdown.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/EscKeydownHandler.tsx b/server/sonar-ui-common/components/controls/EscKeydownHandler.tsx index b8c324c76f5..487bf13a6af 100644 --- a/server/sonar-ui-common/components/controls/EscKeydownHandler.tsx +++ b/server/sonar-ui-common/components/controls/EscKeydownHandler.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/FavoriteButton.tsx b/server/sonar-ui-common/components/controls/FavoriteButton.tsx index 1b6dbf2ba2b..e3727dd338a 100644 --- a/server/sonar-ui-common/components/controls/FavoriteButton.tsx +++ b/server/sonar-ui-common/components/controls/FavoriteButton.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/GlobalMessages.tsx b/server/sonar-ui-common/components/controls/GlobalMessages.tsx index 7c51ae50308..d59f8d131e8 100644 --- a/server/sonar-ui-common/components/controls/GlobalMessages.tsx +++ b/server/sonar-ui-common/components/controls/GlobalMessages.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/HelpTooltip.css b/server/sonar-ui-common/components/controls/HelpTooltip.css index bafc621852d..11376bc7c33 100644 --- a/server/sonar-ui-common/components/controls/HelpTooltip.css +++ b/server/sonar-ui-common/components/controls/HelpTooltip.css @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/HelpTooltip.tsx b/server/sonar-ui-common/components/controls/HelpTooltip.tsx index edf4ec65cf8..00a4bf4610c 100644 --- a/server/sonar-ui-common/components/controls/HelpTooltip.tsx +++ b/server/sonar-ui-common/components/controls/HelpTooltip.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/IdentityProviderLink.css b/server/sonar-ui-common/components/controls/IdentityProviderLink.css index 6aff2f38126..889f14acf90 100644 --- a/server/sonar-ui-common/components/controls/IdentityProviderLink.css +++ b/server/sonar-ui-common/components/controls/IdentityProviderLink.css @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/IdentityProviderLink.tsx b/server/sonar-ui-common/components/controls/IdentityProviderLink.tsx index bfcb25f2570..53c85f31a03 100644 --- a/server/sonar-ui-common/components/controls/IdentityProviderLink.tsx +++ b/server/sonar-ui-common/components/controls/IdentityProviderLink.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/InputValidationField.tsx b/server/sonar-ui-common/components/controls/InputValidationField.tsx index e02baceab2d..bb9cfcab90f 100644 --- a/server/sonar-ui-common/components/controls/InputValidationField.tsx +++ b/server/sonar-ui-common/components/controls/InputValidationField.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/ListFooter.tsx b/server/sonar-ui-common/components/controls/ListFooter.tsx index 04387913c46..8617c126d65 100644 --- a/server/sonar-ui-common/components/controls/ListFooter.tsx +++ b/server/sonar-ui-common/components/controls/ListFooter.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/Modal.css b/server/sonar-ui-common/components/controls/Modal.css index a225712a219..04e3de15a21 100644 --- a/server/sonar-ui-common/components/controls/Modal.css +++ b/server/sonar-ui-common/components/controls/Modal.css @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/Modal.tsx b/server/sonar-ui-common/components/controls/Modal.tsx index 91acdeab832..4583856b3c6 100644 --- a/server/sonar-ui-common/components/controls/Modal.tsx +++ b/server/sonar-ui-common/components/controls/Modal.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/ModalButton.tsx b/server/sonar-ui-common/components/controls/ModalButton.tsx index 44e43f5f026..2166b6464c4 100644 --- a/server/sonar-ui-common/components/controls/ModalButton.tsx +++ b/server/sonar-ui-common/components/controls/ModalButton.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/ModalValidationField.tsx b/server/sonar-ui-common/components/controls/ModalValidationField.tsx index c5eeff11227..2aa649de238 100644 --- a/server/sonar-ui-common/components/controls/ModalValidationField.tsx +++ b/server/sonar-ui-common/components/controls/ModalValidationField.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/OutsideClickHandler.tsx b/server/sonar-ui-common/components/controls/OutsideClickHandler.tsx index c7c86ba1a2b..eaea43f89ba 100644 --- a/server/sonar-ui-common/components/controls/OutsideClickHandler.tsx +++ b/server/sonar-ui-common/components/controls/OutsideClickHandler.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/Radio.css b/server/sonar-ui-common/components/controls/Radio.css index 172c89ca507..6d53c4b383b 100644 --- a/server/sonar-ui-common/components/controls/Radio.css +++ b/server/sonar-ui-common/components/controls/Radio.css @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -17,7 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - .icon-radio { position: relative; display: inline-block; diff --git a/server/sonar-ui-common/components/controls/Radio.tsx b/server/sonar-ui-common/components/controls/Radio.tsx index 1095a30f078..c664c6f2499 100644 --- a/server/sonar-ui-common/components/controls/Radio.tsx +++ b/server/sonar-ui-common/components/controls/Radio.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/RadioCard.css b/server/sonar-ui-common/components/controls/RadioCard.css index 4afbef07bd9..f51fe41c930 100644 --- a/server/sonar-ui-common/components/controls/RadioCard.css +++ b/server/sonar-ui-common/components/controls/RadioCard.css @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/RadioCard.tsx b/server/sonar-ui-common/components/controls/RadioCard.tsx index e6501995d27..0fdd1348a9d 100644 --- a/server/sonar-ui-common/components/controls/RadioCard.tsx +++ b/server/sonar-ui-common/components/controls/RadioCard.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/RadioToggle.css b/server/sonar-ui-common/components/controls/RadioToggle.css index 747c4a44d39..4ca9c28df7c 100644 --- a/server/sonar-ui-common/components/controls/RadioToggle.css +++ b/server/sonar-ui-common/components/controls/RadioToggle.css @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/RadioToggle.tsx b/server/sonar-ui-common/components/controls/RadioToggle.tsx index 1ec9ed3e0c3..51187d25cbb 100644 --- a/server/sonar-ui-common/components/controls/RadioToggle.tsx +++ b/server/sonar-ui-common/components/controls/RadioToggle.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/ReloadButton.tsx b/server/sonar-ui-common/components/controls/ReloadButton.tsx index 69d3bb3702a..0d7d7960d4c 100644 --- a/server/sonar-ui-common/components/controls/ReloadButton.tsx +++ b/server/sonar-ui-common/components/controls/ReloadButton.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/ScreenPositionFixer.tsx b/server/sonar-ui-common/components/controls/ScreenPositionFixer.tsx index 69c00f8404e..0065201d22e 100644 --- a/server/sonar-ui-common/components/controls/ScreenPositionFixer.tsx +++ b/server/sonar-ui-common/components/controls/ScreenPositionFixer.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/SearchBox.css b/server/sonar-ui-common/components/controls/SearchBox.css index 412058a9792..3e91462ef5c 100644 --- a/server/sonar-ui-common/components/controls/SearchBox.css +++ b/server/sonar-ui-common/components/controls/SearchBox.css @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/SearchBox.tsx b/server/sonar-ui-common/components/controls/SearchBox.tsx index 69272bb5721..c3889b50825 100644 --- a/server/sonar-ui-common/components/controls/SearchBox.tsx +++ b/server/sonar-ui-common/components/controls/SearchBox.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/SearchSelect.tsx b/server/sonar-ui-common/components/controls/SearchSelect.tsx index c446f35e7d1..be783afe805 100644 --- a/server/sonar-ui-common/components/controls/SearchSelect.tsx +++ b/server/sonar-ui-common/components/controls/SearchSelect.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/Select.css b/server/sonar-ui-common/components/controls/Select.css index db74eb89d39..8f89447cc47 100644 --- a/server/sonar-ui-common/components/controls/Select.css +++ b/server/sonar-ui-common/components/controls/Select.css @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/Select.tsx b/server/sonar-ui-common/components/controls/Select.tsx index be4c37bd2da..f100c9a2cde 100644 --- a/server/sonar-ui-common/components/controls/Select.tsx +++ b/server/sonar-ui-common/components/controls/Select.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/SelectList.css b/server/sonar-ui-common/components/controls/SelectList.css index 4a2fcc1c3a1..30b95c80033 100644 --- a/server/sonar-ui-common/components/controls/SelectList.css +++ b/server/sonar-ui-common/components/controls/SelectList.css @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -17,7 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - .select-list-container { min-width: 500px; box-sizing: border-box; diff --git a/server/sonar-ui-common/components/controls/SelectList.tsx b/server/sonar-ui-common/components/controls/SelectList.tsx index 9baa6d843f0..1e49c82d3ed 100644 --- a/server/sonar-ui-common/components/controls/SelectList.tsx +++ b/server/sonar-ui-common/components/controls/SelectList.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/SelectListListContainer.tsx b/server/sonar-ui-common/components/controls/SelectListListContainer.tsx index f0bb64a2ff9..c39d45133c7 100644 --- a/server/sonar-ui-common/components/controls/SelectListListContainer.tsx +++ b/server/sonar-ui-common/components/controls/SelectListListContainer.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/SelectListListElement.tsx b/server/sonar-ui-common/components/controls/SelectListListElement.tsx index bae8dbfea45..defd493f344 100644 --- a/server/sonar-ui-common/components/controls/SelectListListElement.tsx +++ b/server/sonar-ui-common/components/controls/SelectListListElement.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/SimpleModal.tsx b/server/sonar-ui-common/components/controls/SimpleModal.tsx index 99d368bc02f..a0b8bc103b3 100644 --- a/server/sonar-ui-common/components/controls/SimpleModal.tsx +++ b/server/sonar-ui-common/components/controls/SimpleModal.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/Tabs.css b/server/sonar-ui-common/components/controls/Tabs.css index 13dc927ab8d..334fe14f255 100644 --- a/server/sonar-ui-common/components/controls/Tabs.css +++ b/server/sonar-ui-common/components/controls/Tabs.css @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/Tabs.tsx b/server/sonar-ui-common/components/controls/Tabs.tsx index 7fb2ef73db4..b187255ad46 100644 --- a/server/sonar-ui-common/components/controls/Tabs.tsx +++ b/server/sonar-ui-common/components/controls/Tabs.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/Toggle.css b/server/sonar-ui-common/components/controls/Toggle.css index 1d14e119209..f9b0cfeb75b 100644 --- a/server/sonar-ui-common/components/controls/Toggle.css +++ b/server/sonar-ui-common/components/controls/Toggle.css @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/Toggle.tsx b/server/sonar-ui-common/components/controls/Toggle.tsx index 62a7570e759..52448e8b074 100644 --- a/server/sonar-ui-common/components/controls/Toggle.tsx +++ b/server/sonar-ui-common/components/controls/Toggle.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/Toggler.tsx b/server/sonar-ui-common/components/controls/Toggler.tsx index 2545716e8bb..b610a9b9fd5 100644 --- a/server/sonar-ui-common/components/controls/Toggler.tsx +++ b/server/sonar-ui-common/components/controls/Toggler.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/Tooltip.css b/server/sonar-ui-common/components/controls/Tooltip.css index 40eaf11d69e..d49494f1f77 100644 --- a/server/sonar-ui-common/components/controls/Tooltip.css +++ b/server/sonar-ui-common/components/controls/Tooltip.css @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/Tooltip.tsx b/server/sonar-ui-common/components/controls/Tooltip.tsx index 8ac9f8711bb..de4f670a637 100644 --- a/server/sonar-ui-common/components/controls/Tooltip.tsx +++ b/server/sonar-ui-common/components/controls/Tooltip.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/ValidationForm.tsx b/server/sonar-ui-common/components/controls/ValidationForm.tsx index 0e2bcd0afa9..37e7127014a 100644 --- a/server/sonar-ui-common/components/controls/ValidationForm.tsx +++ b/server/sonar-ui-common/components/controls/ValidationForm.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/ValidationInput.tsx b/server/sonar-ui-common/components/controls/ValidationInput.tsx index a8010ae8d3c..1f966232028 100644 --- a/server/sonar-ui-common/components/controls/ValidationInput.tsx +++ b/server/sonar-ui-common/components/controls/ValidationInput.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/ValidationModal.tsx b/server/sonar-ui-common/components/controls/ValidationModal.tsx index cca7c0f414f..7dd77c81eea 100644 --- a/server/sonar-ui-common/components/controls/ValidationModal.tsx +++ b/server/sonar-ui-common/components/controls/ValidationModal.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/__tests__/ActionsDropdown-test.tsx b/server/sonar-ui-common/components/controls/__tests__/ActionsDropdown-test.tsx index 93c5a8d7d37..a74b20fd933 100644 --- a/server/sonar-ui-common/components/controls/__tests__/ActionsDropdown-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/ActionsDropdown-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/__tests__/BackButton-test.tsx b/server/sonar-ui-common/components/controls/__tests__/BackButton-test.tsx index 77ad09c9f5e..0f206076ad9 100644 --- a/server/sonar-ui-common/components/controls/__tests__/BackButton-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/BackButton-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/__tests__/BoxedGroupAccordion-test.tsx b/server/sonar-ui-common/components/controls/__tests__/BoxedGroupAccordion-test.tsx index 7feece1ecdd..970a3546c3a 100644 --- a/server/sonar-ui-common/components/controls/__tests__/BoxedGroupAccordion-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/BoxedGroupAccordion-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/__tests__/BoxedTabs-test.tsx b/server/sonar-ui-common/components/controls/__tests__/BoxedTabs-test.tsx index d597369ea1d..6db0b5c28e1 100644 --- a/server/sonar-ui-common/components/controls/__tests__/BoxedTabs-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/BoxedTabs-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -42,7 +42,7 @@ function mountRender(overrides: Partial<BoxedTabsProps<string>> = {}) { return mount(dom(overrides)); } -function dom(overrides) { +function dom<K>(overrides: Partial<BoxedTabsProps<K>>) { return ( <BoxedTabs className="boxed-tabs" diff --git a/server/sonar-ui-common/components/controls/__tests__/Checkbox-test.tsx b/server/sonar-ui-common/components/controls/__tests__/Checkbox-test.tsx index e05e0c87d74..b56cce6c559 100644 --- a/server/sonar-ui-common/components/controls/__tests__/Checkbox-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/Checkbox-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/__tests__/ClickEventBoundary-test.tsx b/server/sonar-ui-common/components/controls/__tests__/ClickEventBoundary-test.tsx index c20dc06a910..c2f6d701a76 100644 --- a/server/sonar-ui-common/components/controls/__tests__/ClickEventBoundary-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/ClickEventBoundary-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/__tests__/ConfirmButton-test.tsx b/server/sonar-ui-common/components/controls/__tests__/ConfirmButton-test.tsx index abd1ae483e6..69b6fde10d5 100644 --- a/server/sonar-ui-common/components/controls/__tests__/ConfirmButton-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/ConfirmButton-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/__tests__/ConfirmModal-test.tsx b/server/sonar-ui-common/components/controls/__tests__/ConfirmModal-test.tsx index 15fd56c0622..cfefbac465a 100644 --- a/server/sonar-ui-common/components/controls/__tests__/ConfirmModal-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/ConfirmModal-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/__tests__/Dropdown-test.tsx b/server/sonar-ui-common/components/controls/__tests__/Dropdown-test.tsx index 0595d595a27..6c051fefb3e 100644 --- a/server/sonar-ui-common/components/controls/__tests__/Dropdown-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/Dropdown-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/__tests__/EscKeydownHandler-test.tsx b/server/sonar-ui-common/components/controls/__tests__/EscKeydownHandler-test.tsx index 12641596f46..6c852477b81 100644 --- a/server/sonar-ui-common/components/controls/__tests__/EscKeydownHandler-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/EscKeydownHandler-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -17,7 +17,6 @@ * 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 * as React from 'react'; import { KeyCodes } from '../../../helpers/keycodes'; diff --git a/server/sonar-ui-common/components/controls/__tests__/FavoriteButton-test.tsx b/server/sonar-ui-common/components/controls/__tests__/FavoriteButton-test.tsx index 61919eb6eb7..d0978f050d4 100644 --- a/server/sonar-ui-common/components/controls/__tests__/FavoriteButton-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/FavoriteButton-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/__tests__/GlobalMessages-test.tsx b/server/sonar-ui-common/components/controls/__tests__/GlobalMessages-test.tsx index 3dc4eda5661..af48c1a9701 100644 --- a/server/sonar-ui-common/components/controls/__tests__/GlobalMessages-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/GlobalMessages-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/__tests__/HelpTooltip-test.tsx b/server/sonar-ui-common/components/controls/__tests__/HelpTooltip-test.tsx index ecd7a50539e..6bd89e53b25 100644 --- a/server/sonar-ui-common/components/controls/__tests__/HelpTooltip-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/HelpTooltip-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -17,7 +17,6 @@ * 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 * as React from 'react'; import testTheme from '../../../config/jest/testTheme'; diff --git a/server/sonar-ui-common/components/controls/__tests__/IdentityProviderLink-test.tsx b/server/sonar-ui-common/components/controls/__tests__/IdentityProviderLink-test.tsx index 9a8b0a49481..0050cd6f277 100644 --- a/server/sonar-ui-common/components/controls/__tests__/IdentityProviderLink-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/IdentityProviderLink-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/__tests__/InputValidationField-test.tsx b/server/sonar-ui-common/components/controls/__tests__/InputValidationField-test.tsx index 363e3d79a8a..6c7c421452c 100644 --- a/server/sonar-ui-common/components/controls/__tests__/InputValidationField-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/InputValidationField-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/__tests__/ListFooter-test.tsx b/server/sonar-ui-common/components/controls/__tests__/ListFooter-test.tsx index 6ea69c990ae..8970e984359 100644 --- a/server/sonar-ui-common/components/controls/__tests__/ListFooter-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/ListFooter-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/__tests__/ModalButton-test.tsx b/server/sonar-ui-common/components/controls/__tests__/ModalButton-test.tsx index 91756df5a55..490609803a7 100644 --- a/server/sonar-ui-common/components/controls/__tests__/ModalButton-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/ModalButton-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/__tests__/ModalValidationField-test.tsx b/server/sonar-ui-common/components/controls/__tests__/ModalValidationField-test.tsx index 1f5cbb5b7e3..27f9743870d 100644 --- a/server/sonar-ui-common/components/controls/__tests__/ModalValidationField-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/ModalValidationField-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/__tests__/OutsideClickHandler-test.tsx b/server/sonar-ui-common/components/controls/__tests__/OutsideClickHandler-test.tsx new file mode 100644 index 00000000000..4f540f59fec --- /dev/null +++ b/server/sonar-ui-common/components/controls/__tests__/OutsideClickHandler-test.tsx @@ -0,0 +1,74 @@ +/* + * SonarQube + * Copyright (C) 2009-2021 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 { mount, shallow } from 'enzyme'; +import * as React from 'react'; +import OutsideClickHandler from '../OutsideClickHandler'; + +jest.useFakeTimers(); + +it('should render correctly', () => { + expect(shallowRender()).toMatchSnapshot(); +}); + +it('should register for click event', () => { + const addEventListener = jest.spyOn(window, 'addEventListener'); + const removeEventListener = jest.spyOn(window, 'removeEventListener'); + + const wrapper = shallowRender(); + + jest.runAllTimers(); + + expect(addEventListener).toHaveBeenCalledWith('click', expect.anything()); + + wrapper.instance().componentWillUnmount(); + + expect(removeEventListener).toHaveBeenCalledWith('click', expect.anything()); +}); + +it('should call event handler on click on window', () => { + const onClickOutside = jest.fn(); + + const map: { [key: string]: EventListener } = {}; + window.addEventListener = jest.fn((event, callback) => { + map[event] = callback as EventListener; + }); + + mount( + <div id="outside-element"> + <OutsideClickHandler onClickOutside={onClickOutside}> + <div id="children" /> + </OutsideClickHandler> + </div> + ); + + jest.runAllTimers(); + + map['click'](new Event('click')); + expect(onClickOutside).toHaveBeenCalled(); +}); + +function shallowRender(props: Partial<OutsideClickHandler['props']> = {}) { + return shallow<OutsideClickHandler>( + <OutsideClickHandler onClickOutside={jest.fn()} {...props}> + <div id="children" /> + </OutsideClickHandler> + ); +} diff --git a/server/sonar-ui-common/components/controls/__tests__/Radio-test.tsx b/server/sonar-ui-common/components/controls/__tests__/Radio-test.tsx index feb1a6e060e..60d2050a45d 100644 --- a/server/sonar-ui-common/components/controls/__tests__/Radio-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/Radio-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/__tests__/RadioCard-test.tsx b/server/sonar-ui-common/components/controls/__tests__/RadioCard-test.tsx index 27ed8f6eadc..2232f38b252 100644 --- a/server/sonar-ui-common/components/controls/__tests__/RadioCard-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/RadioCard-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/__tests__/RadioToggle-test.tsx b/server/sonar-ui-common/components/controls/__tests__/RadioToggle-test.tsx index 6d5aa2e5840..3653374e31a 100644 --- a/server/sonar-ui-common/components/controls/__tests__/RadioToggle-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/RadioToggle-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/__tests__/ReloadButton-test.tsx b/server/sonar-ui-common/components/controls/__tests__/ReloadButton-test.tsx index f6a92859d69..c22fd1f313e 100644 --- a/server/sonar-ui-common/components/controls/__tests__/ReloadButton-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/ReloadButton-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -17,7 +17,6 @@ * 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 * as React from 'react'; import testTheme from '../../../config/jest/testTheme'; diff --git a/server/sonar-ui-common/components/controls/__tests__/ScreenPositionFixer-test.tsx b/server/sonar-ui-common/components/controls/__tests__/ScreenPositionFixer-test.tsx index aae3a9e0cc3..f857666cecd 100644 --- a/server/sonar-ui-common/components/controls/__tests__/ScreenPositionFixer-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/ScreenPositionFixer-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -19,11 +19,12 @@ */ import { mount } from 'enzyme'; import * as React from 'react'; +import testTheme from '../../../config/jest/testTheme'; import { resizeWindowTo, setNodeRect } from '../../../helpers/testUtils'; -import ScreenPositionFixer from '../ScreenPositionFixer'; +import { ScreenPositionFixer } from '../ScreenPositionFixer'; jest.mock('lodash', () => { - const lodash = require.requireActual('lodash'); + const lodash = jest.requireActual('lodash'); lodash.throttle = (fn: any) => () => fn(); return lodash; }); @@ -88,6 +89,7 @@ it('should re-position when window is resized', () => { expect(children).toHaveBeenCalledTimes(3); }); -function mountRender(props: ScreenPositionFixer['props']) { - return mount(<ScreenPositionFixer {...props} />); +function mountRender(props: Partial<ScreenPositionFixer['props']>) { + // eslint-disable-next-line react/no-children-prop + return mount(<ScreenPositionFixer theme={testTheme} children={() => <div />} {...props} />); } diff --git a/server/sonar-ui-common/components/controls/__tests__/SearchBox-test.tsx b/server/sonar-ui-common/components/controls/__tests__/SearchBox-test.tsx index aaed9ed16c0..7afa1839c5f 100644 --- a/server/sonar-ui-common/components/controls/__tests__/SearchBox-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/SearchBox-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/__tests__/SearchSelect-test.tsx b/server/sonar-ui-common/components/controls/__tests__/SearchSelect-test.tsx index 71ca3e79932..ed13eea6fa7 100644 --- a/server/sonar-ui-common/components/controls/__tests__/SearchSelect-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/SearchSelect-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/__tests__/SelectList-test.tsx b/server/sonar-ui-common/components/controls/__tests__/SelectList-test.tsx index e4a4ed22346..ab3eb4f8072 100644 --- a/server/sonar-ui-common/components/controls/__tests__/SelectList-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/SelectList-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/__tests__/SelectListListContainer-test.tsx b/server/sonar-ui-common/components/controls/__tests__/SelectListListContainer-test.tsx index 61d53f4825f..1b24bc866c1 100644 --- a/server/sonar-ui-common/components/controls/__tests__/SelectListListContainer-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/SelectListListContainer-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/__tests__/SelectListListElement-test.tsx b/server/sonar-ui-common/components/controls/__tests__/SelectListListElement-test.tsx index 82a1a40455c..ca127222e04 100644 --- a/server/sonar-ui-common/components/controls/__tests__/SelectListListElement-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/SelectListListElement-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/__tests__/SimpleModal-test.tsx b/server/sonar-ui-common/components/controls/__tests__/SimpleModal-test.tsx index 6b5271450fb..5a8e6bb0cd7 100644 --- a/server/sonar-ui-common/components/controls/__tests__/SimpleModal-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/SimpleModal-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/__tests__/Tabs-test.tsx b/server/sonar-ui-common/components/controls/__tests__/Tabs-test.tsx index 7db674a16db..11cf4e5e353 100644 --- a/server/sonar-ui-common/components/controls/__tests__/Tabs-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/Tabs-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/__tests__/Toggle-test.tsx b/server/sonar-ui-common/components/controls/__tests__/Toggle-test.tsx index 79fc605afb3..f3e39aca5df 100644 --- a/server/sonar-ui-common/components/controls/__tests__/Toggle-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/Toggle-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -17,7 +17,6 @@ * 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 * as React from 'react'; import { click } from '../../../helpers/testUtils'; diff --git a/server/sonar-ui-common/components/controls/__tests__/Toggler-test.tsx b/server/sonar-ui-common/components/controls/__tests__/Toggler-test.tsx index dfcbe6b0b9a..679177cfda3 100644 --- a/server/sonar-ui-common/components/controls/__tests__/Toggler-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/Toggler-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/__tests__/Tooltip-test.tsx b/server/sonar-ui-common/components/controls/__tests__/Tooltip-test.tsx index d490fd5179c..e2a395b609e 100644 --- a/server/sonar-ui-common/components/controls/__tests__/Tooltip-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/Tooltip-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -19,24 +19,20 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import Tooltip, { TooltipInner } from '../Tooltip'; +import Tooltip, { TooltipInner, TooltipProps } from '../Tooltip'; jest.useFakeTimers(); jest.mock('react-dom', () => { - const actual = require.requireActual('react-dom'); + const actual = jest.requireActual('react-dom'); return Object.assign({}, actual, { - findDOMNode: () => undefined, + findDOMNode: jest.fn().mockReturnValue(undefined), }); }); +beforeEach(jest.clearAllMocks); + it('should render', () => { - expect( - shallow( - <TooltipInner overlay={<span id="overlay" />} visible={false}> - <div id="tooltip" /> - </TooltipInner> - ) - ).toMatchSnapshot(); + expect(shallowRenderTooltipInner()).toMatchSnapshot(); expect( shallow( <TooltipInner overlay={<span id="overlay" />} visible={true}> @@ -50,11 +46,8 @@ it('should render', () => { it('should open & close', () => { const onShow = jest.fn(); const onHide = jest.fn(); - const wrapper = shallow( - <TooltipInner onHide={onHide} onShow={onShow} overlay={<span id="overlay" />}> - <div id="tooltip" /> - </TooltipInner> - ); + const wrapper = shallowRenderTooltipInner({ onHide, onShow }); + wrapper.find('#tooltip').simulate('mouseenter'); jest.runOnlyPendingTimers(); wrapper.update(); @@ -71,11 +64,7 @@ it('should open & close', () => { it('should not open when mouse goes away quickly', () => { const onShow = jest.fn(); const onHide = jest.fn(); - const wrapper = shallow( - <TooltipInner onHide={onHide} onShow={onShow} overlay={<span id="overlay" />}> - <div id="tooltip" /> - </TooltipInner> - ); + const wrapper = shallowRenderTooltipInner({ onHide, onShow }); wrapper.find('#tooltip').simulate('mouseenter'); wrapper.find('#tooltip').simulate('mouseleave'); @@ -86,27 +75,44 @@ it('should not open when mouse goes away quickly', () => { }); it('should not render tooltip without overlay', () => { - const wrapper = shallow( - <Tooltip overlay={undefined}> - <div id="tooltip" /> - </Tooltip> - ); + const wrapper = shallowRenderTooltip(); expect(wrapper.type()).toBe('div'); }); it('should not render empty tooltips', () => { - expect( - shallow( - <Tooltip overlay={undefined} visible={true}> - <div id="tooltip" /> - </Tooltip> - ) - ).toMatchSnapshot(); - expect( - shallow( - <Tooltip overlay="" visible={true}> - <div id="tooltip" /> - </Tooltip> - ) - ).toMatchSnapshot(); + expect(shallowRenderTooltip()).toMatchSnapshot(); + expect(shallowRenderTooltip()).toMatchSnapshot(); }); + +it('should adjust arrow position', () => { + const wrapper = shallowRenderTooltipInner(); + + expect(wrapper.instance().adjustArrowPosition('left', { leftFix: 10, topFix: 20 })).toEqual({ + marginTop: -20, + }); + expect(wrapper.instance().adjustArrowPosition('right', { leftFix: 10, topFix: 20 })).toEqual({ + marginTop: -20, + }); + expect(wrapper.instance().adjustArrowPosition('top', { leftFix: 10, topFix: 20 })).toEqual({ + marginLeft: -10, + }); + expect(wrapper.instance().adjustArrowPosition('bottom', { leftFix: 10, topFix: 20 })).toEqual({ + marginLeft: -10, + }); +}); + +function shallowRenderTooltip() { + return shallow<TooltipProps>( + <Tooltip overlay={undefined}> + <div id="tooltip" /> + </Tooltip> + ); +} + +function shallowRenderTooltipInner(props?: Partial<TooltipProps>) { + return shallow<TooltipInner>( + <TooltipInner overlay={<span id="overlay" />} {...props}> + <div id="tooltip" /> + </TooltipInner> + ); +} diff --git a/server/sonar-ui-common/components/controls/__tests__/ValidationForm-test.tsx b/server/sonar-ui-common/components/controls/__tests__/ValidationForm-test.tsx index 295967f7ed0..64827f932ed 100644 --- a/server/sonar-ui-common/components/controls/__tests__/ValidationForm-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/ValidationForm-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/__tests__/ValidationInput-test.tsx b/server/sonar-ui-common/components/controls/__tests__/ValidationInput-test.tsx index 716978090da..97d4a2a5937 100644 --- a/server/sonar-ui-common/components/controls/__tests__/ValidationInput-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/ValidationInput-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/__tests__/ValidationModal-test.tsx b/server/sonar-ui-common/components/controls/__tests__/ValidationModal-test.tsx index 810b864c8b2..e3825083577 100644 --- a/server/sonar-ui-common/components/controls/__tests__/ValidationModal-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/ValidationModal-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/__tests__/__snapshots__/OutsideClickHandler-test.tsx.snap b/server/sonar-ui-common/components/controls/__tests__/__snapshots__/OutsideClickHandler-test.tsx.snap new file mode 100644 index 00000000000..a4f533d8e3a --- /dev/null +++ b/server/sonar-ui-common/components/controls/__tests__/__snapshots__/OutsideClickHandler-test.tsx.snap @@ -0,0 +1,7 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`should render correctly 1`] = ` +<div + id="children" +/> +`; diff --git a/server/sonar-ui-common/components/controls/__tests__/buttons-test.tsx b/server/sonar-ui-common/components/controls/__tests__/buttons-test.tsx index 59e554f972c..c199c5778cc 100644 --- a/server/sonar-ui-common/components/controls/__tests__/buttons-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/buttons-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/__tests__/clipboard-test.tsx b/server/sonar-ui-common/components/controls/__tests__/clipboard-test.tsx index 0563651027e..36b2d6f02db 100644 --- a/server/sonar-ui-common/components/controls/__tests__/clipboard-test.tsx +++ b/server/sonar-ui-common/components/controls/__tests__/clipboard-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -69,11 +69,11 @@ describe('ClipboardBase', () => { }); function shallowRender(children?: ClipboardBase['props']['children']) { - return shallow<ClipboardBase>(<ClipboardBase>{children}</ClipboardBase>); + return shallow<ClipboardBase>(<ClipboardBase>{children || (() => null)}</ClipboardBase>); } function mountRender(children?: ClipboardBase['props']['children']) { - return mount<ClipboardBase>(<ClipboardBase>{children}</ClipboardBase>); + return mount<ClipboardBase>(<ClipboardBase>{children || (() => null)}</ClipboardBase>); } }); diff --git a/server/sonar-ui-common/components/controls/buttons.css b/server/sonar-ui-common/components/controls/buttons.css index 25a6944a348..8a8f9447cb3 100644 --- a/server/sonar-ui-common/components/controls/buttons.css +++ b/server/sonar-ui-common/components/controls/buttons.css @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/buttons.tsx b/server/sonar-ui-common/components/controls/buttons.tsx index d0567bebd5d..f43c62bc9a6 100644 --- a/server/sonar-ui-common/components/controls/buttons.tsx +++ b/server/sonar-ui-common/components/controls/buttons.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/controls/clipboard.tsx b/server/sonar-ui-common/components/controls/clipboard.tsx index e4778f46251..427000c17a7 100644 --- a/server/sonar-ui-common/components/controls/clipboard.tsx +++ b/server/sonar-ui-common/components/controls/clipboard.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -17,7 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - import * as classNames from 'classnames'; import * as Clipboard from 'clipboard'; import * as React from 'react'; diff --git a/server/sonar-ui-common/components/icons/AlertErrorIcon.tsx b/server/sonar-ui-common/components/icons/AlertErrorIcon.tsx index 8ab7ac9492c..c6c71782d7a 100644 --- a/server/sonar-ui-common/components/icons/AlertErrorIcon.tsx +++ b/server/sonar-ui-common/components/icons/AlertErrorIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/AlertSuccessIcon.tsx b/server/sonar-ui-common/components/icons/AlertSuccessIcon.tsx index 282f352cc90..707d0f9e9f6 100644 --- a/server/sonar-ui-common/components/icons/AlertSuccessIcon.tsx +++ b/server/sonar-ui-common/components/icons/AlertSuccessIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/AlertWarnIcon.tsx b/server/sonar-ui-common/components/icons/AlertWarnIcon.tsx index 99c3f2795e4..7dc322657d2 100644 --- a/server/sonar-ui-common/components/icons/AlertWarnIcon.tsx +++ b/server/sonar-ui-common/components/icons/AlertWarnIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/ArrowIcon.tsx b/server/sonar-ui-common/components/icons/ArrowIcon.tsx index 1b71b1bf704..c27e7307897 100644 --- a/server/sonar-ui-common/components/icons/ArrowIcon.tsx +++ b/server/sonar-ui-common/components/icons/ArrowIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/BackIcon.tsx b/server/sonar-ui-common/components/icons/BackIcon.tsx index 5ad31ca5c57..34974ee8374 100644 --- a/server/sonar-ui-common/components/icons/BackIcon.tsx +++ b/server/sonar-ui-common/components/icons/BackIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/BranchIcon.tsx b/server/sonar-ui-common/components/icons/BranchIcon.tsx index 2823224ded3..b6e9207cc58 100644 --- a/server/sonar-ui-common/components/icons/BranchIcon.tsx +++ b/server/sonar-ui-common/components/icons/BranchIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/BubblesIcon.tsx b/server/sonar-ui-common/components/icons/BubblesIcon.tsx index 0a6bc916bba..50a40c5c2f5 100644 --- a/server/sonar-ui-common/components/icons/BubblesIcon.tsx +++ b/server/sonar-ui-common/components/icons/BubblesIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/BugIcon.tsx b/server/sonar-ui-common/components/icons/BugIcon.tsx index 93a103f786a..77f19836614 100644 --- a/server/sonar-ui-common/components/icons/BugIcon.tsx +++ b/server/sonar-ui-common/components/icons/BugIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/BugTrackerIcon.tsx b/server/sonar-ui-common/components/icons/BugTrackerIcon.tsx index bc2319cc115..db03eee3115 100644 --- a/server/sonar-ui-common/components/icons/BugTrackerIcon.tsx +++ b/server/sonar-ui-common/components/icons/BugTrackerIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/BulletListIcon.tsx b/server/sonar-ui-common/components/icons/BulletListIcon.tsx index e1b2556c951..bceb30427a4 100644 --- a/server/sonar-ui-common/components/icons/BulletListIcon.tsx +++ b/server/sonar-ui-common/components/icons/BulletListIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/CalendarIcon.tsx b/server/sonar-ui-common/components/icons/CalendarIcon.tsx index f7411e24b5a..bb70dfd4d6e 100644 --- a/server/sonar-ui-common/components/icons/CalendarIcon.tsx +++ b/server/sonar-ui-common/components/icons/CalendarIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/ChartLegendIcon.tsx b/server/sonar-ui-common/components/icons/ChartLegendIcon.tsx index 07909e3da53..4d4d305190a 100644 --- a/server/sonar-ui-common/components/icons/ChartLegendIcon.tsx +++ b/server/sonar-ui-common/components/icons/ChartLegendIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/CheckIcon.tsx b/server/sonar-ui-common/components/icons/CheckIcon.tsx index a1ba82aaf2d..9248e6178e8 100644 --- a/server/sonar-ui-common/components/icons/CheckIcon.tsx +++ b/server/sonar-ui-common/components/icons/CheckIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/ChevronDownIcon.tsx b/server/sonar-ui-common/components/icons/ChevronDownIcon.tsx index ca94d88b76b..0931930ee5c 100644 --- a/server/sonar-ui-common/components/icons/ChevronDownIcon.tsx +++ b/server/sonar-ui-common/components/icons/ChevronDownIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/ChevronLeftIcon.tsx b/server/sonar-ui-common/components/icons/ChevronLeftIcon.tsx index aa74c73fcd7..8f4824699ab 100644 --- a/server/sonar-ui-common/components/icons/ChevronLeftIcon.tsx +++ b/server/sonar-ui-common/components/icons/ChevronLeftIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/ChevronRightIcon.tsx b/server/sonar-ui-common/components/icons/ChevronRightIcon.tsx index ad5b1103c8e..21d6049ed6f 100644 --- a/server/sonar-ui-common/components/icons/ChevronRightIcon.tsx +++ b/server/sonar-ui-common/components/icons/ChevronRightIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/ChevronUpIcon.tsx b/server/sonar-ui-common/components/icons/ChevronUpIcon.tsx index fe67d600edf..842fc9f69a8 100644 --- a/server/sonar-ui-common/components/icons/ChevronUpIcon.tsx +++ b/server/sonar-ui-common/components/icons/ChevronUpIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/ChevronsIcon.tsx b/server/sonar-ui-common/components/icons/ChevronsIcon.tsx index f0f380e4a91..2ad6f90ed97 100644 --- a/server/sonar-ui-common/components/icons/ChevronsIcon.tsx +++ b/server/sonar-ui-common/components/icons/ChevronsIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/ClearIcon.tsx b/server/sonar-ui-common/components/icons/ClearIcon.tsx index 417004676ec..91eb6f706d6 100644 --- a/server/sonar-ui-common/components/icons/ClearIcon.tsx +++ b/server/sonar-ui-common/components/icons/ClearIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/ClockIcon.tsx b/server/sonar-ui-common/components/icons/ClockIcon.tsx index 556f316c409..c777a4a8e60 100644 --- a/server/sonar-ui-common/components/icons/ClockIcon.tsx +++ b/server/sonar-ui-common/components/icons/ClockIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/CodeSmellIcon.tsx b/server/sonar-ui-common/components/icons/CodeSmellIcon.tsx index 0ca8c207101..d705bcd0ec7 100644 --- a/server/sonar-ui-common/components/icons/CodeSmellIcon.tsx +++ b/server/sonar-ui-common/components/icons/CodeSmellIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/CogIcon.tsx b/server/sonar-ui-common/components/icons/CogIcon.tsx index 99b3e12197f..4d7da4238f6 100644 --- a/server/sonar-ui-common/components/icons/CogIcon.tsx +++ b/server/sonar-ui-common/components/icons/CogIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/CollapseIcon.tsx b/server/sonar-ui-common/components/icons/CollapseIcon.tsx index 49145d4ff57..688f7e1a54f 100644 --- a/server/sonar-ui-common/components/icons/CollapseIcon.tsx +++ b/server/sonar-ui-common/components/icons/CollapseIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/ContinuousIntegrationIcon.tsx b/server/sonar-ui-common/components/icons/ContinuousIntegrationIcon.tsx index 1c0cc4a3252..62ab2447fd1 100644 --- a/server/sonar-ui-common/components/icons/ContinuousIntegrationIcon.tsx +++ b/server/sonar-ui-common/components/icons/ContinuousIntegrationIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/CopyIcon.tsx b/server/sonar-ui-common/components/icons/CopyIcon.tsx index 9937c6dd457..2787990b1f3 100644 --- a/server/sonar-ui-common/components/icons/CopyIcon.tsx +++ b/server/sonar-ui-common/components/icons/CopyIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/DeleteIcon.tsx b/server/sonar-ui-common/components/icons/DeleteIcon.tsx index e5293b4ba6f..1fb013182da 100644 --- a/server/sonar-ui-common/components/icons/DeleteIcon.tsx +++ b/server/sonar-ui-common/components/icons/DeleteIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/DetachIcon.tsx b/server/sonar-ui-common/components/icons/DetachIcon.tsx index 4dc5fc85a6c..4066ddf3327 100644 --- a/server/sonar-ui-common/components/icons/DetachIcon.tsx +++ b/server/sonar-ui-common/components/icons/DetachIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/DropdownIcon.tsx b/server/sonar-ui-common/components/icons/DropdownIcon.tsx index b9bebaaa839..7abed26df45 100644 --- a/server/sonar-ui-common/components/icons/DropdownIcon.tsx +++ b/server/sonar-ui-common/components/icons/DropdownIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/EditIcon.tsx b/server/sonar-ui-common/components/icons/EditIcon.tsx index 1930be7422b..45bf6814d46 100644 --- a/server/sonar-ui-common/components/icons/EditIcon.tsx +++ b/server/sonar-ui-common/components/icons/EditIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/EllipsisIcon.tsx b/server/sonar-ui-common/components/icons/EllipsisIcon.tsx index 4ef8fe290b0..c584514131a 100644 --- a/server/sonar-ui-common/components/icons/EllipsisIcon.tsx +++ b/server/sonar-ui-common/components/icons/EllipsisIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/ExpandIcon.tsx b/server/sonar-ui-common/components/icons/ExpandIcon.tsx index ffe61369cc9..2de2405df9a 100644 --- a/server/sonar-ui-common/components/icons/ExpandIcon.tsx +++ b/server/sonar-ui-common/components/icons/ExpandIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/ExpandSnippetIcon.tsx b/server/sonar-ui-common/components/icons/ExpandSnippetIcon.tsx index 3ddea9c411a..1b6a2ce7f52 100644 --- a/server/sonar-ui-common/components/icons/ExpandSnippetIcon.tsx +++ b/server/sonar-ui-common/components/icons/ExpandSnippetIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/FavoriteIcon.tsx b/server/sonar-ui-common/components/icons/FavoriteIcon.tsx index 2ebce211da6..af3ae770ebd 100644 --- a/server/sonar-ui-common/components/icons/FavoriteIcon.tsx +++ b/server/sonar-ui-common/components/icons/FavoriteIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/FilterIcon.tsx b/server/sonar-ui-common/components/icons/FilterIcon.tsx index 0253f65e865..8d5851eb570 100644 --- a/server/sonar-ui-common/components/icons/FilterIcon.tsx +++ b/server/sonar-ui-common/components/icons/FilterIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/GroupIcon.tsx b/server/sonar-ui-common/components/icons/GroupIcon.tsx index 3a798adff9d..9efe35a17ab 100644 --- a/server/sonar-ui-common/components/icons/GroupIcon.tsx +++ b/server/sonar-ui-common/components/icons/GroupIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/HelpIcon.tsx b/server/sonar-ui-common/components/icons/HelpIcon.tsx index 77973da3c97..641e76849d2 100644 --- a/server/sonar-ui-common/components/icons/HelpIcon.tsx +++ b/server/sonar-ui-common/components/icons/HelpIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/HistoryIcon.tsx b/server/sonar-ui-common/components/icons/HistoryIcon.tsx index 63f69e6e584..55d61aff599 100644 --- a/server/sonar-ui-common/components/icons/HistoryIcon.tsx +++ b/server/sonar-ui-common/components/icons/HistoryIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/HomeIcon.tsx b/server/sonar-ui-common/components/icons/HomeIcon.tsx index 0902723f450..e6d28870174 100644 --- a/server/sonar-ui-common/components/icons/HomeIcon.tsx +++ b/server/sonar-ui-common/components/icons/HomeIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/HouseIcon.tsx b/server/sonar-ui-common/components/icons/HouseIcon.tsx index ac7232dad2e..c4ff402ebb1 100644 --- a/server/sonar-ui-common/components/icons/HouseIcon.tsx +++ b/server/sonar-ui-common/components/icons/HouseIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/Icon.tsx b/server/sonar-ui-common/components/icons/Icon.tsx index 35aae243a60..d0d6356b4b9 100644 --- a/server/sonar-ui-common/components/icons/Icon.tsx +++ b/server/sonar-ui-common/components/icons/Icon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/InfoIcon.tsx b/server/sonar-ui-common/components/icons/InfoIcon.tsx index 9e75397e0a3..80029d0e93b 100644 --- a/server/sonar-ui-common/components/icons/InfoIcon.tsx +++ b/server/sonar-ui-common/components/icons/InfoIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/IssueIcon.tsx b/server/sonar-ui-common/components/icons/IssueIcon.tsx index 8e1e10babb5..e78a91bbc44 100644 --- a/server/sonar-ui-common/components/icons/IssueIcon.tsx +++ b/server/sonar-ui-common/components/icons/IssueIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/IssueTypeIcon.tsx b/server/sonar-ui-common/components/icons/IssueTypeIcon.tsx index 1962b6765d8..9815ce40a84 100644 --- a/server/sonar-ui-common/components/icons/IssueTypeIcon.tsx +++ b/server/sonar-ui-common/components/icons/IssueTypeIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/LightBulbIcon.tsx b/server/sonar-ui-common/components/icons/LightBulbIcon.tsx index ec5b9994e35..1ebcef9ed4e 100644 --- a/server/sonar-ui-common/components/icons/LightBulbIcon.tsx +++ b/server/sonar-ui-common/components/icons/LightBulbIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/LinkIcon.tsx b/server/sonar-ui-common/components/icons/LinkIcon.tsx index ba5c1a32d6b..04288a05331 100644 --- a/server/sonar-ui-common/components/icons/LinkIcon.tsx +++ b/server/sonar-ui-common/components/icons/LinkIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/ListIcon.tsx b/server/sonar-ui-common/components/icons/ListIcon.tsx index 8596ef9b754..fdc9e5c840d 100644 --- a/server/sonar-ui-common/components/icons/ListIcon.tsx +++ b/server/sonar-ui-common/components/icons/ListIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/LockIcon.tsx b/server/sonar-ui-common/components/icons/LockIcon.tsx index 827e287ccfa..f9cd73e4981 100644 --- a/server/sonar-ui-common/components/icons/LockIcon.tsx +++ b/server/sonar-ui-common/components/icons/LockIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/LongLivingBranchIcon.tsx b/server/sonar-ui-common/components/icons/LongLivingBranchIcon.tsx index a2f7cc4af54..893c07178e4 100644 --- a/server/sonar-ui-common/components/icons/LongLivingBranchIcon.tsx +++ b/server/sonar-ui-common/components/icons/LongLivingBranchIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/MeasuresIcon.tsx b/server/sonar-ui-common/components/icons/MeasuresIcon.tsx index c1dd2227bbc..07ad0c47ecd 100644 --- a/server/sonar-ui-common/components/icons/MeasuresIcon.tsx +++ b/server/sonar-ui-common/components/icons/MeasuresIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/MinimizeIcon.tsx b/server/sonar-ui-common/components/icons/MinimizeIcon.tsx index ce2f6783ceb..66f64ed6157 100644 --- a/server/sonar-ui-common/components/icons/MinimizeIcon.tsx +++ b/server/sonar-ui-common/components/icons/MinimizeIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/NotificationIcon.tsx b/server/sonar-ui-common/components/icons/NotificationIcon.tsx index 2ba99cc9eec..10bf7da86d9 100644 --- a/server/sonar-ui-common/components/icons/NotificationIcon.tsx +++ b/server/sonar-ui-common/components/icons/NotificationIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/OnboardingAddMembersIcon.tsx b/server/sonar-ui-common/components/icons/OnboardingAddMembersIcon.tsx index 536ce5b63e5..255c2d8f391 100644 --- a/server/sonar-ui-common/components/icons/OnboardingAddMembersIcon.tsx +++ b/server/sonar-ui-common/components/icons/OnboardingAddMembersIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/OnboardingProjectIcon.tsx b/server/sonar-ui-common/components/icons/OnboardingProjectIcon.tsx index d46a9a44859..79fedae1598 100644 --- a/server/sonar-ui-common/components/icons/OnboardingProjectIcon.tsx +++ b/server/sonar-ui-common/components/icons/OnboardingProjectIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/OnboardingTeamIcon.tsx b/server/sonar-ui-common/components/icons/OnboardingTeamIcon.tsx index 0f57cf4bd0c..be4ab97b640 100644 --- a/server/sonar-ui-common/components/icons/OnboardingTeamIcon.tsx +++ b/server/sonar-ui-common/components/icons/OnboardingTeamIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/OpenCloseIcon.tsx b/server/sonar-ui-common/components/icons/OpenCloseIcon.tsx index 169edb77e47..8b50014773d 100644 --- a/server/sonar-ui-common/components/icons/OpenCloseIcon.tsx +++ b/server/sonar-ui-common/components/icons/OpenCloseIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/PendingIcon.tsx b/server/sonar-ui-common/components/icons/PendingIcon.tsx index 32e02a36023..437abb33a70 100644 --- a/server/sonar-ui-common/components/icons/PendingIcon.tsx +++ b/server/sonar-ui-common/components/icons/PendingIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/PinIcon.tsx b/server/sonar-ui-common/components/icons/PinIcon.tsx index 0efc3b61535..4521f86a5e8 100644 --- a/server/sonar-ui-common/components/icons/PinIcon.tsx +++ b/server/sonar-ui-common/components/icons/PinIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/PlusCircleIcon.tsx b/server/sonar-ui-common/components/icons/PlusCircleIcon.tsx index e2852cc33f2..2591a7737db 100644 --- a/server/sonar-ui-common/components/icons/PlusCircleIcon.tsx +++ b/server/sonar-ui-common/components/icons/PlusCircleIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/PlusIcon.tsx b/server/sonar-ui-common/components/icons/PlusIcon.tsx index 3fd1bba064b..39df3134c6f 100644 --- a/server/sonar-ui-common/components/icons/PlusIcon.tsx +++ b/server/sonar-ui-common/components/icons/PlusIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/ProjectEventIcon.tsx b/server/sonar-ui-common/components/icons/ProjectEventIcon.tsx index 88244d72bff..5ddba6b19ea 100644 --- a/server/sonar-ui-common/components/icons/ProjectEventIcon.tsx +++ b/server/sonar-ui-common/components/icons/ProjectEventIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/ProjectLinkIcon.tsx b/server/sonar-ui-common/components/icons/ProjectLinkIcon.tsx index cd956408e58..b158f9839b2 100644 --- a/server/sonar-ui-common/components/icons/ProjectLinkIcon.tsx +++ b/server/sonar-ui-common/components/icons/ProjectLinkIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/PullRequestIcon.tsx b/server/sonar-ui-common/components/icons/PullRequestIcon.tsx index 457d2d29042..dc249a94b71 100644 --- a/server/sonar-ui-common/components/icons/PullRequestIcon.tsx +++ b/server/sonar-ui-common/components/icons/PullRequestIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/QualifierIcon.tsx b/server/sonar-ui-common/components/icons/QualifierIcon.tsx index bff119630ed..0fb2a5d0045 100644 --- a/server/sonar-ui-common/components/icons/QualifierIcon.tsx +++ b/server/sonar-ui-common/components/icons/QualifierIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/RecommendedIcon.tsx b/server/sonar-ui-common/components/icons/RecommendedIcon.tsx index 7be72cfc717..06b7abb5483 100644 --- a/server/sonar-ui-common/components/icons/RecommendedIcon.tsx +++ b/server/sonar-ui-common/components/icons/RecommendedIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/RocketIcon.tsx b/server/sonar-ui-common/components/icons/RocketIcon.tsx index c779b9e8855..ad24c87365f 100644 --- a/server/sonar-ui-common/components/icons/RocketIcon.tsx +++ b/server/sonar-ui-common/components/icons/RocketIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/RuleScopeIcon.tsx b/server/sonar-ui-common/components/icons/RuleScopeIcon.tsx index 20f597cc9a4..115da520908 100644 --- a/server/sonar-ui-common/components/icons/RuleScopeIcon.tsx +++ b/server/sonar-ui-common/components/icons/RuleScopeIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/SCMIcon.tsx b/server/sonar-ui-common/components/icons/SCMIcon.tsx index d1738e89696..fdbd75fab76 100644 --- a/server/sonar-ui-common/components/icons/SCMIcon.tsx +++ b/server/sonar-ui-common/components/icons/SCMIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/SearchIcon.tsx b/server/sonar-ui-common/components/icons/SearchIcon.tsx index 59e86132e4e..0da433a21e2 100644 --- a/server/sonar-ui-common/components/icons/SearchIcon.tsx +++ b/server/sonar-ui-common/components/icons/SearchIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/SecurityHotspotIcon.tsx b/server/sonar-ui-common/components/icons/SecurityHotspotIcon.tsx index 9127b80a8f1..6ac2e9297ae 100644 --- a/server/sonar-ui-common/components/icons/SecurityHotspotIcon.tsx +++ b/server/sonar-ui-common/components/icons/SecurityHotspotIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/SettingsIcon.tsx b/server/sonar-ui-common/components/icons/SettingsIcon.tsx index 30db5fb850a..9156f96aa28 100644 --- a/server/sonar-ui-common/components/icons/SettingsIcon.tsx +++ b/server/sonar-ui-common/components/icons/SettingsIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/SeverityIcon.tsx b/server/sonar-ui-common/components/icons/SeverityIcon.tsx index 8dd7b7ee5a2..298d39aaeff 100644 --- a/server/sonar-ui-common/components/icons/SeverityIcon.tsx +++ b/server/sonar-ui-common/components/icons/SeverityIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/ShortLivingBranchIcon.tsx b/server/sonar-ui-common/components/icons/ShortLivingBranchIcon.tsx index 26d55d597ab..388bc50a262 100644 --- a/server/sonar-ui-common/components/icons/ShortLivingBranchIcon.tsx +++ b/server/sonar-ui-common/components/icons/ShortLivingBranchIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/SortAscIcon.tsx b/server/sonar-ui-common/components/icons/SortAscIcon.tsx index a0921ba7b90..34dc1ca3002 100644 --- a/server/sonar-ui-common/components/icons/SortAscIcon.tsx +++ b/server/sonar-ui-common/components/icons/SortAscIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/SortDescIcon.tsx b/server/sonar-ui-common/components/icons/SortDescIcon.tsx index f57c8de0ab8..9a4cba2e914 100644 --- a/server/sonar-ui-common/components/icons/SortDescIcon.tsx +++ b/server/sonar-ui-common/components/icons/SortDescIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/StatusIcon.tsx b/server/sonar-ui-common/components/icons/StatusIcon.tsx index e517fd767d8..d5cf66bef86 100644 --- a/server/sonar-ui-common/components/icons/StatusIcon.tsx +++ b/server/sonar-ui-common/components/icons/StatusIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/TagsIcon.tsx b/server/sonar-ui-common/components/icons/TagsIcon.tsx index 0239da585f6..649256cf8fa 100644 --- a/server/sonar-ui-common/components/icons/TagsIcon.tsx +++ b/server/sonar-ui-common/components/icons/TagsIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/TestStatusIcon.tsx b/server/sonar-ui-common/components/icons/TestStatusIcon.tsx index 80c46519982..cbcb77ad3a2 100644 --- a/server/sonar-ui-common/components/icons/TestStatusIcon.tsx +++ b/server/sonar-ui-common/components/icons/TestStatusIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/TreeIcon.tsx b/server/sonar-ui-common/components/icons/TreeIcon.tsx index cb3359c14f0..5b9992352e3 100644 --- a/server/sonar-ui-common/components/icons/TreeIcon.tsx +++ b/server/sonar-ui-common/components/icons/TreeIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/TreemapIcon.tsx b/server/sonar-ui-common/components/icons/TreemapIcon.tsx index 0384abd2f90..66d14f39793 100644 --- a/server/sonar-ui-common/components/icons/TreemapIcon.tsx +++ b/server/sonar-ui-common/components/icons/TreemapIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/VisibleIcon.tsx b/server/sonar-ui-common/components/icons/VisibleIcon.tsx index 25e21b750b2..d50d4d873d3 100644 --- a/server/sonar-ui-common/components/icons/VisibleIcon.tsx +++ b/server/sonar-ui-common/components/icons/VisibleIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/VulnerabilityIcon.tsx b/server/sonar-ui-common/components/icons/VulnerabilityIcon.tsx index e31eeab0177..34da45580b4 100644 --- a/server/sonar-ui-common/components/icons/VulnerabilityIcon.tsx +++ b/server/sonar-ui-common/components/icons/VulnerabilityIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/WarningIcon.tsx b/server/sonar-ui-common/components/icons/WarningIcon.tsx index 1c9ed021882..ceda2ea90ae 100644 --- a/server/sonar-ui-common/components/icons/WarningIcon.tsx +++ b/server/sonar-ui-common/components/icons/WarningIcon.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/__tests__/Icon-test.tsx b/server/sonar-ui-common/components/icons/__tests__/Icon-test.tsx index 3402e9b65bb..341eb88a17e 100644 --- a/server/sonar-ui-common/components/icons/__tests__/Icon-test.tsx +++ b/server/sonar-ui-common/components/icons/__tests__/Icon-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/__tests__/IssueIcon-test.tsx b/server/sonar-ui-common/components/icons/__tests__/IssueIcon-test.tsx index 2a785555f2a..852beec5385 100644 --- a/server/sonar-ui-common/components/icons/__tests__/IssueIcon-test.tsx +++ b/server/sonar-ui-common/components/icons/__tests__/IssueIcon-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/__tests__/IssueTypeIcon-test.tsx b/server/sonar-ui-common/components/icons/__tests__/IssueTypeIcon-test.tsx index 605d5bdf8dd..dbd892fdb52 100644 --- a/server/sonar-ui-common/components/icons/__tests__/IssueTypeIcon-test.tsx +++ b/server/sonar-ui-common/components/icons/__tests__/IssueTypeIcon-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/icons/__tests__/TestStatusIcon-test.tsx b/server/sonar-ui-common/components/icons/__tests__/TestStatusIcon-test.tsx index e25a9f3e0b7..c683e6cd02f 100644 --- a/server/sonar-ui-common/components/icons/__tests__/TestStatusIcon-test.tsx +++ b/server/sonar-ui-common/components/icons/__tests__/TestStatusIcon-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/intl/DateFormatter.tsx b/server/sonar-ui-common/components/intl/DateFormatter.tsx index 4aae2a721bb..c33b8a78ff5 100644 --- a/server/sonar-ui-common/components/intl/DateFormatter.tsx +++ b/server/sonar-ui-common/components/intl/DateFormatter.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/intl/DateFromNow.tsx b/server/sonar-ui-common/components/intl/DateFromNow.tsx index a800cac28ab..13c383d5288 100644 --- a/server/sonar-ui-common/components/intl/DateFromNow.tsx +++ b/server/sonar-ui-common/components/intl/DateFromNow.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/intl/DateTimeFormatter.tsx b/server/sonar-ui-common/components/intl/DateTimeFormatter.tsx index c5d31fdc8ff..ebc3e37b473 100644 --- a/server/sonar-ui-common/components/intl/DateTimeFormatter.tsx +++ b/server/sonar-ui-common/components/intl/DateTimeFormatter.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/intl/TimeFormatter.tsx b/server/sonar-ui-common/components/intl/TimeFormatter.tsx index 3eda1331c47..8fb5af05440 100644 --- a/server/sonar-ui-common/components/intl/TimeFormatter.tsx +++ b/server/sonar-ui-common/components/intl/TimeFormatter.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/intl/__mocks__/DateFromNow.tsx b/server/sonar-ui-common/components/intl/__mocks__/DateFromNow.tsx index 1835010778f..76a585b4045 100644 --- a/server/sonar-ui-common/components/intl/__mocks__/DateFromNow.tsx +++ b/server/sonar-ui-common/components/intl/__mocks__/DateFromNow.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/intl/__tests__/DateFormatter-test.tsx b/server/sonar-ui-common/components/intl/__tests__/DateFormatter-test.tsx index 18906fbb981..6780d67d21c 100644 --- a/server/sonar-ui-common/components/intl/__tests__/DateFormatter-test.tsx +++ b/server/sonar-ui-common/components/intl/__tests__/DateFormatter-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/intl/__tests__/DateFromNow-test.tsx b/server/sonar-ui-common/components/intl/__tests__/DateFromNow-test.tsx index 9edfbd6eb5b..c7edcfaa1a4 100644 --- a/server/sonar-ui-common/components/intl/__tests__/DateFromNow-test.tsx +++ b/server/sonar-ui-common/components/intl/__tests__/DateFromNow-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -29,7 +29,7 @@ it('should render correctly', () => { const wrapper = shallowRender(); expect(wrapper).toMatchSnapshot(); - expect(wrapper.find(DateTimeFormatter).props().children(date)).toMatchSnapshot('children'); + expect(wrapper.find(DateTimeFormatter).props().children!(date)).toMatchSnapshot('children'); }); it('should render correctly when there is no date', () => { @@ -50,8 +50,7 @@ it('should render correctly when the date is less than one hour in the past', () .dive() .dive() .find(FormattedRelative) - .props() - .children(date); + .props().children!(date); expect(children).toHaveBeenCalledWith('less_than_1_hour_ago'); }); diff --git a/server/sonar-ui-common/components/intl/__tests__/DateTimeFormatter-test.tsx b/server/sonar-ui-common/components/intl/__tests__/DateTimeFormatter-test.tsx index affaf07e73d..8d6dbf2add7 100644 --- a/server/sonar-ui-common/components/intl/__tests__/DateTimeFormatter-test.tsx +++ b/server/sonar-ui-common/components/intl/__tests__/DateTimeFormatter-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/intl/__tests__/TimeFormatter-test.tsx b/server/sonar-ui-common/components/intl/__tests__/TimeFormatter-test.tsx index da291c5fde5..0af517feb93 100644 --- a/server/sonar-ui-common/components/intl/__tests__/TimeFormatter-test.tsx +++ b/server/sonar-ui-common/components/intl/__tests__/TimeFormatter-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/lazyLoadComponent.tsx b/server/sonar-ui-common/components/lazyLoadComponent.tsx index 9600306b5f8..25b96db6c36 100644 --- a/server/sonar-ui-common/components/lazyLoadComponent.tsx +++ b/server/sonar-ui-common/components/lazyLoadComponent.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/theme.ts b/server/sonar-ui-common/components/theme.ts index c3810aaddf2..a63104f1e56 100644 --- a/server/sonar-ui-common/components/theme.ts +++ b/server/sonar-ui-common/components/theme.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/ui/Alert.tsx b/server/sonar-ui-common/components/ui/Alert.tsx index 292173504a8..376d6e5fec6 100644 --- a/server/sonar-ui-common/components/ui/Alert.tsx +++ b/server/sonar-ui-common/components/ui/Alert.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/ui/AutoEllipsis.tsx b/server/sonar-ui-common/components/ui/AutoEllipsis.tsx index a6a9a89ce2f..ee2ed0ae7da 100644 --- a/server/sonar-ui-common/components/ui/AutoEllipsis.tsx +++ b/server/sonar-ui-common/components/ui/AutoEllipsis.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/ui/ContextNavBar.css b/server/sonar-ui-common/components/ui/ContextNavBar.css index 7055704c4d2..2c3865a835d 100644 --- a/server/sonar-ui-common/components/ui/ContextNavBar.css +++ b/server/sonar-ui-common/components/ui/ContextNavBar.css @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/ui/ContextNavBar.tsx b/server/sonar-ui-common/components/ui/ContextNavBar.tsx index abae91c1d86..07a75d15ae5 100644 --- a/server/sonar-ui-common/components/ui/ContextNavBar.tsx +++ b/server/sonar-ui-common/components/ui/ContextNavBar.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/ui/DeferredSpinner.css b/server/sonar-ui-common/components/ui/DeferredSpinner.css index 7ee76107ce8..22569c0c6b6 100644 --- a/server/sonar-ui-common/components/ui/DeferredSpinner.css +++ b/server/sonar-ui-common/components/ui/DeferredSpinner.css @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/ui/DeferredSpinner.tsx b/server/sonar-ui-common/components/ui/DeferredSpinner.tsx index 1b972fe3f23..7021917c0bc 100644 --- a/server/sonar-ui-common/components/ui/DeferredSpinner.tsx +++ b/server/sonar-ui-common/components/ui/DeferredSpinner.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/ui/DuplicationsRating.css b/server/sonar-ui-common/components/ui/DuplicationsRating.css index 0541c36c9f0..82f4024bca3 100644 --- a/server/sonar-ui-common/components/ui/DuplicationsRating.css +++ b/server/sonar-ui-common/components/ui/DuplicationsRating.css @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/ui/DuplicationsRating.tsx b/server/sonar-ui-common/components/ui/DuplicationsRating.tsx index 6d2c6df2a80..9289f587960 100644 --- a/server/sonar-ui-common/components/ui/DuplicationsRating.tsx +++ b/server/sonar-ui-common/components/ui/DuplicationsRating.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/ui/FilesCounter.tsx b/server/sonar-ui-common/components/ui/FilesCounter.tsx index 8303e4f661f..60b96c223fa 100644 --- a/server/sonar-ui-common/components/ui/FilesCounter.tsx +++ b/server/sonar-ui-common/components/ui/FilesCounter.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/ui/GenericAvatar.tsx b/server/sonar-ui-common/components/ui/GenericAvatar.tsx index 9221bdcd73d..1d9aab2aa9f 100644 --- a/server/sonar-ui-common/components/ui/GenericAvatar.tsx +++ b/server/sonar-ui-common/components/ui/GenericAvatar.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/ui/Level.css b/server/sonar-ui-common/components/ui/Level.css index ec4e83091f7..a4d722f01ce 100644 --- a/server/sonar-ui-common/components/ui/Level.css +++ b/server/sonar-ui-common/components/ui/Level.css @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/ui/Level.tsx b/server/sonar-ui-common/components/ui/Level.tsx index 0e384f395bb..8d2284df17e 100644 --- a/server/sonar-ui-common/components/ui/Level.tsx +++ b/server/sonar-ui-common/components/ui/Level.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/ui/MandatoryFieldMarker.tsx b/server/sonar-ui-common/components/ui/MandatoryFieldMarker.tsx index 9d1e2b803d3..bedf016d2a6 100644 --- a/server/sonar-ui-common/components/ui/MandatoryFieldMarker.tsx +++ b/server/sonar-ui-common/components/ui/MandatoryFieldMarker.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/ui/MandatoryFieldsExplanation.tsx b/server/sonar-ui-common/components/ui/MandatoryFieldsExplanation.tsx index 958db7d58ee..67ef7370bca 100644 --- a/server/sonar-ui-common/components/ui/MandatoryFieldsExplanation.tsx +++ b/server/sonar-ui-common/components/ui/MandatoryFieldsExplanation.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/ui/NavBar.css b/server/sonar-ui-common/components/ui/NavBar.css index 030cc5787bf..c9e5757121d 100644 --- a/server/sonar-ui-common/components/ui/NavBar.css +++ b/server/sonar-ui-common/components/ui/NavBar.css @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/ui/NavBar.tsx b/server/sonar-ui-common/components/ui/NavBar.tsx index 5668bf4b4db..5f6de14ffaa 100644 --- a/server/sonar-ui-common/components/ui/NavBar.tsx +++ b/server/sonar-ui-common/components/ui/NavBar.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -22,7 +22,7 @@ import { throttle } from 'lodash'; import * as React from 'react'; import './NavBar.css'; -interface Props extends React.HTMLProps<HTMLDivElement> { +export interface NavBarProps { children?: React.ReactNode; className?: string; height: number; @@ -35,10 +35,13 @@ interface State { left: number; } -export default class NavBar extends React.PureComponent<Props, State> { +export default class NavBar extends React.PureComponent< + NavBarProps & React.HTMLProps<HTMLDivElement>, + State +> { throttledFollowHorizontalScroll: () => void; - constructor(props: Props) { + constructor(props: NavBarProps) { super(props); this.state = { left: 0 }; this.throttledFollowHorizontalScroll = throttle(this.followHorizontalScroll, 10); diff --git a/server/sonar-ui-common/components/ui/NavBarTabs.css b/server/sonar-ui-common/components/ui/NavBarTabs.css index 6b7bfe8632d..f43e1389f07 100644 --- a/server/sonar-ui-common/components/ui/NavBarTabs.css +++ b/server/sonar-ui-common/components/ui/NavBarTabs.css @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/ui/NavBarTabs.tsx b/server/sonar-ui-common/components/ui/NavBarTabs.tsx index af79655648b..0cc09e5abc6 100644 --- a/server/sonar-ui-common/components/ui/NavBarTabs.tsx +++ b/server/sonar-ui-common/components/ui/NavBarTabs.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/ui/NewsBox.css b/server/sonar-ui-common/components/ui/NewsBox.css index 0465f2f2337..1adae9f9102 100644 --- a/server/sonar-ui-common/components/ui/NewsBox.css +++ b/server/sonar-ui-common/components/ui/NewsBox.css @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/ui/NewsBox.tsx b/server/sonar-ui-common/components/ui/NewsBox.tsx index 67bf921935d..27626765848 100644 --- a/server/sonar-ui-common/components/ui/NewsBox.tsx +++ b/server/sonar-ui-common/components/ui/NewsBox.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/ui/PageActions.tsx b/server/sonar-ui-common/components/ui/PageActions.tsx index 1785393fecd..8c2e4106b16 100644 --- a/server/sonar-ui-common/components/ui/PageActions.tsx +++ b/server/sonar-ui-common/components/ui/PageActions.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/ui/Rating.css b/server/sonar-ui-common/components/ui/Rating.css index 82b9604803f..8bd2dda1a3d 100644 --- a/server/sonar-ui-common/components/ui/Rating.css +++ b/server/sonar-ui-common/components/ui/Rating.css @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/ui/Rating.tsx b/server/sonar-ui-common/components/ui/Rating.tsx index 69279b2c68c..91c661ffc97 100644 --- a/server/sonar-ui-common/components/ui/Rating.tsx +++ b/server/sonar-ui-common/components/ui/Rating.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/ui/SizeRating.css b/server/sonar-ui-common/components/ui/SizeRating.css index 2a08587f4e4..4403c162271 100644 --- a/server/sonar-ui-common/components/ui/SizeRating.css +++ b/server/sonar-ui-common/components/ui/SizeRating.css @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/ui/SizeRating.tsx b/server/sonar-ui-common/components/ui/SizeRating.tsx index b76a79a602b..190c5a3205a 100644 --- a/server/sonar-ui-common/components/ui/SizeRating.tsx +++ b/server/sonar-ui-common/components/ui/SizeRating.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/ui/__tests__/Alert-test.tsx b/server/sonar-ui-common/components/ui/__tests__/Alert-test.tsx index 6355d5fae94..baed94e98bc 100644 --- a/server/sonar-ui-common/components/ui/__tests__/Alert-test.tsx +++ b/server/sonar-ui-common/components/ui/__tests__/Alert-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/ui/__tests__/AutoEllipsis-test.tsx b/server/sonar-ui-common/components/ui/__tests__/AutoEllipsis-test.tsx index c01d263d456..5d3411078cf 100644 --- a/server/sonar-ui-common/components/ui/__tests__/AutoEllipsis-test.tsx +++ b/server/sonar-ui-common/components/ui/__tests__/AutoEllipsis-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/ui/__tests__/DeferredSpinner-test.tsx b/server/sonar-ui-common/components/ui/__tests__/DeferredSpinner-test.tsx index 6404ff6d0d9..8a7bc268499 100644 --- a/server/sonar-ui-common/components/ui/__tests__/DeferredSpinner-test.tsx +++ b/server/sonar-ui-common/components/ui/__tests__/DeferredSpinner-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/ui/__tests__/FilesCounter-test.tsx b/server/sonar-ui-common/components/ui/__tests__/FilesCounter-test.tsx index 90c65e2b3c6..2f020368cdb 100644 --- a/server/sonar-ui-common/components/ui/__tests__/FilesCounter-test.tsx +++ b/server/sonar-ui-common/components/ui/__tests__/FilesCounter-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/ui/__tests__/GenericAvatar-test.tsx b/server/sonar-ui-common/components/ui/__tests__/GenericAvatar-test.tsx index 468b063f2bc..d244490dcd9 100644 --- a/server/sonar-ui-common/components/ui/__tests__/GenericAvatar-test.tsx +++ b/server/sonar-ui-common/components/ui/__tests__/GenericAvatar-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/ui/__tests__/Level-test.tsx b/server/sonar-ui-common/components/ui/__tests__/Level-test.tsx index 6cc7904f749..8f52a420665 100644 --- a/server/sonar-ui-common/components/ui/__tests__/Level-test.tsx +++ b/server/sonar-ui-common/components/ui/__tests__/Level-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/ui/__tests__/MandatoryFieldMarker-test.tsx b/server/sonar-ui-common/components/ui/__tests__/MandatoryFieldMarker-test.tsx index dc3453990f5..8cd043086c2 100644 --- a/server/sonar-ui-common/components/ui/__tests__/MandatoryFieldMarker-test.tsx +++ b/server/sonar-ui-common/components/ui/__tests__/MandatoryFieldMarker-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -17,7 +17,6 @@ * 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 * as React from 'react'; import MandatoryFieldMarker, { MandatoryFieldMarkerProps } from '../MandatoryFieldMarker'; diff --git a/server/sonar-ui-common/components/ui/__tests__/MandatoryFieldsExplanation-test.tsx b/server/sonar-ui-common/components/ui/__tests__/MandatoryFieldsExplanation-test.tsx index 1fd156d93ea..5104f1cfbad 100644 --- a/server/sonar-ui-common/components/ui/__tests__/MandatoryFieldsExplanation-test.tsx +++ b/server/sonar-ui-common/components/ui/__tests__/MandatoryFieldsExplanation-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -17,7 +17,6 @@ * 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 * as React from 'react'; import MandatoryFieldsExplanation, { diff --git a/server/sonar-ui-common/components/ui/__tests__/NavBar-test.tsx b/server/sonar-ui-common/components/ui/__tests__/NavBar-test.tsx index 7f4e78e8164..1db05af50e0 100644 --- a/server/sonar-ui-common/components/ui/__tests__/NavBar-test.tsx +++ b/server/sonar-ui-common/components/ui/__tests__/NavBar-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import NavBar from '../NavBar'; +import NavBar, { NavBarProps } from '../NavBar'; it('should render correctly', () => { const wrapper = shallowRender(); @@ -31,7 +31,7 @@ it('should render correctly with notif and not limited', () => { expect(wrapper).toMatchSnapshot(); }); -function shallowRender(props: Partial<NavBar['props']> = {}) { +function shallowRender(props: Partial<NavBarProps> = {}) { return shallow( <NavBar height={42} {...props}> <div className="my-navbar-content" /> diff --git a/server/sonar-ui-common/components/ui/__tests__/NewsBox-test.tsx b/server/sonar-ui-common/components/ui/__tests__/NewsBox-test.tsx index 25693412f31..8b46a49efbc 100644 --- a/server/sonar-ui-common/components/ui/__tests__/NewsBox-test.tsx +++ b/server/sonar-ui-common/components/ui/__tests__/NewsBox-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/ui/__tests__/PageActions-test.tsx b/server/sonar-ui-common/components/ui/__tests__/PageActions-test.tsx index f144f882a53..46594418d3a 100644 --- a/server/sonar-ui-common/components/ui/__tests__/PageActions-test.tsx +++ b/server/sonar-ui-common/components/ui/__tests__/PageActions-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/ui/__tests__/Rating-test.tsx b/server/sonar-ui-common/components/ui/__tests__/Rating-test.tsx index 55293f59b4c..f8f1540adfc 100644 --- a/server/sonar-ui-common/components/ui/__tests__/Rating-test.tsx +++ b/server/sonar-ui-common/components/ui/__tests__/Rating-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/ui/__tests__/SizeRating-test.tsx b/server/sonar-ui-common/components/ui/__tests__/SizeRating-test.tsx index 43eb09c600b..7c3b8e3b005 100644 --- a/server/sonar-ui-common/components/ui/__tests__/SizeRating-test.tsx +++ b/server/sonar-ui-common/components/ui/__tests__/SizeRating-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/ui/__tests__/popups-test.tsx b/server/sonar-ui-common/components/ui/__tests__/popups-test.tsx index 777c1004d77..c014d824b6f 100644 --- a/server/sonar-ui-common/components/ui/__tests__/popups-test.tsx +++ b/server/sonar-ui-common/components/ui/__tests__/popups-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -104,7 +104,6 @@ describe('PortalPopup', () => { it('should correctly compute the popup arrow positioning', () => { const wrapper = shallowRender({ arrowOffset: -2 }); - const getPlacementSpy = jest.spyOn(wrapper.instance(), 'getPlacement'); expect( wrapper.instance().adjustArrowPosition(PopupPlacement.BottomLeft, { leftFix: 10, topFix: 10 }) diff --git a/server/sonar-ui-common/components/ui/popups.css b/server/sonar-ui-common/components/ui/popups.css index 7c00bd43f23..f7bb71b188c 100644 --- a/server/sonar-ui-common/components/ui/popups.css +++ b/server/sonar-ui-common/components/ui/popups.css @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/ui/popups.tsx b/server/sonar-ui-common/components/ui/popups.tsx index 2cb5a8ba78a..01bb28f658f 100644 --- a/server/sonar-ui-common/components/ui/popups.tsx +++ b/server/sonar-ui-common/components/ui/popups.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/components/ui/update-center/MetaData.css b/server/sonar-ui-common/components/ui/update-center/MetaData.css index 582d6633757..6bc5a632fb1 100644 --- a/server/sonar-ui-common/components/ui/update-center/MetaData.css +++ b/server/sonar-ui-common/components/ui/update-center/MetaData.css @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -17,7 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - .update-center-meta-data { margin: 16px 0; padding: 16px 16px 8px 16px; diff --git a/server/sonar-ui-common/components/ui/update-center/MetaData.tsx b/server/sonar-ui-common/components/ui/update-center/MetaData.tsx index 568a7fba454..017527abcde 100644 --- a/server/sonar-ui-common/components/ui/update-center/MetaData.tsx +++ b/server/sonar-ui-common/components/ui/update-center/MetaData.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -17,7 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - import * as React from 'react'; import './MetaData.css'; import MetaDataVersions from './MetaDataVersions'; diff --git a/server/sonar-ui-common/components/ui/update-center/MetaDataVersion.tsx b/server/sonar-ui-common/components/ui/update-center/MetaDataVersion.tsx index f9f2155179e..d91a1bd3bc6 100644 --- a/server/sonar-ui-common/components/ui/update-center/MetaDataVersion.tsx +++ b/server/sonar-ui-common/components/ui/update-center/MetaDataVersion.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -17,7 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - import classNames from 'classnames'; import * as React from 'react'; import { AdvancedDownloadUrl, MetaDataVersionInformation } from './update-center-metadata'; diff --git a/server/sonar-ui-common/components/ui/update-center/MetaDataVersions.tsx b/server/sonar-ui-common/components/ui/update-center/MetaDataVersions.tsx index 59e3a2cf41b..f51e11e730a 100644 --- a/server/sonar-ui-common/components/ui/update-center/MetaDataVersions.tsx +++ b/server/sonar-ui-common/components/ui/update-center/MetaDataVersions.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -17,7 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - import * as React from 'react'; import MetaDataVersion from './MetaDataVersion'; import { MetaDataVersionInformation } from './update-center-metadata'; diff --git a/server/sonar-ui-common/components/ui/update-center/__tests__/MetaData-test.tsx b/server/sonar-ui-common/components/ui/update-center/__tests__/MetaData-test.tsx index 574abcb130f..85c6ce0ac71 100644 --- a/server/sonar-ui-common/components/ui/update-center/__tests__/MetaData-test.tsx +++ b/server/sonar-ui-common/components/ui/update-center/__tests__/MetaData-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -17,7 +17,6 @@ * 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 * as React from 'react'; import { waitAndUpdate } from '../../../../helpers/testUtils'; diff --git a/server/sonar-ui-common/components/ui/update-center/__tests__/MetaDataVersion-test.tsx b/server/sonar-ui-common/components/ui/update-center/__tests__/MetaDataVersion-test.tsx index eb21373830c..f1e5b947224 100644 --- a/server/sonar-ui-common/components/ui/update-center/__tests__/MetaDataVersion-test.tsx +++ b/server/sonar-ui-common/components/ui/update-center/__tests__/MetaDataVersion-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -17,7 +17,6 @@ * 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 * as React from 'react'; import MetaDataVersion, { MetaDataVersionProps } from '../MetaDataVersion'; diff --git a/server/sonar-ui-common/components/ui/update-center/__tests__/MetaDataVersions-test.tsx b/server/sonar-ui-common/components/ui/update-center/__tests__/MetaDataVersions-test.tsx index 5a4fc20d4f1..0648c0fd59d 100644 --- a/server/sonar-ui-common/components/ui/update-center/__tests__/MetaDataVersions-test.tsx +++ b/server/sonar-ui-common/components/ui/update-center/__tests__/MetaDataVersions-test.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -17,7 +17,6 @@ * 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 * as React from 'react'; import { click } from '../../../../helpers/testUtils'; diff --git a/server/sonar-ui-common/components/ui/update-center/mocks/update-center-metadata.ts b/server/sonar-ui-common/components/ui/update-center/mocks/update-center-metadata.ts index 0da8569994f..52e8c660d15 100644 --- a/server/sonar-ui-common/components/ui/update-center/mocks/update-center-metadata.ts +++ b/server/sonar-ui-common/components/ui/update-center/mocks/update-center-metadata.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -17,7 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - import { MetaDataInformation, MetaDataVersionInformation } from '../update-center-metadata'; export function mockMetaDataVersionInformation( diff --git a/server/sonar-ui-common/components/ui/update-center/update-center-metadata.ts b/server/sonar-ui-common/components/ui/update-center/update-center-metadata.ts index 00e1d969b40..a88b385c3b6 100644 --- a/server/sonar-ui-common/components/ui/update-center/update-center-metadata.ts +++ b/server/sonar-ui-common/components/ui/update-center/update-center-metadata.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -17,7 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - export interface MetaDataInformation { category?: string; isSonarSourceCommercial?: boolean; diff --git a/server/sonar-ui-common/config/jest/CSSStub.js b/server/sonar-ui-common/config/jest/CSSStub.js index ca0a66661fb..2a89db848b0 100644 --- a/server/sonar-ui-common/config/jest/CSSStub.js +++ b/server/sonar-ui-common/config/jest/CSSStub.js @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/config/jest/FileStub.js b/server/sonar-ui-common/config/jest/FileStub.js index 8ed5f4c5361..3afbc40ae7c 100644 --- a/server/sonar-ui-common/config/jest/FileStub.js +++ b/server/sonar-ui-common/config/jest/FileStub.js @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/config/jest/SetupEnzyme.js b/server/sonar-ui-common/config/jest/SetupEnzyme.js index 89c37ee6d66..8cb3f810f01 100644 --- a/server/sonar-ui-common/config/jest/SetupEnzyme.js +++ b/server/sonar-ui-common/config/jest/SetupEnzyme.js @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/config/jest/SetupSUC.ts b/server/sonar-ui-common/config/jest/SetupSUC.ts index 1ce2eb35e53..4b29cdee1ba 100644 --- a/server/sonar-ui-common/config/jest/SetupSUC.ts +++ b/server/sonar-ui-common/config/jest/SetupSUC.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/config/jest/SetupTestEnvironment.js b/server/sonar-ui-common/config/jest/SetupTestEnvironment.js index 432cbb1f250..9e9df7cd5e3 100644 --- a/server/sonar-ui-common/config/jest/SetupTestEnvironment.js +++ b/server/sonar-ui-common/config/jest/SetupTestEnvironment.js @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -17,7 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - require('whatwg-fetch'); const content = document.createElement('div'); diff --git a/server/sonar-ui-common/config/jest/testTheme.ts b/server/sonar-ui-common/config/jest/testTheme.ts index 91a4f666fdd..7d219c34a0f 100644 --- a/server/sonar-ui-common/config/jest/testTheme.ts +++ b/server/sonar-ui-common/config/jest/testTheme.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/helpers/__tests__/colors-test.ts b/server/sonar-ui-common/helpers/__tests__/colors-test.ts index ccc58d305b6..ae80a29e093 100644 --- a/server/sonar-ui-common/helpers/__tests__/colors-test.ts +++ b/server/sonar-ui-common/helpers/__tests__/colors-test.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/helpers/__tests__/dates-test.ts b/server/sonar-ui-common/helpers/__tests__/dates-test.ts index 688fca9904c..9482f6d6476 100644 --- a/server/sonar-ui-common/helpers/__tests__/dates-test.ts +++ b/server/sonar-ui-common/helpers/__tests__/dates-test.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/helpers/__tests__/handleRequiredAuthentication-test.ts b/server/sonar-ui-common/helpers/__tests__/handleRequiredAuthentication-test.ts index fa90439d195..abb391a2e21 100644 --- a/server/sonar-ui-common/helpers/__tests__/handleRequiredAuthentication-test.ts +++ b/server/sonar-ui-common/helpers/__tests__/handleRequiredAuthentication-test.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/helpers/__tests__/init-test.ts b/server/sonar-ui-common/helpers/__tests__/init-test.ts index 44d2dbe984a..8f7e927a867 100644 --- a/server/sonar-ui-common/helpers/__tests__/init-test.ts +++ b/server/sonar-ui-common/helpers/__tests__/init-test.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/helpers/__tests__/l10n-test.ts b/server/sonar-ui-common/helpers/__tests__/l10n-test.ts index 3252baf524e..523ac99b30b 100644 --- a/server/sonar-ui-common/helpers/__tests__/l10n-test.ts +++ b/server/sonar-ui-common/helpers/__tests__/l10n-test.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -19,7 +19,17 @@ */ /* eslint-disable camelcase */ import Initializer, { getMessages } from '../init'; -import { hasMessage, translate, translateWithParameters } from '../l10n'; +import { + getLocalizedCategoryMetricName, + getLocalizedMetricDomain, + getLocalizedMetricName, + getShortMonthName, + getShortWeekDayName, + getWeekDayName, + hasMessage, + translate, + translateWithParameters, +} from '../l10n'; const originalMessages = getMessages(); const MSG = 'my_message'; @@ -96,3 +106,78 @@ describe('hasMessage', () => { expect(hasMessage('foo', 'bar')).toBe(false); }); }); + +describe('getLocalizedMetricName', () => { + const metric = { key: 'new_code', name: 'new_code_metric_name' }; + + it('should return the metric name translation', () => { + Initializer.setMessages({ 'metric.new_code.name': 'metric.new_code.name_t' }); + expect(getLocalizedMetricName(metric)).toBe('metric.new_code.name_t'); + }); + + it('should return the metric short name', () => { + Initializer.setMessages({ 'metric.new_code.short_name': 'metric.new_code.short_name_t' }); + expect(getLocalizedMetricName(metric, true)).toBe('metric.new_code.short_name_t'); + }); + + it('should fallback on name if short name is absent', () => { + Initializer.setMessages({ 'metric.new_code.name': 'metric.new_code.name_t' }); + expect(getLocalizedMetricName(metric, true)).toBe('metric.new_code.name_t'); + }); + + it('should fallback on metric name if translation is absent', () => { + expect(getLocalizedMetricName(metric)).toBe('new_code_metric_name'); + }); + + it('should fallback on metric key if nothing else is available', () => { + expect(getLocalizedMetricName({ key: 'new_code' })).toBe('new_code'); + }); +}); + +describe('getLocalizedCategoryMetricName', () => { + it('should return metric category name translation', () => { + Initializer.setMessages({ + 'metric.new_code.extra_short_name': 'metric.new_code.extra_short_name_t', + }); + expect(getLocalizedCategoryMetricName({ key: 'new_code' })).toBe( + 'metric.new_code.extra_short_name_t' + ); + }); + + it('should fallback on metric name if extra_short_name is absent', () => { + Initializer.setMessages({ 'metric.new_code.name': 'metric.new_code.name_t' }); + expect(getLocalizedCategoryMetricName({ key: 'new_code' })).toBe('metric.new_code.name_t'); + }); +}); + +describe('getLocalizedMetricDomain', () => { + it('should return metric domain name translation', () => { + Initializer.setMessages({ 'metric_domain.domain': 'metric_domain.domain_t' }); + expect(getLocalizedMetricDomain('domain')).toBe('metric_domain.domain_t'); + }); + + it('should fallback on metric domain name', () => { + expect(getLocalizedMetricDomain('domain')).toBe('domain'); + }); +}); + +describe('getShortMonthName', () => { + it('should properly translation months', () => { + Initializer.setMessages({ Jan: 'Jan_t' }); + expect(getShortMonthName(0)).toBe('Jan_t'); + }); +}); + +describe('getWeekDayName', () => { + it('should properly translation weekday', () => { + Initializer.setMessages({ Sunday: 'Sunday_t' }); + expect(getWeekDayName(0)).toBe('Sunday_t'); + }); +}); + +describe('getShortWeekDayName', () => { + it('should properly translation short weekday', () => { + Initializer.setMessages({ Sun: 'Sun_t' }); + expect(getShortWeekDayName(0)).toBe('Sun_t'); + }); +}); diff --git a/server/sonar-ui-common/helpers/__tests__/measures-test.ts b/server/sonar-ui-common/helpers/__tests__/measures-test.ts index 346f0dda3be..f9cb4ab04ce 100644 --- a/server/sonar-ui-common/helpers/__tests__/measures-test.ts +++ b/server/sonar-ui-common/helpers/__tests__/measures-test.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/helpers/__tests__/pages-test.ts b/server/sonar-ui-common/helpers/__tests__/pages-test.ts new file mode 100644 index 00000000000..9f4ba96c172 --- /dev/null +++ b/server/sonar-ui-common/helpers/__tests__/pages-test.ts @@ -0,0 +1,51 @@ +/* + * SonarQube + * Copyright (C) 2009-2021 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 { + addNoFooterPageClass, + addSideBarClass, + addWhitePageClass, + removeNoFooterPageClass, + removeSideBarClass, + removeWhitePageClass, +} from '../pages'; + +describe('class adders', () => { + it.each([ + [addSideBarClass, 'sidebar-page'], + [addNoFooterPageClass, 'no-footer-page'], + [addWhitePageClass, 'white-page'], + ])('%s should add the class', (fct, cls) => { + const toggle = jest.spyOn(document.body.classList, 'toggle'); + fct(); + expect(toggle).toBeCalledWith(cls, true); + }); +}); + +describe('class removers', () => { + it.each([ + [removeSideBarClass, 'sidebar-page'], + [removeNoFooterPageClass, 'no-footer-page'], + [removeWhitePageClass, 'white-page'], + ])('%s should add the class', (fct, cls) => { + const toggle = jest.spyOn(document.body.classList, 'toggle'); + fct(); + expect(toggle).toBeCalledWith(cls, false); + }); +}); diff --git a/server/sonar-ui-common/helpers/__tests__/path-test.ts b/server/sonar-ui-common/helpers/__tests__/path-test.ts index 997d23e055f..12f32ab7d0c 100644 --- a/server/sonar-ui-common/helpers/__tests__/path-test.ts +++ b/server/sonar-ui-common/helpers/__tests__/path-test.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -17,7 +17,14 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { collapsedDirFromPath, cutLongWords, fileFromPath } from '../path'; +import { + collapsedDirFromPath, + collapsePath, + cutLongWords, + fileFromPath, + limitComponentName, + splitPath, +} from '../path'; describe('#collapsedDirFromPath()', () => { it('should return null when pass null', () => { @@ -78,3 +85,44 @@ describe('#cutLongWords', () => { expect(cutLongWords('This is a test')).toBe('This is a test'); }); }); + +describe('collapsePath', () => { + it('should fail fast if path is not a string', () => { + expect(collapsePath({} as string)).toBe(''); + }); + + it('should not collapse short path', () => { + const path = 'my/path'; + expect(collapsePath(path)).toBe(path); + }); + + it('should collapse path longer than the limit', () => { + const path = 'my/long/path/very/long/path'; + expect(collapsePath(path, 10)).toBe('my/.../very/long/path'); + expect(collapsePath(path, 5)).toBe('my/.../long/path'); + expect(collapsePath(path, 2)).toBe('my/.../path'); + }); +}); + +describe('splitPath', () => { + it('should split path properly', () => { + expect(splitPath('my/super/path')).toEqual({ head: 'my/super', tail: 'path' }); + expect(splitPath('my/super/very/long/path')).toEqual({ + head: 'my/super/very/long', + tail: 'path', + }); + }); +}); + +describe('limitComponentName', () => { + const name = 'my/super/name'; + + it('should fail fast if component name is not a string', () => { + expect(limitComponentName({} as string)).toBe(''); + }); + + it('should limiit component name longer than the limit', () => { + expect(limitComponentName(name)).toBe(name); + expect(limitComponentName(name, 10)).toBe('my/super/n...'); + }); +}); diff --git a/server/sonar-ui-common/helpers/__tests__/query-test.ts b/server/sonar-ui-common/helpers/__tests__/query-test.ts index 1adea91e969..4a6a671005c 100644 --- a/server/sonar-ui-common/helpers/__tests__/query-test.ts +++ b/server/sonar-ui-common/helpers/__tests__/query-test.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/helpers/__tests__/ratings-test.ts b/server/sonar-ui-common/helpers/__tests__/ratings-test.ts new file mode 100644 index 00000000000..619ef1cdbd7 --- /dev/null +++ b/server/sonar-ui-common/helpers/__tests__/ratings-test.ts @@ -0,0 +1,114 @@ +/* + * SonarQube + * Copyright (C) 2009-2021 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 { + getCoverageRatingAverageValue, + getCoverageRatingLabel, + getDuplicationsRatingAverageValue, + getDuplicationsRatingLabel, + getSizeRatingAverageValue, + getSizeRatingLabel, +} from '../ratings'; + +describe('getCoverageRatingLabel', () => { + it('should fail', () => { + expect(() => { + getCoverageRatingLabel(-1); + }).toThrow(); + }); + it.each([ + [1, '≥ 80%'], + [2, '70% - 80%'], + [3, '50% - 70%'], + [4, '30% - 50%'], + [5, '< 30%'], + ])('should return the correct label for %s', (rating, label) => { + expect(getCoverageRatingLabel(rating)).toBe(label); + }); +}); + +describe('getCoverageRatingAverageValue', () => { + it.each([ + [1, 90], + [2, 75], + [3, 60], + [4, 40], + [5, 15], + ])('should return the correct value', (rating, value) => { + expect(getCoverageRatingAverageValue(rating)).toBe(value); + }); +}); + +describe('getDuplicationsRatingLabel', () => { + it('should fail', () => { + expect(() => { + getCoverageRatingLabel(-1); + }).toThrow(); + }); + it.each([ + [1, '< 3%'], + [2, '3% - 5%'], + [3, '5% - 10%'], + [4, '10% - 20%'], + [5, '> 20%'], + ])('should return the correct label for %s', (rating, label) => { + expect(getDuplicationsRatingLabel(rating)).toBe(label); + }); +}); + +describe('getDuplicationsRatingAverageValue', () => { + it.each([ + [1, 1.5], + [2, 4], + [3, 7.5], + [4, 15], + [5, 30], + ])('should return the correct value', (rating, value) => { + expect(getDuplicationsRatingAverageValue(rating)).toBe(value); + }); +}); + +describe('getSizeRatingLabel', () => { + it('should fail', () => { + expect(() => { + getCoverageRatingLabel(-1); + }).toThrow(); + }); + it.each([ + [1, '< 1k'], + [2, '1k - 10k'], + [3, '10k - 100k'], + [4, '100k - 500k'], + [5, '> 500k'], + ])('should return the correct label for %s', (rating, label) => { + expect(getSizeRatingLabel(rating)).toBe(label); + }); +}); + +describe('getSizeRatingAverageValue', () => { + it.each([ + [1, 500], + [2, 5000], + [3, 50000], + [4, 250000], + [5, 750000], + ])('should return the correct value', (rating, value) => { + expect(getSizeRatingAverageValue(rating)).toBe(value); + }); +}); diff --git a/server/sonar-ui-common/helpers/__tests__/request-test.ts b/server/sonar-ui-common/helpers/__tests__/request-test.ts index aee57700784..a6ffa480d2d 100644 --- a/server/sonar-ui-common/helpers/__tests__/request-test.ts +++ b/server/sonar-ui-common/helpers/__tests__/request-test.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -17,7 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - import handleRequiredAuthentication from '../handleRequiredAuthentication'; import { checkStatus, diff --git a/server/sonar-ui-common/helpers/__tests__/scrolling-test.ts b/server/sonar-ui-common/helpers/__tests__/scrolling-test.ts index ef9f3802d2a..43ec5664178 100644 --- a/server/sonar-ui-common/helpers/__tests__/scrolling-test.ts +++ b/server/sonar-ui-common/helpers/__tests__/scrolling-test.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/helpers/__tests__/strings-test.ts b/server/sonar-ui-common/helpers/__tests__/strings-test.ts index 2a9da6cd6a9..00711cf1c1d 100644 --- a/server/sonar-ui-common/helpers/__tests__/strings-test.ts +++ b/server/sonar-ui-common/helpers/__tests__/strings-test.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/helpers/__tests__/urls-test.ts b/server/sonar-ui-common/helpers/__tests__/urls-test.ts index 171b066ae66..1eb75452a8d 100644 --- a/server/sonar-ui-common/helpers/__tests__/urls-test.ts +++ b/server/sonar-ui-common/helpers/__tests__/urls-test.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/helpers/colors.ts b/server/sonar-ui-common/helpers/colors.ts index 0d48f016a18..839586b4e20 100644 --- a/server/sonar-ui-common/helpers/colors.ts +++ b/server/sonar-ui-common/helpers/colors.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/helpers/cookies.ts b/server/sonar-ui-common/helpers/cookies.ts index 42da1d8c98c..6c060726711 100644 --- a/server/sonar-ui-common/helpers/cookies.ts +++ b/server/sonar-ui-common/helpers/cookies.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/helpers/csv.ts b/server/sonar-ui-common/helpers/csv.ts index cd841d4224b..d162d018f3c 100644 --- a/server/sonar-ui-common/helpers/csv.ts +++ b/server/sonar-ui-common/helpers/csv.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/helpers/dates.ts b/server/sonar-ui-common/helpers/dates.ts index 0661d62a634..daa25a7b603 100644 --- a/server/sonar-ui-common/helpers/dates.ts +++ b/server/sonar-ui-common/helpers/dates.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/helpers/getHistory.ts b/server/sonar-ui-common/helpers/getHistory.ts index 5daecc37c97..f7162fd06e4 100644 --- a/server/sonar-ui-common/helpers/getHistory.ts +++ b/server/sonar-ui-common/helpers/getHistory.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/helpers/handleRequiredAuthentication.ts b/server/sonar-ui-common/helpers/handleRequiredAuthentication.ts index 116102b7287..061cde8c09a 100644 --- a/server/sonar-ui-common/helpers/handleRequiredAuthentication.ts +++ b/server/sonar-ui-common/helpers/handleRequiredAuthentication.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/helpers/init.ts b/server/sonar-ui-common/helpers/init.ts index 42a894769d2..7d2dceaccfd 100644 --- a/server/sonar-ui-common/helpers/init.ts +++ b/server/sonar-ui-common/helpers/init.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/helpers/keycodes.ts b/server/sonar-ui-common/helpers/keycodes.ts index 5e606938941..2dad00a7fc0 100644 --- a/server/sonar-ui-common/helpers/keycodes.ts +++ b/server/sonar-ui-common/helpers/keycodes.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/helpers/l10n.ts b/server/sonar-ui-common/helpers/l10n.ts index aa8c5a82f84..818726ca8b1 100644 --- a/server/sonar-ui-common/helpers/l10n.ts +++ b/server/sonar-ui-common/helpers/l10n.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/helpers/measures.ts b/server/sonar-ui-common/helpers/measures.ts index de4b3b2269e..53715b40731 100644 --- a/server/sonar-ui-common/helpers/measures.ts +++ b/server/sonar-ui-common/helpers/measures.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/helpers/pages.ts b/server/sonar-ui-common/helpers/pages.ts index 36ba560a289..40c686e43fa 100644 --- a/server/sonar-ui-common/helpers/pages.ts +++ b/server/sonar-ui-common/helpers/pages.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/helpers/path.ts b/server/sonar-ui-common/helpers/path.ts index dbd7b9a6285..2a124bf1a63 100644 --- a/server/sonar-ui-common/helpers/path.ts +++ b/server/sonar-ui-common/helpers/path.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/helpers/query.ts b/server/sonar-ui-common/helpers/query.ts index e1f4c6d0480..479b84dda37 100644 --- a/server/sonar-ui-common/helpers/query.ts +++ b/server/sonar-ui-common/helpers/query.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/helpers/ratings.ts b/server/sonar-ui-common/helpers/ratings.ts index 29b942dbe3c..6470ce2c0bf 100644 --- a/server/sonar-ui-common/helpers/ratings.ts +++ b/server/sonar-ui-common/helpers/ratings.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/helpers/request.ts b/server/sonar-ui-common/helpers/request.ts index 0ed88c610f4..6cf106ba815 100644 --- a/server/sonar-ui-common/helpers/request.ts +++ b/server/sonar-ui-common/helpers/request.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/helpers/scrolling.ts b/server/sonar-ui-common/helpers/scrolling.ts index 6f08703ec41..49473f88cea 100644 --- a/server/sonar-ui-common/helpers/scrolling.ts +++ b/server/sonar-ui-common/helpers/scrolling.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -17,7 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - const SCROLLING_DURATION = 100; const SCROLLING_INTERVAL = 10; const SCROLLING_STEPS = SCROLLING_DURATION / SCROLLING_INTERVAL; diff --git a/server/sonar-ui-common/helpers/search.tsx b/server/sonar-ui-common/helpers/search.tsx index dd4382c6795..c12152d33c2 100644 --- a/server/sonar-ui-common/helpers/search.tsx +++ b/server/sonar-ui-common/helpers/search.tsx @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/helpers/storage.ts b/server/sonar-ui-common/helpers/storage.ts index 5a50eb49c5c..c2a16726b87 100644 --- a/server/sonar-ui-common/helpers/storage.ts +++ b/server/sonar-ui-common/helpers/storage.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/helpers/strings.ts b/server/sonar-ui-common/helpers/strings.ts index 4109a7f173d..391bcdb334e 100644 --- a/server/sonar-ui-common/helpers/strings.ts +++ b/server/sonar-ui-common/helpers/strings.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/helpers/testUtils.ts b/server/sonar-ui-common/helpers/testUtils.ts index cf7767eb9e9..9ca54c122a0 100644 --- a/server/sonar-ui-common/helpers/testUtils.ts +++ b/server/sonar-ui-common/helpers/testUtils.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -17,7 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - import { ReactWrapper, ShallowWrapper } from 'enzyme'; export function mockEvent(overrides = {}) { diff --git a/server/sonar-ui-common/helpers/types.ts b/server/sonar-ui-common/helpers/types.ts index 09b786ef807..85ca9976b09 100644 --- a/server/sonar-ui-common/helpers/types.ts +++ b/server/sonar-ui-common/helpers/types.ts @@ -1,6 +1,6 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/helpers/urls.ts b/server/sonar-ui-common/helpers/urls.ts index 599d8fe531e..296091d7b3c 100644 --- a/server/sonar-ui-common/helpers/urls.ts +++ b/server/sonar-ui-common/helpers/urls.ts @@ -1,6 +1,24 @@ /* - * Sonar UI Common - * Copyright (C) 2019-2020 SonarSource SA + * SonarQube + * Copyright (C) 2009-2021 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. + */ +/* + * SonarQube * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/server/sonar-ui-common/package.json b/server/sonar-ui-common/package.json index d2d37c6d3de..0f4b9b896ba 100644 --- a/server/sonar-ui-common/package.json +++ b/server/sonar-ui-common/package.json @@ -92,12 +92,12 @@ "test": "jest", "format": "prettier --write --list-different \"{,!(build|node_modules)/**/}*.{ts,tsx,css}\"", "format-check": "prettier --list-different \"{,!(build|node_modules)/**/}*.{ts,tsx,css}\"", - "license-check": "node scripts/license-check", "lint": "eslint --ext ts,tsx --quiet \"{,!(build|node_modules)/**/}*.{ts,tsx}\"", "lint-report": "eslint --ext ts,tsx -f json -o build/eslint-report.json \"{,!(build|node_modules)/**/}*.{ts,tsx}\"", "ts-check": "tsc --noEmit", - "validate": "yarn ts-check && yarn license-check && yarn lint && yarn format-check && yarn test", - "validate-ci": "yarn lint-report && yarn license-check && yarn format-check && yarn test --coverage" + "validate": "yarn ts-check && yarn lint && yarn format-check && yarn test", + "validate-ci": "yarn lint-report && yarn test --coverage", + "check-ci": "yarn ts-check && yarn format-check" }, "engines": { "node": ">=10.15.3", diff --git a/server/sonar-ui-common/scripts/license-check.js b/server/sonar-ui-common/scripts/license-check.js deleted file mode 100644 index cd4b0226017..00000000000 --- a/server/sonar-ui-common/scripts/license-check.js +++ /dev/null @@ -1,56 +0,0 @@ -const fs = require('fs'); -const diff = require('diff'); -const globby = require('globby'); - -const GLOBS = ['**/*.ts', '**/*.tsx', '!node_modules/**/*', '!build/**/*']; - -let header; - -return readFile('./HEADER') - .then(h => { - header = h; - }) - .then(() => globby(GLOBS)) - .then(readFilesFromPaths) - .then(checkFiles) - .then(errors => { - if (errors) { - console.error(errors, 'files have an invalid license header'); - process.exit(1); - } else { - console.log('✓ All files have valid license headers'); - } - }) - .catch(e => { - console.error(e); - process.exit(1); - }); - -function checkFiles(files) { - return files.reduce((errors, { path, text }) => { - if (text.slice(0, header.length) !== header) { - console.error('❌ ', path); - console.error( - diff.createPatch(path, header + '\n', text.slice(0, header.length) + '\n', '', '') - ); - return errors + 1; - } - return errors; - }, 0); -} - -function readFilesFromPaths(paths) { - return Promise.all(paths.map(path => readFile(path).then(text => ({ path, text })))); -} - -function readFile(path) { - return new Promise((resolve, reject) => { - fs.readFile(path, { encoding: 'utf-8' }, (err, text) => { - if (err) { - reject(err); - } else { - resolve(text); - } - }); - }); -} diff --git a/server/sonar-ui-common/tsconfig.json b/server/sonar-ui-common/tsconfig.json index 91834056e98..5d6424e5b26 100644 --- a/server/sonar-ui-common/tsconfig.json +++ b/server/sonar-ui-common/tsconfig.json @@ -18,6 +18,5 @@ "rootDir": "./", "baseUrl": "." }, - "include": ["components", "helpers", "types.d.ts"], - "exclude": ["**/*-test.*"] + "include": ["components", "helpers", "types.d.ts"] } diff --git a/server/sonar-web/build.gradle b/server/sonar-web/build.gradle index 77194301796..301baf2abed 100644 --- a/server/sonar-web/build.gradle +++ b/server/sonar-web/build.gradle @@ -14,6 +14,10 @@ apply plugin: 'com.github.node-gradle.node' def webappDir = "${buildDir}/webapp" +yarn.configure { + dependsOn tasks.getByPath(':server:sonar-ui-common:yarn_run') +} + yarn_run { ['config', 'public', 'scripts', 'src', '../sonar-docs/src'].each { inputs.dir(it).withPathSensitivity(PathSensitivity.RELATIVE) diff --git a/server/sonar-web/package.json b/server/sonar-web/package.json index 1a3180f06a4..6e69a85a9e6 100644 --- a/server/sonar-web/package.json +++ b/server/sonar-web/package.json @@ -38,7 +38,7 @@ "rehype-slug": "3.0.0", "remark-custom-blocks": "2.5.1", "remark-rehype": "6.0.0", - "sonar-ui-common": "1.0.33", + "sonar-ui-common": "../sonar-ui-common/build/dist", "unist-util-visit": "2.0.2", "valid-url": "1.0.9", "whatwg-fetch": "3.0.0" diff --git a/server/sonar-web/yarn.lock b/server/sonar-web/yarn.lock index a2b8dbf4086..6f5e5ee0e22 100644 --- a/server/sonar-web/yarn.lock +++ b/server/sonar-web/yarn.lock @@ -11082,10 +11082,8 @@ sockjs@^0.3.21: uuid "^3.4.0" websocket-driver "^0.7.4" -sonar-ui-common@1.0.33: +sonar-ui-common@../sonar-ui-common/build/dist: version "1.0.33" - resolved "https://repox.jfrog.io/repox/api/npm/npm/sonar-ui-common/-/sonar-ui-common-1.0.33.tgz#8eb6f40b1ab81b802a8eb92fd549598432e9dc26" - integrity sha1-jrb0Cxq4G4Aqjrkv1UlZhDLp3CY= dependencies: "@types/react-select" "1.2.6" classnames "2.2.6" diff --git a/settings.gradle b/settings.gradle index e1812401f48..0ae1e82d5ee 100644 --- a/settings.gradle +++ b/settings.gradle @@ -38,6 +38,7 @@ include 'server:sonar-webserver-es' include 'server:sonar-webserver-webapi' include 'server:sonar-webserver-ws' include 'server:sonar-alm-client' +include 'server:sonar-ui-common' include 'sonar-application' include 'sonar-check-api' |