63 |
use ping; |
use ping; |
64 |
use wol; |
use wol; |
65 |
|
|
66 |
use CouchDB; |
use store; |
67 |
|
|
68 |
|
|
69 |
sub menu { |
sub menu { |
117 |
my $buff; |
my $buff; |
118 |
my $pos = 0; |
my $pos = 0; |
119 |
|
|
120 |
CouchDB::audit( 'static', { pid => $$, path => $path, type => $type, size => $size, block => $block, peerhost => $client->peerhost }); |
store::audit( 'static', { pid => $$, path => $path, type => $type, size => $size, block => $block, peerhost => $client->peerhost }); |
121 |
|
|
122 |
progress_bar::start; |
progress_bar::start; |
123 |
|
|
150 |
|
|
151 |
server->refresh; |
server->refresh; |
152 |
|
|
153 |
CouchDB::audit( 'request', { path => $path, param => $param, peerhost => $client->peerhost } ); |
store::audit( 'request', { path => $path, param => $param, peerhost => $client->peerhost } ); |
154 |
|
|
155 |
$title = $path; |
$title = $path; |
156 |
|
|
356 |
|
|
357 |
my $conf = client::all_conf( $ip ); |
my $conf = client::all_conf( $ip ); |
358 |
my $mac = delete $conf->{mac} || ''; |
my $mac = delete $conf->{mac} || ''; |
359 |
|
my $dev = $arp->{$mac}; |
360 |
|
|
361 |
next unless $arp->{$mac} || $param->{all}; |
next unless $dev || $param->{all}; |
362 |
|
|
363 |
my $style |
my $style |
364 |
= 'style="color:' |
= 'style="color:' |
370 |
my $ip_text = qq|<tt>$ip</tt>|; |
my $ip_text = qq|<tt>$ip</tt>|; |
371 |
$ip_text = qq|<tt><b>$ip</b></tt>| if ip::in_dhcp_range($ip); |
$ip_text = qq|<tt><b>$ip</b></tt>| if ip::in_dhcp_range($ip); |
372 |
|
|
373 |
|
$dev = qq|<tt>$dev</tt>| if $dev; |
374 |
|
|
375 |
push @clients |
push @clients |
376 |
, qq|<a $style name=$ip target=client href=/client/$ip>$ip_text</a>| |
, qq|<a $style name=$ip target=client href=/client/$ip>$ip_text</a>| |
377 |
, format::mac( $mac => 'html' ) |
, format::mac( $mac => 'html' ) |
378 |
, $arp->{$mac} |
, $dev |
379 |
, delete $conf->{hostname} |
, delete $conf->{hostname} |
380 |
, html::conf( $ip, $conf, 'inline' ) |
, html::conf( $ip, $conf, 'inline' ) |
381 |
; |
; |