#use JSON;
use IO::Socket::INET;
use Regexp::Common qw/net/;
+use POSIX qw(strftime);
our $title;
<a target=server href=/brctl >brctl</a>
<a target=server href=/ip >ip</a>
|
-<a target=store href=$store_url >store</a>
-<a target=store href=/store/query >query</a>
+<a target=store href=$store_url >MongoDB</a>
+<a target=store href=/store/latest >latest</a>
|
<a target=client href=/nmap >nmap</a>
<a target=client href=/client >client</a>
|
;
- } elsif ( $path =~ m{^/store/query} ) {
+ } elsif ( $path =~ m{^/store/latest} ) {
print $client ok
, qq|
<style type=text/css>
delete( $o->{_id} );
if ( ! @cols ) {
- @cols = keys %$p;
+ #@cols = keys %$p;
+ @cols = qw( time name );
print $client qq|<tr><th>|
, join(qq|</th><th>|, @cols)
, qq|</th><th></th></tr>|
}
# XXX sigh, dump dies if we don't do this
- delete $o->{$_} foreach ( grep { ! defined $o->{$_} } keys %$o );
+# delete $o->{$_} foreach ( grep { ! defined $o->{$_} } keys %$o );
- print $client qq|<tr$s1><td>|
- , join(qq|</td><td>|, map { $p->{$_} } @cols )
- , qq|</td><td><pre>|
- , dump( $o )
- , qq|</pre></td></tr>\n|
+ print $client qq|<tr$s1>|
+ , strftime( qq|<td title="%Y-%m-%d">%H:%M:%S</td>|, localtime($p->{time}) )
+ , map { qq|<td>$_<td>| } ( $p->{name} , html::pre_dump($o) )
+ , qq|</tr>\n|
;
( $s1, $s2 ) = ( $s2, $s1 );
});