/[pxelator]/lib/PXElator/httpd.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /lib/PXElator/httpd.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 208 by dpavlin, Wed Aug 12 23:59:01 2009 UTC revision 216 by dpavlin, Thu Aug 13 13:06:18 2009 UTC
# Line 203  sub get_request { Line 203  sub get_request {
203    
204                          my $deploy;                          my $deploy;
205    
206                          if ( my $mac = client::mac( $ip ) ) {                          if ( my $mac = client::mac_from_ip( $ip ) ) {
207                                  $deploy = client::conf( $ip, 'deploy' => $param->{deploy} );                                  $deploy = client::conf( $ip, 'deploy' => $param->{deploy} );
208                                  push @table, (                                  push @table, (
209                                          'mac' => $mac,                                          'mac' => format::mac( $mac => 'html' ),
210                                          'deploy' => html::select( 'deploy', $deploy, config::available )                                          'deploy' => html::select( 'deploy', $deploy, config::available )
211                                  );                                  );
212                                  $deploy = qq|<h2>PXElinux</h2>| . html::pre( config::for_ip( $ip ) );                                  $deploy = qq|<h2>PXElinux</h2>| . html::pre( config::for_ip( $ip ) );
# Line 243  sub get_request { Line 243  sub get_request {
243                                          map {                                          map {
244                                                  my $ip = $_;                                                  my $ip = $_;
245                                                  $ip =~ s{^.+/ip/}{};                                                  $ip =~ s{^.+/ip/}{};
246                                                  my $arp = $arp->{ client::mac $ip, 'clean' };                                                  my $mac = client::mac_from_ip $ip;
247                                                    my $arp = $arp->{ $mac };
248                                                  $arp = $arp ? $arp->[1] : '';                                                  $arp = $arp ? $arp->[1] : '';
249                                                  $arp =~ s{$ip}{};                                                  $arp =~ s{$ip}{};
250                                                  (                                                  (
251                                                          qq|<a href=/client/$ip>$ip</a>|                                                          qq|<a href=/client/$ip>$ip</a>|
252                                                          , client::conf( $ip, 'hostname' )                                                          , client::conf( $ip, 'hostname' )
253                                                          , client::mac( $ip )                                                          , format::mac( $mac => 'html' )
254                                                          , html::tt( client::conf( $ip, 'deploy' ) )                                                          , html::tt( client::conf( $ip, 'deploy' ) )
255                                                          , $arp                                                          , $arp
256                                                  );                                                  );
# Line 260  sub get_request { Line 261  sub get_request {
261                                  , html::table( -3, 'mac', 'dev', 'ip',                                  , html::table( -3, 'mac', 'dev', 'ip',
262                                          map {                                          map {
263                                                  my $c = $arp->{$_};                                                  my $c = $arp->{$_};
264                                                  ( html::tt( $_ ), $c->[1], $c->[0] )                                                  ( format::mac( $_ => 'html' ), $c->[1], $c->[0] )
265                                          } sort keys %$arp                                          } sort keys %$arp
266                                  )                                  )
267                                  ;                                  ;

Legend:
Removed from v.208  
changed lines
  Added in v.216

  ViewVC Help
Powered by ViewVC 1.1.26