From: Stas Vilchik Date: Thu, 7 Jan 2016 11:26:07 +0000 (+0100) Subject: SONAR-7149 display a full file path in the tooltip when searching X-Git-Tag: 5.4-M4~18 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=31a27608e429bb5962512ef7e3a01b12b49a01f8;p=sonarqube.git SONAR-7149 display a full file path in the tooltip when searching --- 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 4c52269fadc..f8b02d6b87f 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 @@ -23,6 +23,16 @@ import Truncated from './Truncated'; import QualifierIcon from '../../../components/shared/qualifier-icon'; +function getTooltip (component) { + const isFile = component.qualifier === 'FIL' || component.qualifier === 'UTS'; + if (isFile && component.path) { + return component.path; + } else { + return component.name; + } +} + + const Component = ({ component, onBrowse }) => { const handleClick = (e) => { e.preventDefault(); @@ -30,7 +40,7 @@ const Component = ({ component, onBrowse }) => { }; return ( - + {' '} {onBrowse ? (