--- lib/PXElator/httpd.pm 2009/08/27 16:21:45 308
+++ lib/PXElator/httpd.pm 2009/08/27 16:47:42 309
@@ -232,7 +232,9 @@
'mac' => format::mac( $mac => 'html' ),
'deploy' => html::select( 'deploy', $deploy, config::available )
);
- $deploy = qq|
PXElinux
| . html::pre( config::for_ip( $ip ) );
+ if ( my $pxelinux = config::for_ip( $ip ) ) {
+ $deploy = qq|PXElinux
| . html::pre( $pxelinux );
+ }
}
print $client ok
@@ -261,20 +263,19 @@
print $client ok
, qq|Clients on $server::ip
|
- , html::table( -5,
- 'ip', 'mac', 'hostname', 'conf', 'arp',
+ , html::table( -6,
+ 'ip', 'mac', 'arp', 'hostname', 'deploy', 'conf',
map {
my $ip = $_;
- my $mac = client::mac_from_ip $ip;
- my $arp = $arp->{ $mac };
- $arp = $arp ? $arp->[1] : '';
- $arp =~ s{$ip}{};
+ my $conf = client::all_conf( $ip );
+ my $mac = delete $conf->{mac} || '';
(
qq|$ip|
, format::mac( $mac => 'html' )
- , client::conf( $ip, 'hostname' )
- , html::pre_dump( client::all_conf( $ip ) )
- , $arp
+ , ( $arp->{$mac} ? $arp->{$mac}->[1] : '' )
+ , delete $conf->{hostname}
+ , delete $conf->{deploy}
+ , html::pre_dump( $conf )
);
}
sort { ip::to_int($a) cmp ip::to_int($b) }