]> source.dussan.org Git - sonarqube.git/blob
70095e0e1a020311b31fffbbfc12a9c61f6c5675
[sonarqube.git] /
1 <%
2    measures=[]
3    (1..10).each do |index|
4      metric=widget_properties["metric#{index}"]
5      m=(metric ? measure(metric) : nil)
6      measures << m if m
7    end
8    period = params[:period]
9    unless measures.empty?
10 %>
11
12   <table class="width100">
13     <tr>
14       <td width="100%">
15         <%
16            measures.each do |measure|
17              if measure.visible?(period.to_i)
18         -%>
19           <div class="dashbox">
20             <p class="title"><%= measure.metric.short_name -%></p>
21             <p>
22               <% if measure.value.nil? -%>
23               <%# This is a differential measure -%>
24               <span class="big"><%= format_measure(measure, :url => url_for_drilldown(measure, :period => period), :period => period) -%></span>
25               <% else -%>
26               <%# This is a classic measure that can have a differential -%>
27               <span class="big"><%= format_measure(measure, :url => url_for_drilldown(measure)) -%></span>
28               <%= dashboard_configuration.selected_period? ? format_variation(measure) : trend_icon(measure) -%>
29               <% end -%>
30             </p>
31           </div>
32         <%
33              end
34            end
35         -%>
36       </td>
37     </tr>
38   </table>
39 <% end %>