]> source.dussan.org Git - sonarqube.git/blob
d1a2e6cf99b3099ef0af3a854a7e99aa20b95970
[sonarqube.git] /
1 <%
2   if measure(Metric::LINES) || measure(Metric::NCLOC)
3     public_api=measure('public_api')
4     public_documented_api_density=measure('public_documented_api_density')
5     public_undocumented_api=measure('public_undocumented_api')
6     comment_lines=measure('comment_lines')
7     comment_lines_density=measure('comment_lines_density')
8 %>
9 <table width="100%">
10   <tbody>
11     <tr>
12       <% if public_documented_api_density || public_api || public_undocumented_api %>
13       <td valign="top" width="50%">
14         <div class="dashbox">
15           <p class="title"><%= message('widget.documentation_comments.documentation') -%></p>
16           <p>
17             <%
18             if public_documented_api_density && public_documented_api_density.value>0
19             %>
20             <span class="big"><%= format_measure(public_documented_api_density, :url => url_for_drilldown(Metric::PUBLIC_UNDOCUMENTED_API, :highlight => Metric::PUBLIC_DOCUMENTED_API_DENSITY))%></span><%= message('widget.documentation_comments.docu_api.suffix') %>
21             <%= dashboard_configuration.selected_period? ? format_variation('public_documented_api_density') : trend_icon('public_documented_api_density') -%>
22             <% end %>
23           </p>
24           <p>
25             <%= format_measure(public_api,:url => url_for_drilldown(public_api), :suffix =>  message('widget.documentation_comments.public_api.suffix'))%>
26             <%= dashboard_configuration.selected_period? ? format_variation(public_api) : trend_icon(public_api) -%>
27           </p>
28           <p>
29             <%= format_measure(public_undocumented_api,:url => url_for_drilldown(public_undocumented_api), :suffix => message('widget.documentation_comments.undocu_api.suffix'))%>
30             <%= dashboard_configuration.selected_period? ? format_variation(public_undocumented_api) : trend_icon(public_undocumented_api) -%>
31           </p>
32         </div>
33       </td>
34       <% end %>
35       <td valign="top" width="50%">
36         <div class="dashbox">
37           <p class="title"><%= message('widget.documentation_comments.comments') -%></p>
38           <p>
39             <span class="big">
40               <%= format_measure(comment_lines_density,:url => url_for_drilldown(comment_lines_density))%>
41             </span>
42             <%= dashboard_configuration.selected_period? ? format_variation(comment_lines_density) : trend_icon(comment_lines_density) -%>
43           </p>
44           <p>
45             <%= format_measure(comment_lines,:url => url_for_drilldown(comment_lines), :suffix =>  message('widget.documentation_comments.lines.suffix'))%>
46             <%= dashboard_configuration.selected_period? ? format_variation(comment_lines) : trend_icon(comment_lines) -%>
47           </p>
48         </div>
49       </td>
50     </tr>
51   </tbody>
52 </table>
53 <%
54   end
55 %>