From: Stas Vilchik Date: Wed, 3 Feb 2016 15:21:44 +0000 (+0100) Subject: display a real link to project on view projects page X-Git-Tag: 5.4-M12~19 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c0f7db7fe6f32defc0abd81a929cd467f6164754;p=sonarqube.git display a real link to project on view projects page --- diff --git a/server/sonar-web/src/main/js/apps/code/components/ComponentName.js b/server/sonar-web/src/main/js/apps/code/components/ComponentName.js index dde1849ce4b..fff2478cfe3 100644 --- a/server/sonar-web/src/main/js/apps/code/components/ComponentName.js +++ b/server/sonar-web/src/main/js/apps/code/components/ComponentName.js @@ -22,6 +22,7 @@ import React from 'react'; import Truncated from './Truncated'; import QualifierIcon from '../../../components/shared/qualifier-icon'; +import { getComponentUrl } from '../../../helpers/urls'; function getTooltip (component) { @@ -62,23 +63,24 @@ const Component = ({ component, previous, onBrowse }) => { {component.name.substr(prefix.length)} ) : component.name; - const canBrowse = !!onBrowse; + + let inner = null; + + if (component.refKey) { + inner = {name}; + } else { + if (onBrowse) { + inner = {name}; + } else { + inner = {name}; + } + } return ( {' '} - {canBrowse ? ( - - {name} - - ) : ( - - {name} - - )} + {inner} ); };