From 9de2e9c91932c61a8575f30d7bc7319624a7d91f Mon Sep 17 00:00:00 2001 From: Grégoire Aubert Date: Tue, 23 May 2017 14:50:03 +0200 Subject: Move issues type icons to the icons-components folder --- .../js/apps/about/components/AboutQualityModel.js | 6 ++-- .../js/apps/about/components/EntryIssueTypes.js | 6 ++-- .../apps/overview/main/BugsAndVulnerabilities.js | 4 +-- .../src/main/js/apps/overview/main/CodeSmells.js | 2 +- .../projects/components/ProjectCardLeakMeasures.js | 6 ++-- .../main/js/components/icons-components/BugIcon.js | 40 ++++++++++++++++++++++ .../components/icons-components/CodeSmellIcon.js | 40 ++++++++++++++++++++++ .../icons-components/VulnerabilityIcon.js | 40 ++++++++++++++++++++++ .../sonar-web/src/main/js/components/ui/BugIcon.js | 38 -------------------- .../src/main/js/components/ui/CodeSmellIcon.js | 38 -------------------- .../src/main/js/components/ui/IssueTypeIcon.js | 6 ++-- .../src/main/js/components/ui/VulnerabilityIcon.js | 38 -------------------- 12 files changed, 135 insertions(+), 129 deletions(-) create mode 100644 server/sonar-web/src/main/js/components/icons-components/BugIcon.js create mode 100644 server/sonar-web/src/main/js/components/icons-components/CodeSmellIcon.js create mode 100644 server/sonar-web/src/main/js/components/icons-components/VulnerabilityIcon.js delete mode 100644 server/sonar-web/src/main/js/components/ui/BugIcon.js delete mode 100644 server/sonar-web/src/main/js/components/ui/CodeSmellIcon.js delete mode 100644 server/sonar-web/src/main/js/components/ui/VulnerabilityIcon.js diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutQualityModel.js b/server/sonar-web/src/main/js/apps/about/components/AboutQualityModel.js index 9e50b5e6a7d..503ef74807f 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutQualityModel.js +++ b/server/sonar-web/src/main/js/apps/about/components/AboutQualityModel.js @@ -19,9 +19,9 @@ */ import React from 'react'; import { translate } from '../../../helpers/l10n'; -import BugIcon from '../../../components/ui/BugIcon'; -import VulnerabilityIcon from '../../../components/ui/VulnerabilityIcon'; -import CodeSmellIcon from '../../../components/ui/CodeSmellIcon'; +import BugIcon from '../../../components/icons-components/BugIcon'; +import VulnerabilityIcon from '../../../components/icons-components/VulnerabilityIcon'; +import CodeSmellIcon from '../../../components/icons-components/CodeSmellIcon'; export default function AboutQualityModel() { return ( diff --git a/server/sonar-web/src/main/js/apps/about/components/EntryIssueTypes.js b/server/sonar-web/src/main/js/apps/about/components/EntryIssueTypes.js index 58bf0b7987c..eac9de1a53b 100644 --- a/server/sonar-web/src/main/js/apps/about/components/EntryIssueTypes.js +++ b/server/sonar-web/src/main/js/apps/about/components/EntryIssueTypes.js @@ -23,9 +23,9 @@ import { Link } from 'react-router'; import { formatMeasure } from '../../../helpers/measures'; import { translate } from '../../../helpers/l10n'; import { getIssuesUrl } from '../../../helpers/urls'; -import BugIcon from '../../../components/ui/BugIcon'; -import VulnerabilityIcon from '../../../components/ui/VulnerabilityIcon'; -import CodeSmellIcon from '../../../components/ui/CodeSmellIcon'; +import BugIcon from '../../../components/icons-components/BugIcon'; +import VulnerabilityIcon from '../../../components/icons-components/VulnerabilityIcon'; +import CodeSmellIcon from '../../../components/icons-components/CodeSmellIcon'; type Props = { bugs: ?number, diff --git a/server/sonar-web/src/main/js/apps/overview/main/BugsAndVulnerabilities.js b/server/sonar-web/src/main/js/apps/overview/main/BugsAndVulnerabilities.js index b0fa2c9ee06..db8f370c60f 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/BugsAndVulnerabilities.js +++ b/server/sonar-web/src/main/js/apps/overview/main/BugsAndVulnerabilities.js @@ -23,8 +23,8 @@ import enhance from './enhance'; import LeakPeriodLegend from '../components/LeakPeriodLegend'; import { getMetricName } from '../helpers/metrics'; import { translate } from '../../../helpers/l10n'; -import BugIcon from '../../../components/ui/BugIcon'; -import VulnerabilityIcon from '../../../components/ui/VulnerabilityIcon'; +import BugIcon from '../../../components/icons-components/BugIcon'; +import VulnerabilityIcon from '../../../components/icons-components/VulnerabilityIcon'; class BugsAndVulnerabilities extends React.PureComponent { renderHeader() { diff --git a/server/sonar-web/src/main/js/apps/overview/main/CodeSmells.js b/server/sonar-web/src/main/js/apps/overview/main/CodeSmells.js index ee496595efd..44ef34fa0a4 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/CodeSmells.js +++ b/server/sonar-web/src/main/js/apps/overview/main/CodeSmells.js @@ -25,7 +25,7 @@ import { getMetricName } from '../helpers/metrics'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { formatMeasure, isDiffMetric } from '../../../helpers/measures'; import { getComponentIssuesUrl } from '../../../helpers/urls'; -import CodeSmellIcon from '../../../components/ui/CodeSmellIcon'; +import CodeSmellIcon from '../../../components/icons-components/CodeSmellIcon'; class CodeSmells extends React.PureComponent { renderHeader() { diff --git a/server/sonar-web/src/main/js/apps/projects/components/ProjectCardLeakMeasures.js b/server/sonar-web/src/main/js/apps/projects/components/ProjectCardLeakMeasures.js index b42ea3bdd13..e55404cfe42 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/ProjectCardLeakMeasures.js +++ b/server/sonar-web/src/main/js/apps/projects/components/ProjectCardLeakMeasures.js @@ -20,10 +20,10 @@ //@flow import React from 'react'; import Measure from '../../component-measures/components/Measure'; -import BugIcon from '../../../components/ui/BugIcon'; -import CodeSmellIcon from '../../../components/ui/CodeSmellIcon'; +import BugIcon from '../../../components/icons-components/BugIcon'; +import CodeSmellIcon from '../../../components/icons-components/CodeSmellIcon'; import Rating from '../../../components/ui/Rating'; -import VulnerabilityIcon from '../../../components/ui/VulnerabilityIcon'; +import VulnerabilityIcon from '../../../components/icons-components/VulnerabilityIcon'; import { translate } from '../../../helpers/l10n'; type Props = { diff --git a/server/sonar-web/src/main/js/components/icons-components/BugIcon.js b/server/sonar-web/src/main/js/components/icons-components/BugIcon.js new file mode 100644 index 00000000000..dc1d5c7f90b --- /dev/null +++ b/server/sonar-web/src/main/js/components/icons-components/BugIcon.js @@ -0,0 +1,40 @@ +/* + * SonarQube + * Copyright (C) 2009-2017 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +// @flow +import React from 'react'; + +type Props = { className?: string, size?: number }; + +export default function BugIcon({ className, size = 16 }: Props) { + /* eslint-disable max-len */ + return ( + + + + ); +} diff --git a/server/sonar-web/src/main/js/components/icons-components/CodeSmellIcon.js b/server/sonar-web/src/main/js/components/icons-components/CodeSmellIcon.js new file mode 100644 index 00000000000..640a14ca39c --- /dev/null +++ b/server/sonar-web/src/main/js/components/icons-components/CodeSmellIcon.js @@ -0,0 +1,40 @@ +/* + * SonarQube + * Copyright (C) 2009-2017 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +// @flow +import React from 'react'; + +type Props = { className?: string, size?: number }; + +export default function CodeSmellIcon({ className, size = 16 }: Props) { + /* eslint-disable max-len */ + return ( + + + + ); +} diff --git a/server/sonar-web/src/main/js/components/icons-components/VulnerabilityIcon.js b/server/sonar-web/src/main/js/components/icons-components/VulnerabilityIcon.js new file mode 100644 index 00000000000..154378c6fa2 --- /dev/null +++ b/server/sonar-web/src/main/js/components/icons-components/VulnerabilityIcon.js @@ -0,0 +1,40 @@ +/* + * SonarQube + * Copyright (C) 2009-2017 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +// @flow +import React from 'react'; + +type Props = { className?: string, size?: number }; + +export default function VulnerabilityIcon({ className, size = 16 }: Props) { + /* eslint-disable max-len */ + return ( + + + + ); +} diff --git a/server/sonar-web/src/main/js/components/ui/BugIcon.js b/server/sonar-web/src/main/js/components/ui/BugIcon.js deleted file mode 100644 index 5c794e2e080..00000000000 --- a/server/sonar-web/src/main/js/components/ui/BugIcon.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2017 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -// @flow -import React from 'react'; - -export default function BugIcon({ className }: { className?: string }) { - /* eslint-disable max-len */ - return ( - - - - ); -} diff --git a/server/sonar-web/src/main/js/components/ui/CodeSmellIcon.js b/server/sonar-web/src/main/js/components/ui/CodeSmellIcon.js deleted file mode 100644 index 5a788b1066c..00000000000 --- a/server/sonar-web/src/main/js/components/ui/CodeSmellIcon.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2017 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -// @flow -import React from 'react'; - -export default function CodeSmellIcon({ className }: { className?: string }) { - /* eslint-disable max-len */ - return ( - - - - ); -} diff --git a/server/sonar-web/src/main/js/components/ui/IssueTypeIcon.js b/server/sonar-web/src/main/js/components/ui/IssueTypeIcon.js index 32365063111..cdd7295598f 100644 --- a/server/sonar-web/src/main/js/components/ui/IssueTypeIcon.js +++ b/server/sonar-web/src/main/js/components/ui/IssueTypeIcon.js @@ -19,9 +19,9 @@ */ // @flow import React from 'react'; -import BugIcon from './BugIcon'; -import VulnerabilityIcon from './VulnerabilityIcon'; -import CodeSmellIcon from './CodeSmellIcon'; +import BugIcon from '../icons-components/BugIcon'; +import VulnerabilityIcon from '../icons-components/VulnerabilityIcon'; +import CodeSmellIcon from '../icons-components/CodeSmellIcon'; export default class IssueTypeIcon extends React.PureComponent { props: { diff --git a/server/sonar-web/src/main/js/components/ui/VulnerabilityIcon.js b/server/sonar-web/src/main/js/components/ui/VulnerabilityIcon.js deleted file mode 100644 index 248eae3d844..00000000000 --- a/server/sonar-web/src/main/js/components/ui/VulnerabilityIcon.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2017 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -// @flow -import React from 'react'; - -export default function VulnerabilityIcon({ className }: { className?: string }) { - /* eslint-disable max-len */ - return ( - - - - ); -} -- cgit v1.2.3