Commit 1a02e681 authored by cyeh%bluemartini.com's avatar cyeh%bluemartini.com

fix for 6682: Chart all bug states

patch submitted by gervase.markham@univ.ox.ac.uk (Gervase Markham)
parent 20aae4d3
...@@ -73,8 +73,8 @@ ConnectToDatabase(1); ...@@ -73,8 +73,8 @@ ConnectToDatabase(1);
quietly_check_login(); quietly_check_login();
print "Content-type: text/html\n"; print "Content-type: text/html\n";
#Changing attachment to inline to resolve 46897
#zach@zachlipton.com # Changing attachment to inline to resolve 46897 - zach@zachlipton.com
print "Content-disposition: inline; filename=bugzilla_report.html\n\n"; print "Content-disposition: inline; filename=bugzilla_report.html\n\n";
# If we're here for the first time, give a banner. Else respect the banner flag. # If we're here for the first time, give a banner. Else respect the banner flag.
...@@ -159,7 +159,14 @@ PutFooter() if $FORM{banner}; ...@@ -159,7 +159,14 @@ PutFooter() if $FORM{banner};
sub choose_product { sub choose_product {
my $product_popup = make_options (\@myproducts, $myproducts[0]); my $product_popup = make_options (\@myproducts, $myproducts[0]);
my $charts = $use_gd && -d $dir ? "<option value=\"show_chart\">Bug Charts" : "";
my $datafile = daily_stats_filename('-All-');
# Can we do bug charts?
my $do_charts = ($use_gd && -d $dir && -d $graph_dir &&
open(DATA, "$dir/$datafile"));
my $charts = $do_charts ? "<option value=\"show_chart\">Bug Charts" : "";
print <<FIN; print <<FIN;
<center> <center>
...@@ -187,18 +194,18 @@ FIN ...@@ -187,18 +194,18 @@ FIN
print <<FIN; print <<FIN;
$charts $charts
</select> </select>
<tr> </tr>
<td align=center><b>Chart datasets:</b></td>
<td align=center>
<select name="datasets" multiple size=5>
FIN FIN
my @datasets = (); if ($do_charts) {
print <<FIN;
<tr>
<td align=center><b>Chart datasets:</b></td>
<td align=center>
<select name="datasets" multiple size=5>
FIN
my $datafile = daily_stats_filename('-All-'); my @datasets = ();
if (! open(DATA, "$dir/$datafile")) {
die_politely("Couldn't read daily statistics file");
}
while (<DATA>) { while (<DATA>) {
if (/^# fields?: (.+)\s*$/) { if (/^# fields?: (.+)\s*$/) {
...@@ -217,9 +224,13 @@ FIN ...@@ -217,9 +224,13 @@ FIN
} }
print <<FIN; print <<FIN;
</select> </select>
</td> </td>
</tr> </tr>
FIN
}
print <<FIN;
<tr> <tr>
<td align=center><b>Switches:</b></td> <td align=center><b>Switches:</b></td>
<td align=left> <td align=left>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment