add filtering to failures page.
[buildfarm-server.git] / cgi-bin / show_status_soap.pl
old mode 100644 (file)
new mode 100755 (executable)
index e51db59..de314f7
@@ -1,14 +1,19 @@
 #!/usr/bin/perl
 
-use strict;
+=comment
+
+Copyright (c) 2003-2010, Andrew Dunstan
+
+See accompanying License file for license details
 
+=cut 
+
+use strict;
 
 use vars qw($dbhost $dbname $dbuser $dbpass $dbport);
 
 require "$ENV{BFConfDir}/BuildFarmWeb.pl";
 
-use lib "/home/community/pgbuildfarm/lib/lib/perl5/site_perl";
-
 use SOAP::Transport::HTTP;
 
 SOAP::Transport::HTTP::CGI->dispatch_to('PGBuildFarm')->handle;
@@ -38,32 +43,8 @@ sub get_status
     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, coalesce(b.os_version,s.os_version) as os_version,
-       compiler, 
-        coalesce(b.compiler_version, s.compiler_version) as compiler_version, 
-       architecture 
-    from buildsystems s, 
-        (
-       select distinct on (bs.sysname, bs.branch, bs.report_time) 
-               sysname, snapshot, status, stage, branch, build_flags,
-               report_time ,compiler_version, os_version
-        from build_status bs
-             left join 
-             personality p
-             on (p.name = bs.sysname and p.effective_date <= bs.report_time)
-        order by bs.sysname, bs.branch, bs.report_time, 
-                 p.effective_date is null, p.effective_date desc
-        ) as 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'
+    select (now() at time zone 'GMT')::timestamp(0) - snapshot as when_ago, dsh.*
+    from dashboard_mat dsh
     order by branch = 'HEAD' desc, 
         branch desc, 
         snapshot desc