bump version of Net-Async-Redis
[andk-cpan-tools.git] / CPAN-Blame / root / reports_by_field.tt
blobcb67dc43bee8dbbbe58826748ea4b7e8cc5e246d
1 [% USE CGI %]
2 [% WRAPPER page.tt title = "ct reports resulttable " _ CGI.escapeHTML(distv) %]
3  <h3><a href="solved?distv=[% distv | html %]">&#x21d1;</a> [% distv | html %]
5 [% IF rtables.dist OR rtables.author %]
6  (<a href="http://search.cpan.org/[% IF rtables.author %]~[% rtables.author | html %]/[% distv | html %]/[% ELSE %]search?mode=dist&query=[% rtables.dist | html %][% END %]">search.cpan.org</a>,
7  <a href="https://metacpan.org/release/[% IF rtables.author %][% rtables.author | html %]/[% distv | html %][% ELSE %][% rtables.dist | html %][% END %]">metacpan.org</a>)[% END %]
9 </h3>
10  [% IF rtables.calc %]
11  <p>
12  PASS: [% rtables.calc.calctimepass %]; FAIL: [% rtables.calc.calctimefail %]
13  </p>
14  <p>
15  <form action="reports_by_field" method="get" enctype="application/x-www-form-urlencoded">
16  <input type="submit" name="SUBMIT_xxx" value="Submit"/><br/>
17  <input type="hidden" name="distv" value="[% distv | html %]"/>
18  <select name="field" size="8" multiple="multiple">
19  [% PERL %]
20   %main::fields = map { $_ => 1 } @{$stash->get('fields')};
21   %main::cols_seen = ();
22  [% END %]
23  [% FOREACH stable IN rtables.calc.stables %]
24   [% PERL %]
25   $main::name = $stash->get('stable.name');
26   $main::rsq = $stash->get('stable.rsq');
27   if ($main::rsq > 0.8 or keys %main::cols_seen < 4) {
28     if ($main::fields{$main::name}){
29       print '<option selected="selected">' . $main::name . "</option>";
30     } else {
31       print "<option>$main::name</option>";
32     }
33     $main::cols_seen{$main::name} = 1;
34   }
35   [% END %]
36  [% END %]
37  <option>----below this line sorted alphabetically----</option>
38  [% FOREACH name IN dumped_variables.cols %]
39   [% PERL %]
40   $main::name = $stash->get('name');
41   if ($main::name !~ /^(id|meta:ok)$/){
42     $main::cols_seen{$main::name} = 1;
43     if ($main::fields{$main::name}){
44       print '<option selected="selected">' . $main::name . "</option>";
45     } else {
46       print "<option>$main::name</option>";
47     }
48   }
49   [% END %]
50  [% END %]
51  </select>
52  </form>
53  </p>
54  <p>
55  <table class="texttable" id="reports_by_field_main" style="table-layout: fixed; width: auto; border-collapse: collapse; border: solid black 2px">
56  <thead>
57  <tr>
58  <th class="thgrey" style="border-left: black solid 2px;border-top: black solid 2px; padding: 4px;">id</th>
59  <th class="thgrey" style="border-top: black solid 2px;padding: 4px; min-width: 4em;">state</th>
60  [% FOREACH field IN fields %]
61   [% PERL %]
62   $main::field = $stash->get('field');
63   $main::sorter = $main::field =~ /(?:meta:date|conf:gccversion)/ ? q{data-sorter="text" }
64      : $main::field =~ /meta:perl/ ? q{data-sorter="versions" }
65      : "";
66   $stash->set('sorter',$main::sorter);
67   $main::width = int(0.75 * length($main::field) + 0.5);
68   $stash->set('width',$main::width);
69   [% END %]
70   [% IF field == fields.-1 %]
71  <th class="thgrey" [% sorter %]style="border-top: black solid 2px;border-right: black solid 2px; padding: 4px; min-width: [% width %]em;">[%= field | html %]</th>
72   [% ELSE %]
73  <th class="thgrey" [% sorter %]style="border-top: black solid 2px;padding: 4px; min-width: [% width %]em;">[%= field | html %]</th>
74   [% END %]
75  [% END %]
76   </tr>
77  </thead>
78  <tbody>
79  [% FOREACH report IN dumped_variables.rows %]
80   <tr>
81   [% IF report.id == dumped_variables.rows.-1.id %]
82    <td class="rbfthgrey" style="border-left: black solid 2px; border-bottom: black solid 2px;">
83   [% ELSE %]
84    <td class="rbfthgrey" style="border-left: black solid 2px;">
85   [% END %]
86     [% PERL %]$main::id = $stash->get('report.id'); print sprintf("<!-- %08d -->", $main::id);[% END %]<a href="http://www.cpantesters.org/cpan/report/[%= report.id %]">[%= report.id %]</a>
87    </td>
88    <td class="rbftd">
89   [% IF report.state == "PASS" %]
90    [% SET statecolor = "green" %]
91   [% ELSIF report.state == "FAIL" %]
92    [% SET statecolor = "red" %]
93   [% ELSE %]
94    [% SET statecolor = "brown" %]
95   [% END %]
96     <b style="color: [% statecolor %]">[% report.state %]</b>
97    </td>
98   [% FOREACH result IN report.results %]
99    <td class="rbftd"><code style="background: #ddd;">[% IF result.can("as_html") %][% result.as_html %][% ELSE %][% result | html %][% END %]</code></td>
100   [% END %]
101   </tr>
102  [% END %]
103  </tbody>
104  </table>
105  </p>
106  [% ELSE %]
107  <div style="width: 50%; margin: 2em">
108   There are no data available for [% distv | html %] at this time. The
109   reason may be that you klicked on a link that isn't valid anymore or
110   maybe not valid yet. Please try again later and when things do not
111   improve, file a bugreport.
112  </div>
113  [% END %]
114 [% END %]