summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2016-04-25 15:55:07 +0200
committerStas Vilchik <vilchiks@gmail.com>2016-04-25 15:57:38 +0200
commit492302b481202c8cccef23b491c4d25b5648fa2b (patch)
treeb9b2a60d73bc59e3bf13c239eeb7f1a5e65fd96c /server
parentcd4bfecd1134d21114fe51ae6a6399bd1afdf13e (diff)
downloadsonarqube-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.js11
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}/>
- &nbsp;
+ &nbsp;
{head.length > 0 && (
<span className="note">{head}/</span>
)}