zebra bars on table from MongoDB store
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 23 Jan 2010 21:02:52 +0000 (21:02 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 23 Jan 2010 21:02:52 +0000 (21:02 +0000)
lib/PXElator/httpd.pm

index ffc072f..b811617 100644 (file)
@@ -274,6 +274,7 @@ warn "XXX pids = ", dump( $daemons::pids );
                print $client ok
                        , qq|<table>|
                ;
+               my ( $s1,$s2 ) = ( ' style="background: #eee"', '' );
                store::query( sub {
                        my $o = shift;
                        my $p = delete( $o->{package} );
@@ -282,7 +283,8 @@ warn "XXX pids = ", dump( $daemons::pids );
                        # XXX sigh, dump dies if we don't do this
                        delete $o->{$_} foreach ( grep { ! defined $o->{$_} } keys %$o );
 
-                       print $client qq|<tr><td>|, join(qq|</td><td>|, map { $p->{$_} } keys %$p ), qq|</td><td><pre>|, dump( $o ), qq|</pre></td></tr>\n|;
+                       print $client qq|<tr$s1><td>|, join(qq|</td><td>|, map { $p->{$_} } keys %$p ), qq|</td><td><pre>|, dump( $o ), qq|</pre></td></tr>\n|;
+                       ( $s1, $s2 ) = ( $s2, $s1 );
                });
                print $client qq|</table>|;