]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5209 Display issues when the code is not available
authorStas Vilchik <vilchiks@gmail.com>
Tue, 1 Jul 2014 06:15:18 +0000 (12:15 +0600)
committerStas Vilchik <vilchiks@gmail.com>
Tue, 1 Jul 2014 06:15:18 +0000 (12:15 +0600)
sonar-server/src/main/coffee/component-viewer/source.coffee
sonar-server/src/main/hbs/component-viewer/header/issues-header.hbs

index b13c89ecf567822b84ebffb995fcb257a21948a9..12392598ee8809965305ce99a21c8cbdb670c6bd 100644 (file)
@@ -273,6 +273,7 @@ define [
 
     showZeroLine: ->
       r = false
+      r = true unless @options.main.state.get 'hasSource'
       @showBlocks.forEach (block) ->
         r = true if block.from <= 0
       r
index 6e3eed85398627143d2a4ef7cddbf7250bdd2e32..c1547366f67a066a14669dd91c8cb2ebfb0e9140 100644 (file)
@@ -13,7 +13,7 @@
     </div>
     <ul class="component-viewer-header-expanded-bar-section-list">
       {{#each state.severities}}
-        {{#if ../../state.hasSource}}
+        {{#unless ../../state.removed}}
           <li><a class="item js-filter-{{key}}-issues">
             <span>{{severityIcon key}} {{name}}</span>
             <span class="number">{{count}}</span>
@@ -24,7 +24,7 @@
             <span>{{severityIcon key}} {{name}}</span>
             <span class="number">{{count}}</span>
           </span></li>
-        {{/if}}
+        {{/unless}}
       {{/each}}
     </ul>
   </div>
@@ -37,7 +37,7 @@
     </div>
     <ul class="component-viewer-header-expanded-bar-section-list">
       {{#each state.rules}}
-        {{#if ../../state.hasSource}}
+        {{#unless ../../state.removed}}
           <li><a class="item js-filter-rule" data-rule="{{key}}" title="{{name}}">
             <span>{{name}}</span>
             <span class="number">{{count}}</span>
@@ -48,7 +48,7 @@
             <span>{{name}}</span>
             <span class="number">{{count}}</span>
           </span></li>
-        {{/if}}
+        {{/unless}}
       {{/each}}
     </ul>
   </div>
         <i class="icon-chevron-right"></i>
       </a></li>
     {{/if}}
-    {{#if state.hasSource}}
+    {{#unless state.removed}}
       <li><a class="item js-filter-unresolved-issues">
         <span>{{t 'component_viewer.issues.unresolved_issues'}}</span>
         <i class="icon-chevron-right"></i>
       </a></li>
-    {{/if}}
-    {{#if state.hasSource}}
+    {{/unless}}
+    {{#unless state.removed}}
       <li><a class="item js-filter-fixed-issues">
         <span>{{t 'component_viewer.issues.fixed_issues'}}</span>
         <i class="icon-chevron-right"></i>
       </a></li>
-    {{/if}}
-    {{#if state.hasSource}}
+    {{/unless}}
+    {{#unless state.removed}}
       <li><a class="item js-filter-false-positive-issues">
         <span>{{t 'component_viewer.issues.false_positive_issues'}}</span>
         <span class="number">{{component.measures.false_positive_issues}}</span>
@@ -90,7 +90,7 @@
           <span class="number">{{component.measures.false_positive_issues}}</span>
         </span></li>
       {{/if}}
-    {{/if}}
+    {{/unless}}
   </ul>
 </div>