_module_result.rhtml
1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<h5><%= _('Metric results for: ') + @module_label %> </h5>
<hr/>
<div class="zoomable-image">
<table>
<thead>
<tr>
<th>Metric</th>
<th>Value</th>
<th>Weight</th>
<th>Threshold</th>
</tr>
</thead>
<tbody>
<% @module_result.metric_results.each do |metric_result| %>
<% range = metric_result.range %>
<% if !range.nil? %>
<tr>
<td><a href="#" show-metric-history="<%= MezuroPlugin::Helpers::ContentViewerHelper.format_name(metric_result) %>" data-module-name="<%= @module.name %>"><%= metric_result.metric.name %></a></td>
<td><%= MezuroPlugin::Helpers::ContentViewerHelper.format_grade(metric_result.value) %></td>
<td><%= metric_result.weight %></td>
<td style="background-color: #<%= range.color[2..-1] %>"><%= range.label %></td>
</tr>
<tr class="<%= MezuroPlugin::Helpers::ContentViewerHelper.format_name(metric_result) %>" style="display: none;">
<td colspan="3">
<div id='historical-<%= MezuroPlugin::Helpers::ContentViewerHelper.format_name(metric_result) %>'>
</div>
</td>
<td align="right">
<%= range.comments.nil? ? '' : range.comments %>
</td>
</tr>
<% end %>
<% end %>
</tbody>
<tfoot>
<tr>
<td colspan = "3">
<div id='historical-grade' style="display: none;"></div>
</td>
<td align = "right">
<a href="#" show-grade-history="<%= @module_result.module.name %>" data-module-name="<%= @module.name%>" >
<strong>
<%= _('Grade:') %>
<%= "%.02f" % @module_result.grade %>
</strong>
</a>
</td>
</tr>
</tfoot>
</table>
</div>