From 6f5b13b403186e86c051827a945ab2aaa1592bae Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Mon, 30 Jan 2017 11:22:57 +0100 Subject: [PATCH] SONAR-8713 change bug tracker icon --- .../main/js/apps/overview/meta/MetaLink.js | 5 +++ .../js/apps/project-admin/links/LinkRow.js | 9 +++++ .../main/js/components/ui/BugTrackerIcon.js | 34 +++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 server/sonar-web/src/main/js/components/ui/BugTrackerIcon.js diff --git a/server/sonar-web/src/main/js/apps/overview/meta/MetaLink.js b/server/sonar-web/src/main/js/apps/overview/meta/MetaLink.js index e7786e539dd..c726bfd6ca0 100644 --- a/server/sonar-web/src/main/js/apps/overview/meta/MetaLink.js +++ b/server/sonar-web/src/main/js/apps/overview/meta/MetaLink.js @@ -20,6 +20,7 @@ // @flow import React from 'react'; import { isProvided, isClickable } from '../../project-admin/links/utils'; +import BugTrackerIcon from '../../../components/ui/BugTrackerIcon'; type Link = { id: string, @@ -48,6 +49,10 @@ export default class MetaLink extends React.Component { }; renderLinkIcon (link: Link) { + if (link.type === 'issue') { + return ; + } + return isProvided(link) ? : ; diff --git a/server/sonar-web/src/main/js/apps/project-admin/links/LinkRow.js b/server/sonar-web/src/main/js/apps/project-admin/links/LinkRow.js index e55651dce89..74cc19788ff 100644 --- a/server/sonar-web/src/main/js/apps/project-admin/links/LinkRow.js +++ b/server/sonar-web/src/main/js/apps/project-admin/links/LinkRow.js @@ -21,6 +21,7 @@ import React from 'react'; import shallowCompare from 'react-addons-shallow-compare'; import { isProvided, isClickable } from './utils'; import { translate } from '../../../helpers/l10n'; +import BugTrackerIcon from '../../../components/ui/BugTrackerIcon'; export default class LinkRow extends React.Component { static propTypes = { @@ -39,6 +40,14 @@ export default class LinkRow extends React.Component { } renderIcon (iconClassName) { + if (iconClassName === 'icon-issue') { + return ( +
+ +
+ ); + } + return (
diff --git a/server/sonar-web/src/main/js/components/ui/BugTrackerIcon.js b/server/sonar-web/src/main/js/components/ui/BugTrackerIcon.js new file mode 100644 index 00000000000..32af21905a5 --- /dev/null +++ b/server/sonar-web/src/main/js/components/ui/BugTrackerIcon.js @@ -0,0 +1,34 @@ +/* + * SonarQube + * Copyright (C) 2009-2016 SonarSource SA + * mailto:contact 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 class BugTrackerIcon extends React.Component { + render () { + /* eslint-disable max-len */ + return ( + + + + + + ); + } +} -- 2.39.5