r11043 - in /scripts/qa: qareport qareport.cgi templates/by_category

tincho-guest at users.alioth.debian.org tincho-guest at users.alioth.debian.org
Sun Dec 9 07:29:56 UTC 2007


Author: tincho-guest
Date: Sun Dec  9 07:29:55 2007
New Revision: 11043

URL: http://svn.debian.org/wsvn/?sc=1&rev=11043
Log:
- qareport: fixed non-functional -a option (wasn't a ref) and changed option
  processing order, so help always work.
- qareport.cgi: added show_all and refresh options.
- templates/by_category: added form for said options, with CGI plugin.

Modified:
    scripts/qa/qareport
    scripts/qa/qareport.cgi
    scripts/qa/templates/by_category

Modified: scripts/qa/qareport
URL: http://svn.debian.org/wsvn/scripts/qa/qareport?rev=11043&op=diff
==============================================================================
--- scripts/qa/qareport (original)
+++ scripts/qa/qareport Sun Dec  9 07:29:55 2007
@@ -17,16 +17,16 @@
 use DebianQA::Svn;
 use Getopt::Long;
 
-my $opts = getopt_common(1, 1);
-
 my $p = new Getopt::Long::Parser;
-$p->configure(qw(no_ignore_case bundling));
+$p->configure(qw(no_ignore_case bundling pass_through));
 
 my $list_is_dirs = 0;
 my $show_all = 0;
 $p->getoptions('help|h|?' => \&help, 'directories!' => \$list_is_dirs,
-    'showall|a!' => $show_all
+    'showall|a!' => \$show_all
     ) or die "Error parsing command-line arguments!\n";
+
+my $opts = getopt_common(0, 1); # No passthru, load config
 
 my @dirs = @ARGV;
 

Modified: scripts/qa/qareport.cgi
URL: http://svn.debian.org/wsvn/scripts/qa/qareport.cgi?rev=11043&op=diff
==============================================================================
--- scripts/qa/qareport.cgi (original)
+++ scripts/qa/qareport.cgi Sun Dec  9 07:29:55 2007
@@ -40,9 +40,12 @@
 my @pkglist = get_pkglist();
 my $cls = classify(@pkglist);
 
-foreach(keys %$cls)
+unless($cgi->param("show_all"))
 {
-    delete $cls->{$_} unless(%{$cls->{$_}{hilight}});
+    foreach(keys %$cls)
+    {
+        delete $cls->{$_} unless(%{$cls->{$_}{hilight}});
+    }
 }
 
 my( @for_upload, @for_upgrade, @weird, @waiting, @wip, @with_bugs, @all );
@@ -99,6 +102,7 @@
             "%a, %d %b %Y %T %Z",
             gmtime($last_modified),
         ),
+        $cgi->param("reload") ? (-refresh => $cgi->param("reload")) : (),
     );
     setlocale(LC_TIME, $old_locale);
 }
@@ -136,8 +140,9 @@
                 with_bugs   => \@with_bugs,
             )
         ),
-        shown_packages   => scalar(@all),
+        shown_packages  => scalar(@all),
         total_packages  => scalar(@pkglist),
+#        params          => scalar($cgi->Vars()),
     },
 ) || die $tt->error;
 

Modified: scripts/qa/templates/by_category
URL: http://svn.debian.org/wsvn/scripts/qa/templates/by_category?rev=11043&op=diff
==============================================================================
--- scripts/qa/templates/by_category (original)
+++ scripts/qa/templates/by_category Sun Dec  9 07:29:55 2007
@@ -264,6 +264,13 @@
 
 <h2>$shown_packages/$total_packages</h2>
 
+<div id="options">
+[% USE CGI %]
+[% CGI.start_form %]
+[% CGI.checkbox({ Name => 'show_all', Label => "Show all packages" }) %]
+[% CGI.submit %]
+[% CGI.end_form.join("") %]
+</div>
 <p>
     <a href="http://validator.w3.org/check?uri=referer"><img
         style="border:0;width:88px;height:31px"




More information about the Pkg-perl-cvs-commits mailing list