]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5209 Improve the message of removed component
authorStas Vilchik <vilchiks@gmail.com>
Mon, 7 Jul 2014 05:55:36 +0000 (11:55 +0600)
committerStas Vilchik <vilchiks@gmail.com>
Mon, 7 Jul 2014 05:55:36 +0000 (11:55 +0600)
sonar-server/src/main/coffee/component-viewer/main.coffee
sonar-server/src/main/hbs/component-viewer/header.hbs
sonar-server/src/main/less/component-viewer.less

index 775aa7b08bb927c2987fba6f1472780106d8f57e..32e4cd8697ce653c181acec4f761f0782b761132 100644 (file)
@@ -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'
index 313d7c3ffde4e08936d7656e78c6ef6c687e0ec4..5f6619ce5b6ddacc0373271e1bae66d08ea0a095 100644 (file)
@@ -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>
 
index 07798e0ad748738e5a88c7083aebcceffadd58c7..da5027d78f5d0d7525b1d061e0f8e2c8de80075b 100644 (file)
 .component-viewer-header-component-project {
   color: #777;
   font-size: @smallFontSize;
-
-  &.removed { text-decoration: line-through; }
 }
 
 .component-viewer-header-component-name {