/[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 421 by dpavlin, Fri Sep 11 11:22:40 2009 UTC revision 433 by dpavlin, Mon Sep 14 21:11:23 2009 UTC
# Line 36  qq{ Line 36  qq{
36  </html>  </html>
37  }}  }}
38    
 sub menu {  
 qq{  
 <div style="font-size: 80%; color: #888">  
 <a href=/ target=/>home</a>  
 <a href=/server target=server>server</a>  
 <a href=/brctl target=brctl>brctl</a>  
 <a href=/ip target=ip>ip</a>  
 <a href=/nmap target=nmap>nmap</a>  
 <a href=/client target=client>client</a>  
 <a href=http://$server::ip:5984/_utils/ target=couchdb>couchdb</a>  
 </div>  
   
 }}  
   
39  our $port = 7777;  our $port = 7777;
40    
41  use server;  use server;
# Line 79  use wol; Line 65  use wol;
65    
66  use CouchDB;  use CouchDB;
67    
68    
69    sub menu {
70            my $couch_url = $url;
71            $couch_url =~ s{:\d+.+}{:5984/_utils/};
72    qq{
73    <div style="font-size: 80%; color: #888">
74    <a target=pids href=/ >home</a>
75    |
76    <a target=server href=/server >server</a>
77    <a target=server href=/brctl >brctl</a>
78    <a target=server href=/ip >ip</a>
79    |
80    <a target=couch href=$couch_url >couchdb</a>
81    |
82    <a target=client href=/nmap >nmap</a>
83    <a target=client href=/client >client</a>
84    </div>
85    
86    }}
87    
88    
89  sub static {  sub static {
90          my ($client,$path) = @_;          my ($client,$path) = @_;
91    
# Line 238  warn "XXX pids = ", dump( $daemons::pids Line 245  warn "XXX pids = ", dump( $daemons::pids
245                          , 'new_clients' => qq|<input type=text name=new_clients size=3 value="$server::new_clients">|                          , 'new_clients' => qq|<input type=text name=new_clients size=3 value="$server::new_clients">|
246                  );                  );
247    
248                  foreach my $editable ( 'ip', 'netmask', 'ip_from', 'ip_to', 'domain' ) {                  foreach my $editable ( 'ip', 'bcast', 'netmask', 'ip_from', 'ip_to', 'domain' ) {
249                          my $v = eval '$server::' . $editable;                          my $v = eval '$server::' . $editable;
250                          push @table, ( $editable, qq|<input type=text name=$editable value="$v">| );                          push @table, ( $editable, qq|<input type=text name=$editable value="$v">| );
251                  }                  }
# Line 359  warn "XXX pids = ", dump( $daemons::pids Line 366  warn "XXX pids = ", dump( $daemons::pids
366                                                  my $ip_text = qq|<tt>$ip</tt>|;                                                  my $ip_text = qq|<tt>$ip</tt>|;
367                                                  $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);
368                                                  (                                                  (
369                                                          qq|<a $style name=$ip target=$ip href=/client/$ip>$ip_text</a>|                                                          qq|<a $style name=$ip target=client href=/client/$ip>$ip_text</a>|
370                                                          , format::mac( $mac => 'html' )                                                          , format::mac( $mac => 'html' )
371                                                          , $arp->{$mac}                                                          , $arp->{$mac}
372                                                          , delete $conf->{hostname}                                                          , delete $conf->{hostname}

Legend:
Removed from v.421  
changed lines
  Added in v.433

  ViewVC Help
Powered by ViewVC 1.1.26