diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2016-04-25 15:55:07 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2016-04-25 15:57:38 +0200 |
commit | 492302b481202c8cccef23b491c4d25b5648fa2b (patch) | |
tree | b9b2a60d73bc59e3bf13c239eeb7f1a5e65fd96c /server | |
parent | cd4bfecd1134d21114fe51ae6a6399bd1afdf13e (diff) | |
download | sonarqube-492302b481202c8cccef23b491c4d25b5648fa2b.tar.gz sonarqube-492302b481202c8cccef23b491c4d25b5648fa2b.zip |
fix displaying of project with slash in the name on measures page
Diffstat (limited to 'server')
-rw-r--r-- | server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ComponentCell.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ComponentCell.js b/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ComponentCell.js index 2455a5a4601..1fc9ecab2c2 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ComponentCell.js +++ b/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ComponentCell.js @@ -39,12 +39,19 @@ const ComponentCell = ({ component, isSelected, onClick }) => { } }; - const { head, tail } = splitPath(component.path || component.name); + let head = ''; + let tail = component.path || component.name; + + if (['DIR', 'FIL', 'CLA'].includes(component.qualifier)) { + const parts = splitPath(tail); + head = parts.head; + tail = parts.tail; + } const inner = ( <span title={component.refKey || component.key}> <QualifierIcon qualifier={component.qualifier}/> - + {head.length > 0 && ( <span className="note">{head}/</span> )} |