From 05730a133a3730e25f676900108baa5be9379941 Mon Sep 17 00:00:00 2001 From: Andrew Dunstan Date: Mon, 27 Aug 2007 17:09:00 +0000 Subject: [PATCH] delete old temp files that should never have been in svn --- cgi-bin/newshowstat.pl | 33 ------ cgi-bin/show_history2.pl | 69 ------------- cgi-bin/show_stage_log2.pl | 114 --------------------- cgi-bin/show_status.pl.save | 153 ---------------------------- cgi-bin/show_status2.pl | 64 ------------ cgi-bin/show_status9.pl | 193 ------------------------------------ 6 files changed, 626 deletions(-) delete mode 100755 cgi-bin/newshowstat.pl delete mode 100755 cgi-bin/show_history2.pl delete mode 100755 cgi-bin/show_stage_log2.pl delete mode 100644 cgi-bin/show_status.pl.save delete mode 100755 cgi-bin/show_status2.pl delete mode 100755 cgi-bin/show_status9.pl diff --git a/cgi-bin/newshowstat.pl b/cgi-bin/newshowstat.pl deleted file mode 100755 index 80d4e62..0000000 --- a/cgi-bin/newshowstat.pl +++ /dev/null @@ -1,33 +0,0 @@ -#!/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); - - - - diff --git a/cgi-bin/show_history2.pl b/cgi-bin/show_history2.pl deleted file mode 100755 index 2bf7f13..0000000 --- a/cgi-bin/show_history2.pl +++ /dev/null @@ -1,69 +0,0 @@ -#!/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 = <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}); - diff --git a/cgi-bin/show_stage_log2.pl b/cgi-bin/show_stage_log2.pl deleted file mode 100755 index c3ef407..0000000 --- a/cgi-bin/show_stage_log2.pl +++ /dev/null @@ -1,114 +0,0 @@ -#!/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
 like this on huge files can make browsers choke
-
-print "Content-Type: text/html\n\n";
-
-print <
-
-
-$output
-
- - - -EOHTML diff --git a/cgi-bin/show_status.pl.save b/cgi-bin/show_status.pl.save deleted file mode 100644 index 0c64b17..0000000 --- a/cgi-bin/show_status.pl.save +++ /dev/null @@ -1,153 +0,0 @@ -#!/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 = < 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 -%] - - - - - PostgreSQL BuildFarm Status - - - - -
- -
-

PostgreSQL BuildFarm Status

-

- Shown here is the latest status of each farm member - for each branch it has reported on in the last 30 days. -

-

- Use the farm member link for history of that member - on the relevant branch. -

- -[% brch = "" %] -[% FOREACH row IN statrows %] -[% IF row.branch != brch ; brch = row.branch %] - - -[% END %] - - - - - - - -[% END %] -
Branch: [% brch %]
AliasSystemStatusFlags
[% row.sysname %][% row.operating_system %] - [% row.os_version %] - [%- row.compiler %] - [% row.compiler_version %] - [%- row.architecture %] - [%- row.when_ago | replace('\s',' ') %] ago  - [% row.stage -%] - - [%- IF row.stage != 'OK' %]Details[% ELSE %]Config[% END -%][% row.build_flags %]
-
-
- - - - - - - - - - diff --git a/cgi-bin/show_status2.pl b/cgi-bin/show_status2.pl deleted file mode 100755 index a1b1ab1..0000000 --- a/cgi-bin/show_status2.pl +++ /dev/null @@ -1,64 +0,0 @@ -#!/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 = < 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}); - diff --git a/cgi-bin/show_status9.pl b/cgi-bin/show_status9.pl deleted file mode 100755 index 54731d7..0000000 --- a/cgi-bin/show_status9.pl +++ /dev/null @@ -1,193 +0,0 @@ -#!/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 = < 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 ; '' . 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' %] [% ELSIF flag_imgs.$flag %][% flag %] [% ELSE %][%# - flag ; ' ' -%][% END ; END -%] -[%- BLOCK cl %] class=" [% SWITCH bgfor -%] - [%- CASE 'OK' %]pass[% CASE 'ContribCheck' %]warn[% CASE [ 'Check' 'InstallCheck' ] %]warnx[% CASE %]fail[% END %]" -[%- END -%] - - - - - PostgreSQL BuildFarm Status - - - - -
- -
-

PostgreSQL BuildFarm Status

-

- Shown here is the latest status of each farm member - for each branch it has reported on in the last 30 days. -

-

- Use the farm member link for history of that member - on the relevant branch. -

- -[% FOREACH flagset IN flag_imgs %] - -[% IF loop.count == 6 %][% END %] -[% END %] -
Legend[% flagset.key %] = [% flagset.key %]
-
- -[% brch = "" %] -[% FOREACH row IN statrows %] -[% IF row.branch != brch ; brch = row.branch %] - - -[% END %] - - - - - - - -[% END %] -
Branch: [% brch %]
AliasSystemStatusFlags
[% row.sysname %][% row.operating_system %] - [% row.os_version %] - [%- row.compiler %] - [% row.compiler_version %] - [%- row.architecture %] - [%- row.when_ago | replace('\s',' ') %] ago  - [% row.stage -%] - - [%- IF row.stage != 'OK' %]Details[% ELSE %]Config[% END -%][% - 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 - %]
-
-
- - - - - - - - - - -- 2.30.2