aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2014-07-07 11:55:36 +0600
committerStas Vilchik <vilchiks@gmail.com>2014-07-07 11:55:36 +0600
commitb10cb73c508662f3f027589f01c4f50b811747ac (patch)
tree0ec51c4ea6ba593ecaacf14c2f6d00ac3b175b85
parentdd0787bbb5d6412f3acf98c68c2a786dc07c3532 (diff)
downloadsonarqube-b10cb73c508662f3f027589f01c4f50b811747ac.tar.gz
sonarqube-b10cb73c508662f3f027589f01c4f50b811747ac.zip
SONAR-5209 Improve the message of removed component
-rw-r--r--sonar-server/src/main/coffee/component-viewer/main.coffee3
-rw-r--r--sonar-server/src/main/hbs/component-viewer/header.hbs2
-rw-r--r--sonar-server/src/main/less/component-viewer.less2
3 files changed, 3 insertions, 4 deletions
diff --git a/sonar-server/src/main/coffee/component-viewer/main.coffee b/sonar-server/src/main/coffee/component-viewer/main.coffee
index 775aa7b08bb..32e4cd8697c 100644
--- a/sonar-server/src/main/coffee/component-viewer/main.coffee
+++ b/sonar-server/src/main/coffee/component-viewer/main.coffee
@@ -245,9 +245,10 @@ define [
if @settings.get('duplications') then @showDuplications() else @hideDuplications()
if @settings.get('scm') then @showSCM() else @hideSCM()
@trigger 'loaded'
- .fail =>
+ .fail (r) =>
if component.status == 404
@state.set 'removed', true
+ @state.set 'removedMessage', _.pluck(r.responseJSON.errors, 'msg').join '. '
@state.set 'hasSource', false
@render()
@trigger 'loaded'
diff --git a/sonar-server/src/main/hbs/component-viewer/header.hbs b/sonar-server/src/main/hbs/component-viewer/header.hbs
index 313d7c3ffde..5f6619ce5b6 100644
--- a/sonar-server/src/main/hbs/component-viewer/header.hbs
+++ b/sonar-server/src/main/hbs/component-viewer/header.hbs
@@ -22,7 +22,7 @@
{{/if}}
</div>
{{else}}
- <div class="component-viewer-header-component-project removed">{{t 'issue.component_deleted'}}</div>
+ <div class="component-viewer-header-component-project removed">{{state.removedMessage}}</div>
{{/unless}}
</div>
diff --git a/sonar-server/src/main/less/component-viewer.less b/sonar-server/src/main/less/component-viewer.less
index 07798e0ad74..da5027d78f5 100644
--- a/sonar-server/src/main/less/component-viewer.less
+++ b/sonar-server/src/main/less/component-viewer.less
@@ -335,8 +335,6 @@
.component-viewer-header-component-project {
color: #777;
font-size: @smallFontSize;
-
- &.removed { text-decoration: line-through; }
}
.component-viewer-header-component-name {