X-Git-Url: https://git.exim.org/buildfarm-server.git/blobdiff_plain/343135cef3bbaca205294b3c782bba213eb7d5a0..b435360eef926b4bce16efa8ea5c5d507d638c3b:/cgi-bin/show_status.pl diff --git a/cgi-bin/show_status.pl b/cgi-bin/show_status.pl old mode 100644 new mode 100755 index 038776f..d60fb9f --- a/cgi-bin/show_status.pl +++ b/cgi-bin/show_status.pl @@ -18,67 +18,33 @@ my $dsn="dbi:Pg:dbname=$dbname"; $dsn .= ";host=$dbhost" if $dbhost; $dsn .= ";port=$dbport" if $dbport; + +my $sort_clause = ""; +my $sortby = $query->param('sortby') || 'nosort'; +if ($sortby eq 'name') +{ + $sort_clause = 'lower(sysname),'; +} +elsif ($sortby eq 'os') +{ + $sort_clause = 'lower(operating_system), os_version desc,'; +} +elsif ($sortby eq 'compiler') +{ + $sort_clause = "lower(compiler), compiler_version,"; +} + 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 branch = 'HEAD' desc, - branch desc, - snapshot desc +my $statement =< now() - '30 days'::interval - ) m - where name = sysname - and s.status = 'approved' + select * + from dashboard order by branch = 'HEAD' desc, - branch desc, + branch desc, $sort_clause snapshot desc - - EOS ; @@ -90,7 +56,14 @@ while (my $row = $sth->fetchrow_hashref) next if (@members && ! grep {$_ eq $row->{sysname} } @members); $row->{build_flags} =~ s/^\{(.*)\}$/$1/; $row->{build_flags} =~ s/,/ /g; + # enable-integer-datetimes is now the default + if ($row->{branch} eq 'HEAD' || $row->{branch} gt 'REL8_3_STABLE') + { + $row->{build_flags} .= " --enable-integer-datetimes " + unless ($row->{build_flags} =~ /--(en|dis)able-integer-datetimes/); + } $row->{build_flags} =~ s/--((enable|with)-)?//g; + $row->{build_flags} =~ s/libxml/xml/; $row->{build_flags} =~ s/\S+=\S+//g; push(@$statrows,$row); } @@ -99,6 +72,7 @@ $sth->finish; $db->disconnect; + my $template = new Template({}); print "Content-Type: text/html\n\n"; @@ -178,7 +152,7 @@ __DATA__ [% FOREACH flagset IN flag_imgs %] -[% IF loop.count == 5 %][% END %] +[% IF loop.count == 6 %][% END %] [% END %]
Legend[% flagset.key %] = [% flagset.key %]

@@ -214,10 +188,10 @@ __DATA__

-Hosting for the PostgreSQL Buildfarm is generously -provided by: +The PostgreSQL Buildfarm website is provided by: CommandPrompt, -The PostgreSQL Company +The PostgreSQL Company
+The PostgreSQL community makes it work!