From 96422340fb6851c5d5275ac14f34146a3fb2ce5c Mon Sep 17 00:00:00 2001 From: Andrew Dunstan Date: Wed, 30 Nov 2011 13:19:05 -0800 Subject: [PATCH] Add a max_days param, default 10, to failures page. --- cgi-bin/show_failures.pl | 5 ++++- templates/fstatus.tt | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cgi-bin/show_failures.pl b/cgi-bin/show_failures.pl index ba6837b..15b0be5 100755 --- a/cgi-bin/show_failures.pl +++ b/cgi-bin/show_failures.pl @@ -21,6 +21,7 @@ require "$ENV{BFConfDir}/BuildFarmWeb.pl"; 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; @@ -52,6 +53,7 @@ my $statement =<prepare($statement); -$sth->execute; +$sth->execute($max_days); while (my $row = $sth->fetchrow_hashref) { next if (@members && ! grep {$_ eq $row->{sysname} } @members); @@ -100,6 +102,7 @@ print "Content-Type: text/html\n\n"; $template->process('fstatus.tt', {statrows=>$statrows, sortby => $sortby, + max_days => $max_days, members=> \@members} ); exit; diff --git a/templates/fstatus.tt b/templates/fstatus.tt index e88b488..7df7d32 100644 --- a/templates/fstatus.tt +++ b/templates/fstatus.tt @@ -38,7 +38,7 @@ See accompanying License file for license details %]

PostgreSQL BuildFarm Recent Failures

- 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".

Use the farm member link for history of that member -- 2.30.2