2 [% WRAPPER page.tt title = "ct results overview for " _ CGI.escapeHTML(distv) -%]
3 [% SET have_minimum_metadata=0 -%]
4 <h3>[% distv | html -%]
5 [% IF rtables.dist OR rtables.calc.calctime -%]
6 ([% IF rtables.dist %]<a href="http://matrix.cpantesters.org/?dist=[% rtables.dist | html %]%20[% rtables.version | html %]">matrix</a>,
7 <a href="http://search.cpan.org/tools/[% distv | html %]">searchtools</a>[% END -%][% IF rtables.calc.calctime %],
8 <a href="reports_by_field?distv=[% distv | html %]">parsed reports</a>[% END -%],
9 <a href="https://metacpan.org/release/[% IF rtables.author %][% rtables.author | html %]/[% distv | html %][% ELSE %][% rtables.dist | html %][% END %]">metacpan.org</a>)[% END -%]
12 <table style="table-layout: fixed;"><tr><td class="state_and_vote" colspan="2"></td></tr>
13 [% IF rtables.distroid -%]<tr><td><b>Distro-ID:</b></td><td>[% rtables.distroid %]</td></tr>
14 [% ELSIF rtables.author -%]<tr><td><b>Author:</b></td><td>[% rtables.author %]</td></tr>
16 [% IF rtables.annotation OR rtables.rtticket -%]<tr><td><b>Annotation:</b></td><td>
17 [% IF rtables.rtticket -%]
18 [% FOREACH ticket IN rtables.rtticket -%]
20 <a href="[%= ticket.url | html %]">[%= ticket.label | html %]</a>
22 [%= ticket.label | html %]
26 [% rtables.annotation %]
30 [% IF rtables.uploadtime OR rtables.pass OR rtables.fail OR rtables.calc.calctime -%]
31 [% SET have_minimum_metadata=1 -%]
32 [% IF rtables.uploadtime -%]<tr><td><b>Uploaded:</b></td><td>[% rtables.uploadtime %]</td></tr>
34 [% IF rtables.pass OR rtables.fail -%]<tr><td><b>Pass/Fail:</b></td><td class="live_pass_fail_ratio">[% rtables.pass %]/[% rtables.fail %]</td></tr>
36 [% ELSE -%]<tr><td colspan="2">Release not found in analysis database. See <a href="about">about</a>
37 for possible reasons and maybe try again later.</td></tr>
39 [% IF rtables.calc.calctime -%]<tr><td><b>Calculated:</b></td><td>[% rtables.calc.calctime %]</td></tr>
40 <tr><td><b>Pass/Fail at calctime:</b></td><td>[% rtables.calc.calctimepass %]/[% rtables.calc.calctimefail %]</td></tr>
41 [% IF have_minimum_metadata AND rtables.calc.calctime -%]
44 $main::arri = $stash->get('rtables.calc.stables');
45 $main::maxi = @$main::arri;
46 $stash->set('maxi' => $main::maxi);
47 $main::seen_name = +{};
48 $main::seen_rsq = +{};
49 $main::minimum_rsq = undef;
51 [% IF maxi -%]<tr><td valign="top"><b>Top Regressions:</b></td>
53 [% FOREACH table IN rtables.calc.stables -%]
55 $stash->set('i'=>++$main::i);
56 my $name = $main::arri->[$main::i-1]{name};
57 $stash->set(thistablename => $name);
58 $stash->set(thistablenameescaped => $main::arri->[$main::i-1]{escaped_name});
59 $main::foot = $stash->get('table.foot');
60 my($rsq) = $main::foot =~ /R.2=\s*([\d\.]+)/;
61 $stash->set(rsq => $rsq);
62 $main::seen_name->{$name}++;
63 $main::seen_rsq->{$rsq}++;
65 if (keys %$main::seen_name <= 10){
67 $main::minimum_rsq = $rsq;
68 } elsif ($rsq == $main::minimum_rsq) {
71 $stash->set(in_topN => $in_topN);
78 <a href="#[% thistablenameescaped %]" style="text-decoration: none">[% thistablename %]</a>
89 [% IF rtables.highest_version != rtables.version AND rtables.highest_version -%]
90 <div style="margin: 2em"> Note: [% rtables.version %] does not seem
91 to be the currently highest version, maybe try <a
92 href="solved?distv=[% rtables.dist %]-[% rtables.highest_version
93 %]">[% rtables.highest_version %]</a>. </div>
95 [% IF have_minimum_metadata -%]
96 [% IF rtables.calc.calctime -%]
99 $main::arri = $stash->get('rtables.calc.stables');
100 $main::maxi = @$main::arri;
101 $stash->set('maxi' => $main::maxi);
104 <div><table class="texttable" style="table-layout: fixed; border-collapse: collapse; border: solid black 2px">
106 <th class="thgrey" style="border-left: black solid 2px;border-top: black solid 2px; padding: 4px;">R²</th>
107 <th class="thgrey" style="border-top: black solid 2px;border-right: black solid 2px; padding: 4px;">Regression tables</th>
109 [% FOREACH table IN rtables.calc.stables -%]<tr>
110 [% IF table == rtables.calc.stables.-1 -%]
111 <td class="rsqcolumn" style="border-left: black solid 2px; border-bottom: black solid 2px;">
113 <td class="rsqcolumn" style="border-left: black solid 2px;">
117 $stash->set('i'=>++$main::i);
118 $stash->set(nexttablename => $main::arri->[$main::i+0]{escaped_name});
119 $stash->set(prevtablename => $main::arri->[$main::i-2]{escaped_name});
120 $main::foot = $stash->get('table.foot');
121 ($main::rsq) = $main::foot =~ /R.2=\s*([\d\.]+)/;
126 <div style="width: 100%">
127 <div style="text-align: center; line-height: 0.8em">
129 <a href="#[% prevtablename %]" style="text-decoration: none">▲</a>
134 <div style="text-align: center">
136 <a href="#[% nexttablename %]" style="text-decoration: none">▼</a>
142 <div style="padding: 0 0 0.5em 0"><a name="[% table.escaped_name %]"><table class="texttable" style="border-collapse: collapse; border: solid black 2px">
143 <tr style="border-bottom: grey solid 2px;">
144 <th colspan="4" style="padding: 4px">
145 <!-- nbsp>> --> Regression#[% i %] <a href="reports_by_field?distv=[% CGI.escapeHTML(distv) %];field=[% table.escaped_name %]">[% table.name %]</a> <!-- <<nbsp -->
149 <td style="text-align: left; border: black solid 1px; padding: 4px">Name</td>
150 <td style="text-align: right; border: black solid 1px; padding: 4px">Theta</td>
151 <td style="text-align: right; border: black solid 1px; padding: 4px">StdErr</td>
152 <td style="text-align: right; border: black solid 1px; padding: 4px">T-stat</td>
154 [% FOREACH tr IN table.regression -%]
158 [% FOREACH td IN tr -%]
160 if ($main::col == 1 && $main::row >= 2){
161 my $value = $stash->get('td');
162 # 1 => ca/202; 0 => ff/255
163 my $pastell = sprintf "%2x", (1-$main::rsq)*78+159;
166 $color = "#" . $pastell . "ff" . $pastell;
167 } elsif ($value < 0){
168 $color = "#ff" . $pastell . $pastell;
172 print qq{<td style="border: black solid 1px; background: $color; text-align: right; padding: 4px">};
173 } elsif ($main::col >= 1){
174 print '<td style="border: black solid 1px; text-align: right; padding: 4px">';
176 print '<td style="border: black solid 1px; padding: 4px">';
179 [% END -%]<code>[% td | html %]</code>
187 <tr style="border-top: grey solid 2px;"><td colspan="4" style="padding: 4px">[% table.foot %]</td></tr>
188 [% IF table.searchstring -%]<tr><td colspan="4"><a href="http://search.cpan.org/grep?release=[% rtables.dist %]-[% rtables.version | html %];string=[% table.searchstring | html %];n=1;C=0">search/grep</a></td></tr>
190 [% IF table.modstring -%]<tr><td colspan="4"><a href="https://metacpan.org/search?q=[% table.modstring %]">metacpan</a></td></tr>
199 $main::fail = $stash->get('rtables.fail');
200 if ($main::fail > 0){
201 $stash->set('reason' => "the supplied data were not sufficient for some reason");
203 $stash->set('reason' => "there were no fails");
206 <div style="width: 50%; margin: 2em">Regression analysis did not provide results
207 on this sample because [% reason -%]. You can click on the <i>parsed reports</i> link above
208 to get access to descriptive statistics of the data.</div>
211 <div style="width: 50%; margin: 2em">No results of regression testing
212 found in analysis database. Possible reasons may be that the
213 minimum numbers of required tests, passes or fails are not yet
214 reached or were reached fairly recently and the calculations are
215 still in the pipe or newer versions have been uploaded. See also
216 <a href="about">about</a> for what we are doing here and maybe try
221 [% IF rtables.calc.lastcalc OR rtables.thirdpassfail -%]
222 <script type="text/javascript" charset="utf-8">
226 voteurl = "/scheduler/vote/[% distv | html -%]",
227 stateurl = "/scheduler/state/[% distv | html -%]",
228 lastcalc = [% rtables.calc.lastcalc %],
229 lcpass = [% rtables.calc.calctimepass %],
230 lcfail = [% rtables.calc.calctimefail %];
231 function submitVote() {
232 $.ajax({type:'POST', url: voteurl});
233 window.setTimeout("show_state()", 1000);
236 function show_state (){
245 else if ( state.CalcTimestamp && state.CalcTimestamp > lastcalc ) {
246 vstate = "Note: A newer calculation is available, you may want to reload this page";
250 else if ( state.CalcNext === 0 ) {
251 reloadtime = 30*60*1000;
255 else if ( state.CalcNext === 1 ) {
256 vstate = "Note: Another calculation is scheduled"
257 reloadtime = 3*60*1000;
260 else if ( state.CalcNext === 2 ) {
261 vstate = "Note: Another calculation has commenced"
262 reloadtime = 3*60*1000;
265 if ( reporteta === 1 && state.CalcNextETA > 0 ){
266 var towait = 1000*state.CalcNextETA - (new Date()).getTime();
268 if ( towait < 15000 ){
274 if ( towait < reloadtime ) {
278 vstate = vstate + "; result is overdue";
280 towait = Math.round(towait / 1000);
281 vstate = vstate + "; ETA: in " + towait + " seconds";
284 if ( reloadtime > 0 ){
285 window.setTimeout("show_state()",reloadtime);
287 $(".state_and_vote").html("<b style='background: yellow; color: #af0f3f;'>" + vstate + "</b>");
288 if ( state.Pass > 0 || state.Fail > 0 ){
289 $(".live_pass_fail_ratio").html(state.Pass + "/" + state.Fail);
290 if (votingopen > 0 && (state.Pass>lcpass || state.Fail>lcfail)){
291 $(".state_and_vote").append(' <form id="idVote" onsubmit="return submitVote();"><input type="submit" name="submit" value="Schedule a new calculation" /></form>');