/[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 471 by dpavlin, Tue Jan 5 00:07:35 2010 UTC revision 482 by dpavlin, Sat Jan 23 18:31:14 2010 UTC
# Line 63  use nmap; Line 63  use nmap;
63  use ping;  use ping;
64  use wol;  use wol;
65    
66  use CouchDB;  use store;
67    
68    
69  sub menu {  sub menu {
# Line 117  sub static { Line 117  sub static {
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    
# Line 150  sub get_request { Line 150  sub get_request {
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    
# Line 356  warn "XXX pids = ", dump( $daemons::pids Line 356  warn "XXX pids = ", dump( $daemons::pids
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:'
# Line 369  warn "XXX pids = ", dump( $daemons::pids Line 370  warn "XXX pids = ", dump( $daemons::pids
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                                  ;                                  ;

Legend:
Removed from v.471  
changed lines
  Added in v.482

  ViewVC Help
Powered by ViewVC 1.1.26