23 |
<div style="font-size: 80%; color: #888"> |
<div style="font-size: 80%; color: #888"> |
24 |
<a href=/>home</a> |
<a href=/>home</a> |
25 |
<a href=/server>server</a> |
<a href=/server>server</a> |
26 |
|
<a href=/client>client</a> |
27 |
</div> |
</div> |
28 |
|
|
29 |
}} |
}} |
48 |
use html; |
use html; |
49 |
our $static_pids; |
our $static_pids; |
50 |
use progress_bar; |
use progress_bar; |
51 |
|
use config; |
52 |
|
|
53 |
sub static { |
sub static { |
54 |
my ($client,$path) = @_; |
my ($client,$path) = @_; |
224 |
, menu() |
, menu() |
225 |
, html::table( 2, map { ( $_, eval '$server::'.$_ ) } ( 'ip', 'netmask', 'ip_from', 'ip_to', 'domain_name', 'base_dir' ) ) |
, html::table( 2, map { ( $_, eval '$server::'.$_ ) } ( 'ip', 'netmask', 'ip_from', 'ip_to', 'domain_name', 'base_dir' ) ) |
226 |
; |
; |
227 |
|
} elsif ( $path =~ m{^/client} ) { |
228 |
|
my $ip = $client->peerhost; |
229 |
|
my $hostname = server::shared( "hostname/$ip", $param->{hostname} ); |
230 |
|
my $deploy = server::shared( "deploy/$ip", $param->{deploy} ); |
231 |
|
print $client $ok |
232 |
|
, menu() |
233 |
|
, qq|<form method=get>| |
234 |
|
, html::table( 2, |
235 |
|
'ip' => $ip, |
236 |
|
'hostname' => qq|<input type=text name=hostname value=$hostname>|, |
237 |
|
'deploy' => html::select( 'deploy', $deploy, config::available ), |
238 |
|
) |
239 |
|
, qq|<input type=submit value=change></form><pre>| |
240 |
|
, config::for_ip( $ip ) |
241 |
|
, qq|</pre>| |
242 |
|
; |
243 |
} elsif ( $path =~ m{^/our/(\w+)/(\S+)} ) { |
} elsif ( $path =~ m{^/our/(\w+)/(\S+)} ) { |
244 |
eval 'our $' . $1 . ' = ' . $2; |
eval 'our $' . $1 . ' = ' . $2; |
245 |
warn $@ if $@; |
warn $@ if $@; |