232 |
'mac' => format::mac( $mac => 'html' ), |
'mac' => format::mac( $mac => 'html' ), |
233 |
'deploy' => html::select( 'deploy', $deploy, config::available ) |
'deploy' => html::select( 'deploy', $deploy, config::available ) |
234 |
); |
); |
235 |
$deploy = qq|<h2>PXElinux</h2>| . html::pre( config::for_ip( $ip ) ); |
if ( my $pxelinux = config::for_ip( $ip ) ) { |
236 |
|
$deploy = qq|<h2>PXElinux</h2>| . html::pre( $pxelinux ); |
237 |
|
} |
238 |
} |
} |
239 |
|
|
240 |
print $client ok |
print $client ok |
263 |
|
|
264 |
print $client ok |
print $client ok |
265 |
, qq|<h2>Clients on $server::ip</h2>| |
, qq|<h2>Clients on $server::ip</h2>| |
266 |
, html::table( -5, |
, html::table( -6, |
267 |
'ip', 'mac', 'hostname', 'deploy', 'arp', |
'ip', 'mac', 'arp', 'hostname', 'deploy', 'conf', |
268 |
map { |
map { |
269 |
my $ip = $_; |
my $ip = $_; |
270 |
my $mac = client::mac_from_ip $ip; |
my $conf = client::all_conf( $ip ); |
271 |
my $arp = $arp->{ $mac }; |
my $mac = delete $conf->{mac} || ''; |
|
$arp = $arp ? $arp->[1] : ''; |
|
|
$arp =~ s{$ip}{}; |
|
272 |
( |
( |
273 |
qq|<a href=/client/$ip>$ip</a>| |
qq|<a href=/client/$ip>$ip</a>| |
274 |
, format::mac( $mac => 'html' ) |
, format::mac( $mac => 'html' ) |
275 |
, client::conf( $ip, 'hostname' ) |
, ( $arp->{$mac} ? $arp->{$mac}->[1] : '' ) |
276 |
, html::tt( client::conf( $ip, 'deploy' ) ) |
, delete $conf->{hostname} |
277 |
, $arp |
, delete $conf->{deploy} |
278 |
|
, html::pre_dump( $conf ) |
279 |
); |
); |
280 |
} |
} |
281 |
sort { ip::to_int($a) cmp ip::to_int($b) } |
sort { ip::to_int($a) cmp ip::to_int($b) } |