ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/myhttpd/diridx.pl
(Generate patch)

Comparing Coro/myhttpd/diridx.pl (file contents):
Revision 1.18 by root, Fri Nov 30 03:02:56 2001 UTC vs.
Revision 1.19 by root, Fri Nov 30 05:11:23 2001 UTC

214client-id <b>$self->{remote_id}</b>, client country <b>$self->{country}</b>;<br /> 214client-id <b>$self->{remote_id}</b>, client country <b>$self->{country}</b>;<br />
215<h2>Queue Statistics</h2> 215<h2>Queue Statistics</h2>
216<ul> 216<ul>
217EOF 217EOF
218 218
219 my @queuename = ("Small Queue", "Large Queue"); 219 for (
220 for (@::transfers) { 220 ["small files queue", $queue_small],
221 my $name = shift @queuename; 221 ["large files queue", $queue_large],
222 ["misc files queue" , $queue_index],
223 ) {
224 my ($name, $queue) = @$_;
222 if ($_->waiters) { 225 if ($queue->waiters) {
226 if (0) {
223 $content .= "<li>$name<table border='1' width='100%'><tr><th>Remote ID</th><th>CN</th><th>Waiting</th><th>URI</th></tr>"; 227 $content .= "<li>$name<table border='1' width='100%'><tr><th>Remote ID</th><th>CN</th><th>Waiting</th><th>URI</th></tr>";
224 for ($_->waiters) { 228 for ($queue->waiters) {
225 if (defined $_) { 229 if (defined $queue) {
226 my $conn = $_->{conn}; 230 my $conn = $queue->{conn};
227 my $time = format_time ($::NOW - $conn->{time}); 231 my $time = format_time ($::NOW - $conn->{time});
228 $content .= "<tr>". 232 $content .= "<tr>".
229 "<td>$conn->{remote_id}</td>". 233 "<td>$conn->{remote_id}</td>".
230 "<td>$conn->{country}</td>". 234 "<td>$conn->{country}</td>".
231 "<td>$time</td>". 235 "<td>$time</td>".
232 "<td>".escape_html($conn->{name})."</td>". 236 "<td>".escape_html($conn->{name})."</td>".
233 "</tr>"; 237 "</tr>";
234 } else { 238 } else {
235 $content .= "<tr><td colspan='4'>premature ejaculation</td></tr>"; 239 $content .= "<tr><td colspan='4'>premature ejaculation</td></tr>";
240 }
236 } 241 }
237 }
238 $content .= "</table></li>"; 242 $content .= "</table></li>";
243 } else {
244 my @waiters = grep defined $_, $queue->waiters;
245 $content .= "<li>$name<br />(".(scalar @waiters).
246 " client(s), waiting since "
247 .(format_time $::NOW - ($waiters[0]{conn}{time} || $::NOW)).
248 ")</li>";
249 }
239 } else { 250 } else {
240 $content .= "<li>$name<br />(empty)</li>"; 251 $content .= "<li>$name<br />(empty)</li>";
241 } 252 }
242 } 253 }
243 254

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines