]> source.dussan.org Git - sonarqube.git/blob
7757aa180757cf49438fa51b0406a3a575913e55
[sonarqube.git] /
1 <%
2 lcom=measure('lcom4')
3 rfc=measure('rfc')
4 if lcom || rfc
5   lcom_distribution=measure('lcom4_distribution')
6   rfc_distribution=measure('rfc_distribution')
7   suspect_lcom4_density=measure('suspect_lcom4_density')
8   %>
9 <table width="100%">
10   <tbody>
11     <tr>
12       <% if lcom %>
13       <td width="50%" valign="top">
14         <div class="dashbox">
15           <h3><%= message('widget.ckjm.lcom4') -%></h3>
16           <p>
17             <span class="big"><%= format_measure(lcom, :suffix => '', :default => '-', :url => url_for_drilldown('lcom4')) -%></span><%= message('widget.ckjm.per_class.suffix') -%> <%= dashboard_configuration.selected_period? ? format_variation(lcom) : trend_icon(lcom, :big => true) -%>
18           </p>
19           <p>
20             <%= format_measure(suspect_lcom4_density, :suffix => message('widget.ckjm.files_having_lcom_greater_than_one'), :url => url_for_drilldown('lcom4')) %> <%= dashboard_configuration.selected_period? ? format_variation(suspect_lcom4_density) : trend_icon(suspect_lcom4_density) -%>
21           </p>
22         </div>
23       </td>
24       <% end %>
25       <% if rfc %>
26       <td width="50%" valign="top">
27         <div class="dashbox">
28           <h3><%= message('widget.ckjm.rfc') -%></h3>
29           <p><span class="big">
30             <%= format_measure(rfc, :suffix => '', :default => '-', :url => url_for_drilldown('rfc')) -%></span><%= message('widget.ckjm.per_class.suffix') -%> <%= dashboard_configuration.selected_period? ? format_variation(rfc) : trend_icon(rfc, :big => true) -%>
31           </p>
32         </div>
33       </td>
34       <% end %>
35     </tr>
36     <tr>
37       <td>
38         <%
39         if suspect_lcom4_density && suspect_lcom4_density.value>1.0 && lcom_distribution && !lcom_distribution.data.blank?
40           query="ck=distbar&c=777777&w=180&h=100&fs=8&bgc=ffffff&v=" + u(lcom_distribution.data)
41         %>
42           <a href="<%= url_for_drilldown('lcom4') -%>"><%= chart(query, :id => 'lcom4_distribution', :alt => '') -%></a>
43         <% end %>
44       </td>
45       <td>
46          <%
47          if rfc_distribution && !rfc_distribution.data.blank?
48            query="ck=distbar&c=777777&w=180&h=100&fs=8&bgc=ffffff&v=" + u(rfc_distribution.data)
49          %>
50            <a href="<%= url_for_drilldown('rfc') -%>"><%= chart(query, :id => 'rfc_distribution', :alt => '') -%></a>
51          <% end %>
52       </td>
53     </tr>
54   </tbody>
55 </table>
56 <% end %>