272 |
|
|
273 |
} else { |
} else { |
274 |
|
|
275 |
my $arp = clinet::arp_mac_dev; |
my $arp = client::arp_mac_dev; |
276 |
|
my @ips = client::all_ips; |
277 |
|
|
278 |
|
my $ping; |
279 |
|
$ping = ping::fping( @ips ) if $param->{ping}; |
280 |
|
|
281 |
print $client ok |
print $client ok |
282 |
, qq|<h2>Clients on $server::ip</h2>| |
, qq|<h2>Clients on $server::ip</h2>| |
286 |
my $ip = $_; |
my $ip = $_; |
287 |
my $conf = client::all_conf( $ip ); |
my $conf = client::all_conf( $ip ); |
288 |
my $mac = delete $conf->{mac} || ''; |
my $mac = delete $conf->{mac} || ''; |
289 |
|
my $style; |
290 |
|
$style |
291 |
|
= 'style="color:' |
292 |
|
. ( $ping->{$ip} ? 'green' : 'red' ) |
293 |
|
. '"' |
294 |
|
if $ping; |
295 |
( |
( |
296 |
qq|<a name=$ip href=/client/$ip>$ip</a>| |
qq|<a $style name=$ip href=/client/$ip>$ip</a>| |
297 |
, format::mac( $mac => 'html' ) |
, format::mac( $mac => 'html' ) |
298 |
, $arp->{$mac} |
, $arp->{$mac} |
299 |
, delete $conf->{hostname} |
, delete $conf->{hostname} |
300 |
, delete $conf->{deploy} |
, delete $conf->{deploy} |
301 |
, ( %$conf ? html::pre_dump( $conf ) : qq|<a href=/nmap?scan=$ip>nmap</a>| ) |
, ( %$conf ? html::pre_dump( $conf ) : qq|<a href=/nmap?scan=$ip>nmap</a>| ) |
302 |
); |
); |
303 |
} client::all_ips |
} @ips |
304 |
) |
) |
305 |
; |
; |
306 |
|
print $client qq| |
307 |
|
<form method=get> |
308 |
|
<input type=submit name=ping value=ping> |
309 |
|
</form> |
310 |
|
|; |
311 |
} |
} |
312 |
} elsif ( $path =~ m{^/brctl} ) { |
} elsif ( $path =~ m{^/brctl} ) { |
313 |
print $client ok |
print $client ok |