--- lib/PXElator/httpd.pm 2009/08/16 22:24:22 231 +++ lib/PXElator/httpd.pm 2009/08/18 12:46:41 251 @@ -125,14 +125,14 @@ warn "static $found" if $debug; } elsif ( $path eq '/' ) { - my @rows = ( - 'debug', qq|$debug|, - ); + my @rows; my $debug_proc = ''; +warn "XXX pids = ", dump( $daemons::pids ); + foreach my $name ( sort keys %$daemons::pids ) { - my $pid = $daemons::pids->{$name} || next; + my $pid = $daemons::pids->{$name}; # || next; my $html; @@ -158,12 +158,19 @@ $html .= qq| $_| foreach $name->actions; } } else { - $html .= qq|restart $pid exited| if $name->can('start'); + if ( $pid =~ m{^\d+$} ) { + $html .= qq|$pid exited | + } else { + $html .= qq|$pid |; + } + $html .= qq|restart| if $pid || $name->can('start'); if ( $name->can('fork_actions') ) { $html .= qq| $_| foreach $name->fork_actions; } } + die "no html generated" unless $html; + push @rows, ( $name => $html ); } @@ -191,7 +198,12 @@ } elsif ( $path =~ m{^/server} ) { print $client ok - , html::table( 2, map { ( $_, html::tt eval '$server::'.$_ ) } ( 'ip', 'netmask', 'ip_from', 'ip_to', 'domain_name', 'base_dir', 'conf' ) ) + , html::table( 2, + 'debug' => qq|$debug|, + map { + ( $_, html::tt eval '$server::'.$_ ) + } ( 'ip', 'netmask', 'ip_from', 'ip_to', 'domain_name', 'base_dir', 'conf' ) + ) ; } elsif ( $path =~ m!^/client(?:/$RE{net}{IPv4}{-keep})?! ) { my $ip = $1 || $client->peerhost;