+++ /dev/null
-#!/usr/bin/perl
-
-use strict;
-
-BEGIN
-{
- $ENV{BFConfDir} ||= $ENV{HOME};
- require "$ENV{BFConfDir}/BuildFarmWeb.conf";
-}
-
-use lib $BuildFarmWeb::conf{libdir};
-
-use BuildFarmWeb::Store qw(get_recent_status);
-
-use CGI;
-use Template;
-
-my $template = new Template($BuildFarmWeb::conf{template_options});
-
-my $query = new CGI;
-
-my @members = $query->param('member');
-
-my $statrows = get_recent_status(@members);
-
-my $template_vars = {statrows=>$statrows};
-
-print "Content-Type: text/html\n\n";
-$template->process("dashboard.tt",$template_vars);
-
-
-
-
+++ /dev/null
-#!/usr/bin/perl
-
-use strict;
-use DBI;
-use Template;
-use CGI;
-
-use vars qw($dbhost $dbname $dbuser $dbpass $dbport);
-
-
-require "$ENV{BFConfDir}/BuildFarmWeb.pl";
-#require "BuildFarmWeb.pl";
-
-die "no dbname" unless $dbname;
-die "no dbuser" unless $dbuser;
-
-my $dsn="dbi:Pg:dbname=$dbname";
-$dsn .= ";host=$dbhost" if $dbhost;
-$dsn .= ";port=$dbport" if $dbport;
-
-my $db = DBI->connect($dsn,$dbuser,$dbpass);
-
-die $DBI::errstr unless $db;
-
-my $query = new CGI;
-my $member = $query->param('nm');
-my $branch = $query->param('br');
-
-# we don't really need to do this join, since we only want
-# one row from buildsystems. but it means we only have to run one
-# query. If it gets heavy we'll split it up and run two
-
-my $statement = <<EOS;
-
- select (now() at time zone 'GMT')::timestamp(0) - snapshot as when_ago,
- sysname, snapshot, b.status, stage,
- operating_system, os_version, compiler, compiler_version, architecture
- from buildsystems s,
- build_status b
- where name = ?
- and branch = ?
- and s.status = 'approved'
- and name = sysname
- order by snapshot desc
- limit 240
-
-EOS
-;
-
-my $statrows=[];
-my $sth=$db->prepare($statement);
-$sth->execute($member,$branch);
-while (my $row = $sth->fetchrow_hashref)
-{
- push(@$statrows,$row);
-}
-$sth->finish;
-
-$db->disconnect;
-
-my $template = new Template({EVAL_PERL => 1,
- INCLUDE_PATH => "/home/community/pgbuildfarm/templates",
- });
-
-print "Content-Type: text/html\n\n";
-
-$template->process("dyn/history.tt",
- {statrows=>$statrows, branch=>$branch, member => $member});
-
+++ /dev/null
-#!/usr/bin/perl
-
-use strict;
-use DBI;
-use Template;
-use CGI;
-use File::Temp qw(tempfile);
-
-use vars qw($dbhost $dbname $dbuser $dbpass $dbport @log_file_names);
-
-
-require "$ENV{BFConfDir}/BuildFarmWeb.pl";
-#require "BuildFarmWeb.pl";
-
-die "no dbname" unless $dbname;
-die "no dbuser" unless $dbuser;
-
-my $dsn="dbi:Pg:dbname=$dbname";
-$dsn .= ";host=$dbhost" if $dbhost;
-$dsn .= ";port=$dbport" if $dbport;
-
-my $query = new CGI;
-
-my $system = $query->param('nm');
-my $logdate = $query->param('dt');
-my $stage = $query->param('stg');
-
-use vars qw($tgz $output);
-
-if ($stage && $system && $logdate)
-{
-
-}
-
-if ($system && $logdate)
-{
-
- my $db = DBI->connect($dsn,$dbuser,$dbpass);
-
- die $DBI::errstr unless $db;
-
- if ($stage)
- {
- my $lst = q(
- select log_text
- from build_status_log
- where sysname = ?
- and snapshot = ?
- and log_file_name = ?
- );
-
- }
-
- my $statement = q(
-
- select log_archive
- from build_status
- where sysname = ? and snapshot = ?
-
- );
-
-
-
- my $sth=$db->prepare($statement);
- $sth->execute($system,$logdate);
- my $row=$sth->fetchrow_arrayref;
- $tgz=$row->[0];
- $sth->finish;
- $db->disconnect;
- $output = `tar -z -O -xf $filename $stage.log 2>&1`
- if $stage;;
-
-
-
-}
-
-unless ($stage)
-{
-
- print
- "Content-Type: application/x-gzip\n",
- "Content-Disposition: attachment; filename=buildfarmlog.tgz\n",
- "\n",
- $tgz;
- exit;
-}
-
-my $template = "buildlogXXXXXX";
-my ($fh, $filename) = tempfile($template, UNLINK => 1);
-print $fh $tgz;
-close($fh);
-
-print "Content-Type: text/plain\n\n", $output,
-
- "-------------------------------------------------\n\n",
- "Hosting for the PostgreSQL Buildfarm is generously ",
- "provided by: CommandPrompt, The PostgreSQL Company";
-
-; exit;
-
-# using <pre> like this on huge files can make browsers choke
-
-print "Content-Type: text/html\n\n";
-
-print <<EOHTML;
-<html>
-<body>
-<pre>
-$output
-</pre>
-</body>
-</html>
-
-EOHTML
+++ /dev/null
-#!/usr/bin/perl
-
-use strict;
-use DBI;
-use Template;
-use CGI;
-
-use vars qw($dbhost $dbname $dbuser $dbpass $dbport);
-
-
-require "$ENV{BFConfDir}/BuildFarmWeb.pl";
-
-my $query = new CGI;
-my @members = $query->param('member');
-
-my $dsn="dbi:Pg:dbname=$dbname";
-$dsn .= ";host=$dbhost" if $dbhost;
-$dsn .= ";port=$dbport" if $dbport;
-
-my $db = DBI->connect($dsn,$dbuser,$dbpass) or die("$dsn,$dbuser,$dbpass,$!");
-
-# there is possibly some redundancy in this query, but it makes
-# a lot of the processing simpler.
-
-my $statement = <<EOS;
-
- select (now() at time zone 'GMT')::timestamp(0) - snapshot as when_ago,
- sysname, snapshot, b.status, stage, branch, build_flags,
- operating_system, os_version, compiler, compiler_version, architecture
- from buildsystems s,
- build_status b natural join
- (select sysname, branch, max(snapshot) as snapshot
- from build_status
- group by sysname, branch
- having max(snapshot) > now() - '30 days'::interval
- ) m
- where name = sysname
- and s.status = 'approved'
- order by case when branch = 'HEAD' then 0 else 1 end,
- branch desc,
- snapshot desc
-
-EOS
-;
-
-my $statrows=[];
-my $sth=$db->prepare($statement);
-$sth->execute;
-while (my $row = $sth->fetchrow_hashref)
-{
- next if (@members && ! grep {$_ eq $row->{sysname} } @members);
- $row->{build_flags} =~ s/^\{(.*)\}$/$1/;
- $row->{build_flags} =~ s/,/ /g;
- $row->{build_flags} =~ s/--((enable|with)-)?//g;
- $row->{build_flags} =~ s/\S+=\S+//g;
- push(@$statrows,$row);
-}
-$sth->finish;
-
-
-$db->disconnect;
-
-my $template = new Template({});
-
-print "Content-Type: text/html\n\n";
-
-$template->process(\*DATA,{statrows=>$statrows});
-
-exit;
-
-
-__DATA__
-[%- BLOCK cl %] class=" [% SWITCH bgfor -%]
- [%- CASE 'OK' %]pass[% CASE 'ContribCheck' %]warn[% CASE [ 'Check' 'InstallCheck' ] %]warnx[% CASE %]fail[% END %]"
-[%- END -%]
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <title>PostgreSQL BuildFarm Status</title>
- <link rel="stylesheet" rev="stylesheet" href="/inc/pgbf.css" charset="utf-8" />
- <style type="text/css"><!--
- li#status a { color:rgb(17,45,137); background: url(/inc/b/r.png) no-repeat 100% -20px; }
- li#status { background: url(/inc/b/l.png) no-repeat 0% -20px; }
- --></style>
-</head>
-<body>
-<div id="wrapper">
-<div id="banner">
-<a href="/index.html"><img src="/inc/pgbuildfarm-banner.png" alt="PostgreSQL BuildFarm" width="800" height="73" /></a>
-<div id="nav">
-<ul>
- <li id="home"><a href="/index.html" title="PostgreSQL BuildFarm Home">Home</a></li>
- <li id="status"><a href="/cgi-bin/show_status.pl" title="Current results">Status</a></li>
- <li id="members"><a href="/cgi-bin/show_members.pl" title="Platforms tested">Members</a></li>
- <li id="register"><a href="/register.html" title="Join PostgreSQL BuildFarm">Register</a></li>
- <li id="pgfoundry"><a href="http://pgfoundry.org/projects/pgbuildfarm/">PGFoundry</a></li>
- <li id="postgresql.org"><a href="http://www.postgresql.org">PostgreSQL.org</a></li>
-</ul>
-</div><!-- nav -->
-</div><!-- banner -->
-<div id="main">
- <h1>PostgreSQL BuildFarm Status</h1>
- <p>
- Shown here is the latest status of each farm member
- for each branch it has reported on in the last 30 days.
- </p>
- <p>
- Use the farm member link for history of that member
- on the relevant branch.
- </p>
- <table cellspacing="0">
-[% brch = "" %]
-[% FOREACH row IN statrows %]
-[% IF row.branch != brch ; brch = row.branch %]
-<tr><th class="head" colspan="4">Branch: [% brch %]</th></tr>
-<tr><th>Alias</th><th>System</th><th>Status</th><th>Flags</th></tr>
-[% END %]
-<tr [% PROCESS cl bgfor=row.stage %]>
- <td><a
- href="show_history.pl?nm=[% row.sysname %]&br=[% row.branch %]"
- title="History"
- >[% row.sysname %]</a></td>
- <td><span class="opsys">[% row.operating_system %]
- [% row.os_version %]</span> <span class="compiler">
- [%- row.compiler %]
- [% row.compiler_version %]</span> <span class="arch">
- [%- row.architecture %]</span></td>
- <td class="status">
- [%- row.when_ago | replace('\s',' ') %] ago
- [% row.stage -%]
- <a href="show_log.pl?nm=
- [%- row.sysname %]&dt=
- [%- row.snapshot | uri %]">
- [%- IF row.stage != 'OK' %]Details[% ELSE %]Config[% END -%]</a></td>
-
- <td class="flags">[% row.build_flags %]</td>
-</tr>
-[% END %]
- </table>
-</div><!-- main -->
-</div><!-- wrapper -->
- </body>
-</html>
-
-
-
-
-
-
-
-
+++ /dev/null
-#!/usr/bin/perl
-
-use strict;
-use DBI;
-use Template;
-use CGI;
-
-use vars qw($dbhost $dbname $dbuser $dbpass $dbport);
-
-
-require "$ENV{BFConfDir}/BuildFarmWeb.pl";
-
-my $query = new CGI;
-my @members = $query->param('member');
-
-my $dsn="dbi:Pg:dbname=$dbname";
-$dsn .= ";host=$dbhost" if $dbhost;
-$dsn .= ";port=$dbport" if $dbport;
-
-my $db = DBI->connect($dsn,$dbuser,$dbpass) or die("$dsn,$dbuser,$dbpass,$!");
-
-# there is possibly some redundancy in this query, but it makes
-# a lot of the processing simpler.
-
-my $statement = <<EOS;
-
- select (now() at time zone 'GMT')::timestamp(0) - snapshot as when_ago,
- sysname, snapshot, b.status, stage, branch,
- operating_system, os_version, compiler, compiler_version, architecture
- from buildsystems s,
- build_status b natural join
- (select sysname, branch, max(snapshot) as snapshot
- from build_status
- group by sysname, branch
- having max(snapshot) > now() - '30 days'::interval
- ) m
- where name = sysname
- and s.status = 'approved'
- order by case when branch = 'HEAD' then 0 else 1 end,
- branch desc,
- snapshot desc
-
-EOS
-;
-
-my $statrows=[];
-my $sth=$db->prepare($statement);
-$sth->execute;
-while (my $row = $sth->fetchrow_hashref)
-{
- next if (@members && ! grep {$_ eq $row->{sysname} } @members);
- push(@$statrows,$row);
-}
-$sth->finish;
-
-
-$db->disconnect;
-
-my $template = new Template({INCLUDE_PATH=>"/home/community/pgbuildfarm/templates"});
-
-print "Content-Type: text/html\n\n";
-
-$template->process("dyn/status.tt",{statrows=>$statrows});
-
+++ /dev/null
-#!/usr/bin/perl
-
-use strict;
-use DBI;
-use Template;
-use CGI;
-
-use vars qw($dbhost $dbname $dbuser $dbpass $dbport);
-
-
-require "$ENV{BFConfDir}/BuildFarmWeb.pl";
-
-my $query = new CGI;
-my @members = $query->param('member');
-
-my $dsn="dbi:Pg:dbname=$dbname";
-$dsn .= ";host=$dbhost" if $dbhost;
-$dsn .= ";port=$dbport" if $dbport;
-
-my $db = DBI->connect($dsn,$dbuser,$dbpass) or die("$dsn,$dbuser,$dbpass,$!");
-
-# there is possibly some redundancy in this query, but it makes
-# a lot of the processing simpler.
-
-my $statement = <<EOS;
-
- select (now() at time zone 'GMT')::timestamp(0) - snapshot as when_ago,
- sysname, snapshot, b.status, stage, branch, build_flags,
- operating_system, os_version, compiler, compiler_version, architecture
- from buildsystems s,
- build_status b natural join
- (select sysname, branch, max(snapshot) as snapshot
- from build_status
- group by sysname, branch
- having max(snapshot) > now() - '30 days'::interval
- ) m
- where name = sysname
- and s.status = 'approved'
- order by case when branch = 'HEAD' then 0 else 1 end,
- branch desc,
- snapshot desc
-
-EOS
-;
-
-my $statrows=[];
-my $sth=$db->prepare($statement);
-$sth->execute;
-while (my $row = $sth->fetchrow_hashref)
-{
- next if (@members && ! grep {$_ eq $row->{sysname} } @members);
- $row->{build_flags} =~ s/^\{(.*)\}$/$1/;
- $row->{build_flags} =~ s/,/ /g;
- $row->{build_flags} =~ s/--((enable|with)-)?//g;
- $row->{build_flags} =~ s/\S+=\S+//g;
- push(@$statrows,$row);
-}
-$sth->finish;
-
-
-$db->disconnect;
-
-my $template = new Template({});
-
-print "Content-Type: text/html\n\n";
-
-$template->process(\*DATA,{statrows=>$statrows});
-
-exit;
-
-=comment
-
-[%- BLOCK img ; flag ; END -%]
-[%- BLOCK imgx ; IF flag_imgs.$flag ; '<img src="' . flag_imgs{flag} . '" alt="' . flag . '" /> ' ; ELSE flag . ' ' ; END ; END -%]
-
-=cut
-
-__DATA__
-[%
- flag_imgs = {
- perl = '/img/camel.png',
- python = '/img/python.png',
- debug = '/img/bug.png',
- pam => '/img/pam.png',
- cassert => '/img/cassert.png',
- openssl => '/img/ssl_icon.gif',
- nls => '/img/translateicon.gif',
- krb5 => '/img/krb.gif',
- tcl => '/img/tcl.png',
- 'thread-safety' => '/img/threads.gif',
- 'integer-datetimes' = '/img/days.png',
- }
--%]
-[%- BLOCK img ; IF flag == 'blank' %]<img src="/img/blank.gif" height="16" width="16" class="inline" align="bottom" /> [% ELSIF flag_imgs.$flag %]<img src="[% flag_imgs.$flag %]" title="[% flag %]" alt="[% flag %]" height="16" width="16" class="inline" align="bottom" /> [% ELSE %][%#
- flag ; ' '
-%][% END ; END -%]
-[%- BLOCK cl %] class=" [% SWITCH bgfor -%]
- [%- CASE 'OK' %]pass[% CASE 'ContribCheck' %]warn[% CASE [ 'Check' 'InstallCheck' ] %]warnx[% CASE %]fail[% END %]"
-[%- END -%]
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <title>PostgreSQL BuildFarm Status</title>
- <link rel="stylesheet" rev="stylesheet" href="/inc/pgbf.css" charset="utf-8" />
- <style type="text/css"><!--
- li#status a { color:rgb(17,45,137); background: url(/inc/b/r.png) no-repeat 100% -20px; }
- li#status { background: url(/inc/b/l.png) no-repeat 0% -20px; }
- --></style>
-</head>
-<body>
-<div id="wrapper">
-<div id="banner">
-<a href="/index.html"><img src="/inc/pgbuildfarm-banner.png" alt="PostgreSQL BuildFarm" width="800" height="73" /></a>
-<div id="nav">
-<ul>
- <li id="home"><a href="/index.html" title="PostgreSQL BuildFarm Home">Home</a></li>
- <li id="status"><a href="/cgi-bin/show_status.pl" title="Current results">Status</a></li>
- <li id="members"><a href="/cgi-bin/show_members.pl" title="Platforms tested">Members</a></li>
- <li id="register"><a href="/register.html" title="Join PostgreSQL BuildFarm">Register</a></li>
- <li id="pgfoundry"><a href="http://pgfoundry.org/projects/pgbuildfarm/">PGFoundry</a></li>
- <li id="postgresql.org"><a href="http://www.postgresql.org">PostgreSQL.org</a></li>
-</ul>
-</div><!-- nav -->
-</div><!-- banner -->
-<div id="main">
- <h1>PostgreSQL BuildFarm Status</h1>
- <p>
- Shown here is the latest status of each farm member
- for each branch it has reported on in the last 30 days.
- </p>
- <p>
- Use the farm member link for history of that member
- on the relevant branch.
- </p>
-<table><tr><th class="head" rowspan="2" cellspacing="0">Legend</th>
-[% FOREACH flagset IN flag_imgs %]
-<td><img src="[% flagset.value %]" title="[% flagset.key %]" alt="[% flagset.key %]" height="16" width="16" class="inline" align="center"/> = [% flagset.key %]</td>
-[% IF loop.count == 6 %]</tr><tr>[% END %]
-[% END %]
-</tr></table>
-<br />
- <table cellspacing="0">
-[% brch = "" %]
-[% FOREACH row IN statrows %]
-[% IF row.branch != brch ; brch = row.branch %]
-<tr><th class="head" colspan="4">Branch: [% brch %]</th></tr>
-<tr><th>Alias</th><th>System</th><th>Status</th><th>Flags</th></tr>
-[% END %]
-<tr [% PROCESS cl bgfor=row.stage %]>
- <td><a
- href="show_history.pl?nm=[% row.sysname %]&br=[% row.branch %]"
- title="History"
- >[% row.sysname %]</a></td>
- <td><span class="opsys">[% row.operating_system %]
- [% row.os_version %]</span> <span class="compiler">
- [%- row.compiler %]
- [% row.compiler_version %]</span> <span class="arch">
- [%- row.architecture %]</span></td>
- <td class="status">
- [%- row.when_ago | replace('\s',' ') %] ago
- [% row.stage -%]
- <a href="show_log.pl?nm=
- [%- row.sysname %]&dt=
- [%- row.snapshot | uri %]">
- [%- IF row.stage != 'OK' %]Details[% ELSE %]Config[% END -%]</a></td>
-
- <td class="flags">[%
- flags = row.build_flags.split();
- FOREACH flagme IN flag_imgs.keys() ;
- IF flags.grep(flagme).size > 0 ;
- PROCESS img flag = flagme ;
- ELSE ;
- PROCESS img flag = 'blank' ;
- END;
- END
- %]</td>
-</tr>
-[% END %]
- </table>
-</div><!-- main -->
-</div><!-- wrapper -->
- </body>
-</html>
-
-
-
-
-
-
-
-