From 492302b481202c8cccef23b491c4d25b5648fa2b Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Mon, 25 Apr 2016 15:55:07 +0200 Subject: [PATCH] fix displaying of project with slash in the name on measures page --- .../details/drilldown/ComponentCell.js | 11 +++++++++-- 1 file 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 = ( -   +   {head.length > 0 && ( {head}/ )} -- 2.39.5