/[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 493 by dpavlin, Mon Jan 25 18:30:47 2010 UTC revision 514 by dpavlin, Wed Jul 21 18:29:33 2010 UTC
# Line 293  warn "XXX pids = ", dump( $daemons::pids Line 293  warn "XXX pids = ", dump( $daemons::pids
293                  my ( $s1,$s2 ) = ( ' class=z', '' );                  my ( $s1,$s2 ) = ( ' class=z', '' );
294                  my @cols;                  my @cols;
295    
296                  store::query( sub {                  my $from_t = $param->{from_t};
297    
298                    store::query( $from_t, sub {
299                          my $o = shift;                          my $o = shift;
300                          my $p = delete( $o->{package} );                          my $p = delete( $o->{package} );
301                          delete( $o->{_id} );                          delete( $o->{_id} );
# Line 316  warn "XXX pids = ", dump( $daemons::pids Line 318  warn "XXX pids = ", dump( $daemons::pids
318                                  , qq|</tr>\n|                                  , qq|</tr>\n|
319                          ;                          ;
320                          ( $s1, $s2 ) = ( $s2, $s1 );                          ( $s1, $s2 ) = ( $s2, $s1 );
321                            $from_t = $p->{time};
322                  });                  });
323                  print $client qq|</table>|;                  print $client qq|</table>|,
324                            qq|<a href="/store/latest?from_t=$from_t">more</a>|
325                    ;
326    
327          } elsif ( $path =~ m!^/client(?:/$RE{net}{IPv4}{-keep})?! ) {          } elsif ( $path =~ m!^/client(?:/$RE{net}{IPv4}{-keep})?! ) {
328                  my $ip = $1;                  my $ip = $1;
# Line 413  warn "XXX pids = ", dump( $daemons::pids Line 418  warn "XXX pids = ", dump( $daemons::pids
418                                  my $mac = delete $conf->{mac} || '';                                  my $mac = delete $conf->{mac} || '';
419                                  my $dev = $arp->{$mac};                                  my $dev = $arp->{$mac};
420    
421                                  next unless $dev || $param->{all};                                  my $in_dhcp_range = ip::in_dhcp_range($ip);
422    
423                                    next unless $dev || $param->{all} || $in_dhcp_range;
424    
425                                  my $style                                  my $style
426                                          = 'style="color:'                                          = 'style="color:'
# Line 423  warn "XXX pids = ", dump( $daemons::pids Line 430  warn "XXX pids = ", dump( $daemons::pids
430    
431                                  $style ||= '';                                  $style ||= '';
432                                  my $ip_text = qq|<tt>$ip</tt>|;                                  my $ip_text = qq|<tt>$ip</tt>|;
433                                  $ip_text = qq|<tt><b>$ip</b></tt>| if ip::in_dhcp_range($ip);                                  $ip_text = qq|<tt><b>$ip</b></tt>| if $in_dhcp_range;
434    
435                                  $dev = qq|<tt>$dev</tt>| if $dev;                                  $dev = qq|<tt>$dev</tt>| if $dev;
436    

Legend:
Removed from v.493  
changed lines
  Added in v.514

  ViewVC Help
Powered by ViewVC 1.1.26