]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4799 Hide widget altogether if no measure can be displayed on selected period
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Fri, 21 Feb 2014 09:18:45 +0000 (10:18 +0100)
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Fri, 21 Feb 2014 09:18:45 +0000 (10:18 +0100)
plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/custom_measures.html.erb

index 70095e0e1a020311b31fffbbfc12a9c61f6c5675..f7039b6423e04073b2d15fea4837f689efeaf86a 100644 (file)
@@ -6,7 +6,7 @@
      measures << m if m
    end
    period = params[:period]
-   unless measures.empty?
+   unless measures.empty? || measures.none? {|measure| measure.visible?(period.to_i)}
 %>
 
   <table class="width100">
@@ -36,4 +36,4 @@
       </td>
     </tr>
   </table>
-<% end %>
\ No newline at end of file
+<% end %>