templates/group/_stats.html.ep
author Vincent Tondellier <tonton+hg@team1664.org>
Sun, 14 Feb 2016 20:24:11 +0100
changeset 97 f68abe1d7358
parent 88 c82f5589db11
permissions -rw-r--r--
Fix race condition in CrashGroup::find_or_create by using constraint and upsert (for pg > 9.5) or table lock

<a data-toggle="collapse" href="#stats-by-product-and-version"><h3>Crashs by product and version</h3></a>
<div id="stats-by-product-and-version" class="collapse in">
%= t table => (class => 'table table-striped table-hover table-bordered table-condensed') => begin
<thead>
  <tr>
    <th>Product</th>
    <th>Version</th>
    <th>Count</th>
  </tr>
</thead>
<tbody>
% my $max;
% foreach my $stat(@{$stats_by_product_and_version}) {
  % $max = $stat->{crash_count} unless defined($max);
  %= t tr => begin
    %= t td => $stat->{product_name}
    %= t td => $stat->{version}
    %= t td => begin
      %= stats_bar($stat->{crash_count}, $max)
    % end
  % end
% }
</tbody>
% end
</div>