--- lib/PXElator/httpd.pm 2009/08/13 13:06:18 216 +++ lib/PXElator/httpd.pm 2009/08/16 00:03:30 225 @@ -24,6 +24,7 @@
@@ -49,6 +50,8 @@ use kvm; use browser; use network; +use ip; +use wireshark; use CouchDB; @@ -136,7 +139,7 @@ if ( -e $proc ) { $html .= qq|$pid|; if ( $debug ) { - $html .= qq| ?|; + $html .= qq| ?| if $name->can('start'); $debug_proc .= qq|$proc| @@ -145,15 +148,18 @@ ; } - if ( $name->can('start_fork') ) { - $html .= qq| $_| foreach $name->start_fork; + if ( $name->can('fork_if_active') ) { + $html .= qq| $_| foreach $name->fork_if_active; } if ( $name->can('actions') ) { - $html .= qq| $_| foreach $name->actions; + $html .= qq| $_| foreach $name->actions; } } else { - $html .= qq|restart $pid exited|; + $html .= qq|restart $pid exited| if $name->can('start'); + if ( $name->can('fork_actions') ) { + $html .= qq| $_| foreach $name->fork_actions; + } } push @rows, ( $name => $html ); @@ -266,6 +272,11 @@ ) ; } + } elsif ( $path =~ m{^/ip/?(\w+)?} ) { + print $client ok + , join("\n", map { qq|$_| } ( qw/link addr route neigh ntable tunnel maddr mroute xfrm/ )) + , ip::html( $1 ) + ; } elsif ( $path =~ m{^/our/(\w+)/(\S+)} ) { eval 'our $' . $1 . ' = ' . $2; warn $@ if $@;