6 use vars qw($dbhost $dbname $dbuser $dbpass $dbport);
8 require "$ENV{BFConfDir}/BuildFarmWeb.pl";
10 use lib "/home/community/pgbuildfarm/lib/lib/perl5/site_perl";
12 use SOAP::Transport::HTTP;
14 SOAP::Transport::HTTP::CGI->dispatch_to('PGBuildFarm')->handle;
28 my $dsn="dbi:Pg:dbname=$::dbname";
29 $dsn .= ";host=$::dbhost" if $::dbhost;
30 $dsn .= ";port=$::dbport" if $::dbport;
32 my $db = DBI->connect($dsn,$::dbuser,$::dbpass) or
33 die("$dsn,$::dbuser,$::dbpass,$!");
35 # there is possibly some redundancy in this query, but it makes
36 # a lot of the processing simpler.
41 select (now() at time zone 'GMT')::timestamp(0) - snapshot as when_ago, dsh.*
42 from dashboard_mat dsh
43 order by branch = 'HEAD' desc,
53 my $sth=$db->prepare($statement);
55 while (my $row = $sth->fetchrow_hashref)
57 next if (@members && ! grep {$_ eq $row->{sysname} } @members);
58 $row->{build_flags} =~ s/^\{(.*)\}$/$1/;
59 $row->{build_flags} =~ s/,/ /g;
60 $row->{build_flags} =~ s/--((enable|with)-)?//g;
61 $row->{build_flags} =~ s/\S+=\S+//g;
62 push(@$statrows,$row);