#!/usr/bin/perl use strict; use CGI; use DBI; use Template; use vars qw($dbhost $dbname $dbuser $dbpass $dbport $sort_by); require "$ENV{BFConfDir}/BuildFarmWeb.pl"; #require "BuildFarmWeb.pl"; my $query = new CGI; my %sort_ok = ('name' => 'lower(name)' , 'owner' => 'lower(owner_email)', 'os' => 'lower(operating_system), os_version', 'compiler' => 'lower(compiler), compiler_version' , 'arch' => 'lower(architecture)' ); $sort_by = $query->param('sort_by');$sort_by =~ s/[^a-zA-Z0-9_ -]//g; $sort_by = $sort_ok{$sort_by} || $sort_ok{name}; my $dsn="dbi:Pg:dbname=$dbname"; $dsn .= ";host=$dbhost" if $dbhost; $dsn .= ";port=$dbport" if $dbport; my $db = DBI->connect($dsn,$dbuser,$dbpass); # there is possibly some redundancy in this query, but it makes # a lot of the processing simpler. my $statement = < 'HEAD', branch) branch || ':' || extract(days from now() - snapshot) from build_status where name = sysname order by branch <> 'HEAD', branch desc, snapshot desc ) as branches from buildsystems where status = 'approved' order by $sort_by EOS ; my $statrows=[]; my $sth=$db->prepare($statement); $sth->execute; while (my $row = $sth->fetchrow_hashref) { $row->{branches} =~ s/^\{(.*)\}$/$1/; $row->{owner_email} =~ s/\@/ [ a t ] /; push(@$statrows,$row); } $sth->finish; $db->disconnect; # use Data::Dumper; print "Content-Type: text/plain\n\n",Dumper($statrows),"VERSION: ",$DBD::Pg::VERSION,"\n"; exit; my $template = new Template({}); print "Content-Type: text/html\n\n"; $template->process(\*DATA,{statrows=>$statrows}); exit; __DATA__ PostgreSQL BuildFarm Members

PostgreSQL BuildFarm Members

Click branch links to see build history. Click the heading links to resort the list. Select members by checkbox and hit the button at the bottom to create a status custom filter.

[% alt = true %] [% FOREACH row IN statrows %] [% alt = ! alt %] [% END %]
  Name
Owner
OS / Version Compiler / Version Arch Branches reported on
(most recent report)
[% row.name %]
[% row.owner_email %]
[% row.operating_system %]
[% row.os_version %]
[% row.compiler %]
[% row.compiler_version %]
[% row.arch %] [% IF ! row.branches ; ' ' ; END -%]
    [%- FOREACH branch_days IN row.branches.split(',') ; branch_fields = branch_days.split(':'); branch = branch_fields.0; branch_day = branch_fields.1; %]
  • [% branch %] ([% branch_day %] days ago)
  • [% END %]

Hosting for the PostgreSQL Buildfarm is generously provided by: CommandPrompt, The PostgreSQL Company