add show_list option
authorAndrew Dunstan <andrew@dunslane.net>
Mon, 13 Apr 2009 15:14:33 +0000 (15:14 +0000)
committerAndrew Dunstan <andrew@dunslane.net>
Mon, 13 Apr 2009 15:14:33 +0000 (15:14 +0000)
cgi-bin/typedefs.pl

index c10a1cfaa0b7ade4ff65e2fbe4f1abdcc1955744..5f3b216f305d0dbcb85db62a81674fb1715bd683 100755 (executable)
@@ -2,6 +2,9 @@
 
 use strict;
 use DBI;
+use CGI;
+
+my $query = new CGI;
 
 use vars qw($dbhost $dbname $dbuser $dbpass $dbport);
 
@@ -25,6 +28,22 @@ my $sql = q{
 };
 my $builds = $dbh->selectall_arrayref($sql, { Slice => {} });
 
+
+if ($query->param('show_list'))
+{
+    print "Content-Type: text/html\n\n",
+    "<head><title>Typedefs URLs</title></head>\n",
+    "<body><h1>Typdefs URLs</h1>\n",
+    "<table border='1'><tr><th>member</th></tr>\n";
+
+    foreach my $build (@$builds)
+    {
+       print "<tr><td><a href='http://www.pgbuildfarm.org/cgi-bin/show_stage_log.pl?nm=$build->{sysname}\&amp;dt=$build->{snapshot}\&amp;stg=typedefs'>$build->{sysname}</a></td></tr>\n";
+    }
+    print "</table></body></html>\n";
+    exit;
+}
+
 $sql = q{
    select log_text
    from build_status_log