my $query = new CGI;
my @members = $query->param('member');
map { s/[^a-zA-Z0-9_ -]//g; } @members;
+my $max_days = $query->param('max_days') + 0 || 10;
my $dsn="dbi:Pg:dbname=$dbname";
$dsn .= ";host=$dbhost" if $dbhost;
from nrecent_failures_db_data b
left join dashboard_mat d
on (d.sysname = b.sysname and d.branch = b.branch)
+ where (now()::timestamp(0) without time zone - b.snapshot) < (? * interval '1 day')
order by $presort_clause
b.branch = 'HEAD' desc,
b.branch desc,
my $statrows=[];
my $sth=$db->prepare($statement);
-$sth->execute;
+$sth->execute($max_days);
while (my $row = $sth->fetchrow_hashref)
{
next if (@members && ! grep {$_ eq $row->{sysname} } @members);
$template->process('fstatus.tt',
{statrows=>$statrows,
sortby => $sortby,
+ max_days => $max_days,
members=> \@members} );
exit;
%]
<h1>PostgreSQL BuildFarm Recent Failures</h1>
<p>
- Shown here are build failures that occurred in the last 90 days.
+ Shown here are build failures that occurred in the last [% max_days %] days. For a longer (or shorter) time span, up to 90 days, add a query parameter of "max_days=nn".
</p>
<p>
Use the farm member link for history of that member