|
|
1 | use List::Util qw(sum); |
|
|
2 | |
1 | use Storable (); |
3 | use Storable (); |
2 | |
4 | |
3 | my $SD_VERSION = 1; |
5 | my $SD_VERSION = 1; |
4 | |
6 | |
5 | my $ignore = qr/ ^(?:robots.txt$|\.) /x; |
7 | my $ignore = qr/ ^(?:robots.txt$|\.) /x; |
… | |
… | |
143 | $stat .= "<td><a href='".escape_uri($_->[0])."'>$_->[0]</a><td align='right'>$_->[1]<td> "; |
145 | $stat .= "<td><a href='".escape_uri($_->[0])."'>$_->[0]</a><td align='right'>$_->[1]<td> "; |
144 | } |
146 | } |
145 | $stat .= "</table>"; |
147 | $stat .= "</table>"; |
146 | } |
148 | } |
147 | |
149 | |
|
|
150 | my $waiters = $::transfers->waiters*1; |
|
|
151 | my $avgtime = int (sum(@::wait_time) / @::wait_time); |
|
|
152 | |
148 | <<EOF; |
153 | <<EOF; |
149 | <html> |
154 | <html> |
150 | <head><title>$self->{uri}</title></head> |
155 | <head><title>$self->{uri}</title></head> |
151 | <body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#000080" alink="#ff0000"> |
156 | <body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#000080" alink="#ff0000"> |
152 | <h1>$data->{path}</h1> |
157 | <h1>$data->{path}</h1> |
153 | $data->{top} |
158 | $data->{top} |
154 | <small><div align="right"><tt>$self->{remote_id}/$self->{country} - $::conns connection(s) - uptime $uptime - myhttpd/$VERSION</tt></div></small> |
|
|
155 | <hr> |
159 | <hr /> |
|
|
160 | clients waiting for data transfer: $waiters<br /> |
|
|
161 | average waiting time until transfer starts: $avgtime seconds <small>(adjust your timeout values)</small><br /> |
|
|
162 | <small><div align="right"> |
|
|
163 | <tt>$self->{remote_id}/$self->{country} - $::conns connection(s) - uptime $uptime - myhttpd/$VERSION |
|
|
164 | </tt></div></small> |
|
|
165 | <hr /> |
156 | $stat |
166 | $stat |
157 | $data->{bot} |
167 | $data->{bot} |
158 | </body> |
168 | </body> |
159 | </html> |
169 | </html> |
160 | EOF |
170 | EOF |