aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2017-01-30 11:22:57 +0100
committerStas Vilchik <stas-vilchik@users.noreply.github.com>2017-01-30 16:11:06 +0100
commit6f5b13b403186e86c051827a945ab2aaa1592bae (patch)
treebdee67dc410a03c3c3d11612495826139e673d63
parent6f511860c20e1ab6e8e1cdfe6e00f50b1043258a (diff)
downloadsonarqube-6f5b13b403186e86c051827a945ab2aaa1592bae.tar.gz
sonarqube-6f5b13b403186e86c051827a945ab2aaa1592bae.zip
SONAR-8713 change bug tracker icon
-rw-r--r--server/sonar-web/src/main/js/apps/overview/meta/MetaLink.js5
-rw-r--r--server/sonar-web/src/main/js/apps/project-admin/links/LinkRow.js9
-rw-r--r--server/sonar-web/src/main/js/components/ui/BugTrackerIcon.js34
3 files changed, 48 insertions, 0 deletions
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 <BugTrackerIcon/>;
+ }
+
return isProvided(link) ?
<i className={`icon-color-link icon-${link.type}`}/> :
<i className="icon-color-link icon-detach"/>;
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 (
+ <div className="display-inline-block text-top spacer-right">
+ <BugTrackerIcon/>
+ </div>
+ );
+ }
+
return (
<div className="display-inline-block text-top spacer-right">
<i className={iconClassName}/>
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 (
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14" width="14" height="14">
+ <g transform="matrix(1,0,0,1,0,1)">
+ <path style={{ fill: 'none', stroke: 'currentColor', strokeWidth: 2, strokeLinecap: 'round', strokeMiterlimit: '10' }} d="M12 9h-2L8 5 6.5 9.5l-2-6L3 9H1"/>
+ </g>
+ </svg>
+ );
+ }
+}