--- lib/PXElator/httpd.pm 2009/08/05 13:25:19 148 +++ lib/PXElator/httpd.pm 2009/08/05 13:25:55 149 @@ -18,6 +18,15 @@ #use JSON; use IO::Socket::INET; +sub menu {qq{ + +
+home +server +
+ +}} + our $pids; $pids = { httpd => $$ } unless defined $pids; # keep pids on refresh @@ -149,9 +158,6 @@ $pids->{screen} ? qq|start| : qq|start screen first|; my @rows = ( - 'ip', html::tt( $server::ip ), - 'netmask', html::tt( $server::netmask ), - 'debug', qq|$debug|, ); @@ -204,12 +210,18 @@ } print $client $ok + , menu() , html::table( 2, @rows ) , $below_table , html::tabs( log::mac_changes ) , $debug_proc ; + } elsif ( $path =~ m{^/server} ) { + print $client $ok + , menu() + , html::table( 2, map { ( $_, eval '$server::'.$_ ) } ( 'ip', 'netmask', 'ip_from', 'ip_to', 'domain_name', 'base_dir' ) ) + ; } elsif ( $path =~ m{^/our/(\w+)/(\S+)} ) { eval 'our $' . $1 . ' = ' . $2; warn $@ if $@; @@ -283,13 +295,7 @@ warn "500 $request"; } - print $client qq{ -
- reload - index - exit -
- } if $client->connected; + print $client menu() if $client->connected; }