1999-11-17 01:10:11 +03:00
|
|
|
#!/usr/bin/perl -w
|
|
|
|
#
|
1999-11-17 23:42:57 +03:00
|
|
|
# The contents of this file are subject to the Mozilla Public
|
1999-11-17 01:10:11 +03:00
|
|
|
# License Version 1.1 (the "License"); you may not use this file
|
|
|
|
# except in compliance with the License. You may obtain a copy of
|
1999-11-17 23:42:57 +03:00
|
|
|
# the License at http://www.mozilla.org/MPL/
|
|
|
|
#
|
1999-11-17 01:10:11 +03:00
|
|
|
# Software distributed under the License is distributed on an "AS
|
|
|
|
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
|
|
|
# implied. See the License for the specific language governing
|
|
|
|
# rights and limitations under the License.
|
1999-11-17 23:42:57 +03:00
|
|
|
#
|
|
|
|
# The Original Code is Mozilla Leak-o-Matic.
|
|
|
|
#
|
|
|
|
# The Initial Developer of the Original Code is Netscape
|
|
|
|
# Communications Corp. Portions created by Netscape Communucations
|
|
|
|
# Corp. are Copyright (C) 1999 Netscape Communications Corp. All
|
1999-11-17 01:10:11 +03:00
|
|
|
# Rights Reserved.
|
1999-11-17 23:42:57 +03:00
|
|
|
#
|
|
|
|
# Contributor(s):
|
|
|
|
# Chris Waterson <waterson@netscape.com>
|
1999-11-18 01:14:21 +03:00
|
|
|
#
|
1999-11-18 01:19:07 +03:00
|
|
|
# $Id: logs.cgi,v 1.6 1999-11-17 22:19:07 leaf%mozilla.org Exp $
|
1999-11-18 01:14:21 +03:00
|
|
|
#
|
1999-11-17 01:10:11 +03:00
|
|
|
|
|
|
|
#
|
|
|
|
# ``Front door'' script that shows all of the logs that are
|
|
|
|
# available for perusal
|
|
|
|
#
|
|
|
|
|
|
|
|
use 5.004;
|
|
|
|
use strict;
|
|
|
|
use CGI;
|
|
|
|
use POSIX;
|
|
|
|
|
|
|
|
$::query = new CGI();
|
1999-11-17 01:19:23 +03:00
|
|
|
$::logdir = $::query->param('logdir');
|
|
|
|
$::logdir = 'data' unless $::logdir; # default is 'data' subdir
|
1999-11-17 01:10:11 +03:00
|
|
|
|
|
|
|
print $::query->header;
|
|
|
|
print $::query->start_html("Leak-o-Matic");
|
|
|
|
|
|
|
|
print qq{
|
|
|
|
<table border='0' cellpadding='0' cellspacing='0' width='100%'>
|
|
|
|
<tr>
|
|
|
|
<td bgcolor='#000000' valign='top'>
|
|
|
|
<img src='http://www.mozilla.org/images/mozilla-banner.gif'
|
|
|
|
border="0" alt='mozilla.org' href='http://www.mozilla.org/'>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<center>
|
|
|
|
<h1>Leak-o-Matic</h1>
|
|
|
|
</center>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
Welcome to the Marvelous Leak-o-Matic. Listed below are the leak logs
|
|
|
|
that are currently available for your perusal.
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<div align='center'>
|
1999-11-17 01:15:26 +03:00
|
|
|
<table border='0' cellpadding='2' cellspacing='0' bgcolor='#EEEEEE'>
|
|
|
|
<tr><td bgcolor='#DDDDDD' align='center' colspan='3'><b>Leak-o-Matic Logs</b></td></tr>
|
1999-11-17 01:10:11 +03:00
|
|
|
|
|
|
|
};
|
|
|
|
|
1999-11-18 01:14:21 +03:00
|
|
|
# ``ls'' the directory, ``-1r'' returns it sorted by name, reversed, so
|
1999-11-17 01:10:11 +03:00
|
|
|
# the most recent logs will be at the top.
|
|
|
|
|
1999-11-18 01:14:21 +03:00
|
|
|
ZIP: foreach (qx/ls -1r $::logdir\/*.zip/) {
|
1999-11-17 01:10:11 +03:00
|
|
|
chomp;
|
|
|
|
|
|
|
|
next ZIP unless (/(\d\d\d\d)(\d\d)(\d\d)/);
|
|
|
|
|
|
|
|
my ($year, $month, $day) = ($1, $2, $3);
|
|
|
|
|
|
|
|
print "<tr>\n";
|
|
|
|
print "<td>$month/$day/$year</td>\n";
|
|
|
|
print "<td><a href='leaks.cgi?log=$_'>Leaks</a></td>\n";
|
|
|
|
print "<td><a href='bloat-log.cgi?log=$_'>Bloat Log</a></td>\n";
|
|
|
|
print "</tr>\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
print qq{
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
For more information on how to use the Leak-o-Matic, see the
|
|
|
|
|
1999-11-17 01:15:26 +03:00
|
|
|
<a href="instructions.html">instructions</a>.
|
1999-11-17 01:10:11 +03:00
|
|
|
</p>
|
|
|
|
|
|
|
|
};
|
|
|
|
|
1999-11-18 01:19:07 +03:00
|
|
|
print '<small>$Id: logs.cgi,v 1.6 1999-11-17 22:19:07 leaf%mozilla.org Exp $</small>';
|
1999-11-17 01:10:11 +03:00
|
|
|
print $::query->end_html;
|
|
|
|
|