<commit_before><% the_module = module_result.module %>
<% module_label = "#{the_module.name} (#{the_module.granularity})" %>

<h5><%= _('Metric results for: ') + module_label %> </h5>

<hr/>

<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="#" data-show=".<%= metric_result.metric.name.delete("() ")%>"><%= 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="<%= metric_result.metric.name.delete("() ")%>" style="display: none;">
          <td colspan="4">
		    <div id='historical-<%= metric_result.metric.name.delete("() ") %>'>
            <a href="#" show-metric-history="<%= metric_result.metric.name.delete("() ") %>" data-module-name="<%= the_module.name %>" data-metric-name="<%= metric_result.metric.name.delete("() ") %>"> <p style="text-indent: 3em;"> Draw Historical Graphic </p> </a>
		    </div>
          </td>
          <td colspan="3" align="right">
            <%= range.comments.nil? ? '' : range.comments %>
          </td> 
        </tr>
	  <% end %>
    <% end %>
  </tbody>
  <tfoot>
    <tr>
      <td colspan = "4" align = "right">
        <strong><commit_msg>[Mezuro] Refactoring partial module result<commit_after><% the_module = module_result.module %>
<% module_label = "#{the_module.name} (#{the_module.granularity})" %>

<h5><%= _('Metric results for: ') + module_label %> </h5>

<hr/>

<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="#" data-show=".<%= metric_result.metric.name.delete("() ")%>"><%= 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="<%= metric_result.metric.name.delete("() ")%>" style="display: none;">
          <td colspan="4">
		    <div id='historical-<%= metric_result.metric.name.delete("() ") %>'>
            <a href="#" show-metric-history="<%= metric_result.metric.name.delete("() ") %>" data-module-name="<%= the_module.name %>" data-metric-name="<%= metric_result.metric.name.delete("() ") %>"> <p style="text-indent: 3em;"> Get Historical Values </p> </a>
		    </div>
          </td>
          <td colspan="3" align="right">
            <%= range.comments.nil? ? '' : range.comments %>
          </td> 
        </tr>
	  <% end %>
    <% end %>
  </tbody>
  <tfoot>
    <tr>
      <td colspan = "4" align = "right">
        <strong>
{'fraction_non_alphanumeric': 0.2327295056800737, 'fraction_numerical': 0.004912496162112374, 'mean_word_length': 2.6980703745743475, 'pattern_counts': {'":': 0, '<': 135, '<?xml version=': 0, '>': 135, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4737024', 'n_tokens_mistral': 1218, 'n_tokens_neox': 1125, 'n_words': 193}