diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2014-07-22 18:50:35 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2014-07-22 18:51:04 +0200 |
commit | a156268839a1fc58ff068b2a75ebe1e0f890e061 (patch) | |
tree | cdd0d9624c63db32d312b6d70c9320ee7f0c3b24 /server/sonar-web | |
parent | ef2dde587eed546430143ecdf1c6cccd0fda35d9 (diff) | |
download | sonarqube-a156268839a1fc58ff068b2a75ebe1e0f890e061.tar.gz sonarqube-a156268839a1fc58ff068b2a75ebe1e0f890e061.zip |
SONAR-5468 Improve rendering of cross-module and cross-project duplications
Diffstat (limited to 'server/sonar-web')
3 files changed, 16 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/coffee/component-viewer/duplication-popup.coffee b/server/sonar-web/src/main/coffee/component-viewer/duplication-popup.coffee index 8cec94774c6..22fd44593f5 100644 --- a/server/sonar-web/src/main/coffee/component-viewer/duplication-popup.coffee +++ b/server/sonar-web/src/main/coffee/component-viewer/duplication-popup.coffee @@ -50,8 +50,9 @@ define [ file: files[fileRef] duplications = _.sortBy duplications, (d) => a = d.file.projectName != @options.main.component.get 'projectName' - b = d.file.key != @options.main.component.get 'key' - '' + a + b + b = d.file.subProjectName != @options.main.component.get 'subProjectName' + c = d.file.key != @options.main.component.get 'key' + '' + a + b + c component: @options.main.component.toJSON() duplications: duplications diff --git a/server/sonar-web/src/main/hbs/component-viewer/cw-duplication-popup.hbs b/server/sonar-web/src/main/hbs/component-viewer/cw-duplication-popup.hbs index cc1d8a74fd2..8113d3571cc 100644 --- a/server/sonar-web/src/main/hbs/component-viewer/cw-duplication-popup.hbs +++ b/server/sonar-web/src/main/hbs/component-viewer/cw-duplication-popup.hbs @@ -2,9 +2,19 @@ <div class="bubble-popup-title">{{t 'component_viewer.transition.duplication'}}</div> {{#each duplications}} <div class="bubble-popup-section"> - {{#notEq file.projectName ../component.projectName}} - <span class="component-viewer-popup-label">{{file.projectName}}</span> + {{#notEq file.project ../component.project}} + <div class="component-viewer-popup-label"> + {{file.projectName}} + {{#if file.subProjectName}} + / {{file.subProjectName}} + {{/if}} + </div> + {{else}} + {{#notEq file.subProject ../../component.subProject}} + <div class="component-viewer-popup-label">{{file.projectName}} / {{file.subProjectName}}</div> + {{/notEq}} {{/notEq}} + {{#notEq file.key ../component.key}} <a class="link-action" data-key="{{file.key}}" title="{{file.name}}"> {{file.name}} diff --git a/server/sonar-web/src/main/less/component-viewer.less b/server/sonar-web/src/main/less/component-viewer.less index 8dfd5113cf3..4cf897b9656 100644 --- a/server/sonar-web/src/main/less/component-viewer.less +++ b/server/sonar-web/src/main/less/component-viewer.less @@ -629,6 +629,7 @@ .component-viewer-popup-duplications { padding: 4px 0; + white-space: normal; } .component-viewer-popup-label { |