Commit 5852e768 authored by gerv%gerv.net's avatar gerv%gerv.net

Bug 218569 - Clean up reporting UI. Patch by gerv; r=jouni, a=justdave.

parent b23c12c2
...@@ -287,7 +287,7 @@ if ($action eq "wrap") { ...@@ -287,7 +287,7 @@ if ($action eq "wrap") {
$vars->{'imagebase'} = $cgi->canonicalise_query( $vars->{'imagebase'} = $cgi->canonicalise_query(
$tbl_field, "action", "ctype", "format", "width", "height"); $tbl_field, "action", "ctype", "format", "width", "height");
$vars->{'switchbase'} = $cgi->canonicalise_query( $vars->{'switchbase'} = $cgi->canonicalise_query(
"action", "ctype", "format", "width", "height"); "query_format", "action", "ctype", "format", "width", "height");
$vars->{'data'} = \%data; $vars->{'data'} = \%data;
} }
elsif ($action eq "plot") { elsif ($action eq "plot") {
......
...@@ -165,8 +165,8 @@ ...@@ -165,8 +165,8 @@
<a href="query.cgi?[% switchbase %]&amp;format=report-table">Edit <a href="query.cgi?[% switchbase %]&amp;format=report-table">Edit
this report</a> this report</a>
[% ELSE %] [% ELSE %]
<a href="query.cgi?[% switchbase %]&amp;format=report-graph&amp; <a href="query.cgi?[% switchbase %]&amp;chart_format=
chart_format=[% format %]&amp;cumulate=[% cumulate %]"> [% format %]&amp;format=report-graph&amp;cumulate=[% cumulate %]">
Edit this report Edit this report
</a> </a>
[% END %] [% END %]
......
...@@ -27,19 +27,34 @@ ...@@ -27,19 +27,34 @@
[% PROCESS global/variables.none.tmpl %] [% PROCESS global/variables.none.tmpl %]
[% PROCESS global/header.html.tmpl [% PROCESS global/header.html.tmpl
title = "Generate Report" title = "Generate Graphical Report"
onload = "selectProduct(document.forms['reportform']);" onload = "selectProduct(document.forms['reportform']);chartTypeChanged()"
%] %]
[% PROCESS "search/search-report-select.html.tmpl" %] [% PROCESS "search/search-report-select.html.tmpl" %]
<p> <p>
Produce a pictorial graph of [% terms.bug %] counts by choosing one or more fields as Choose one or more fields as your axes, and then refine your set of
your axes, and then refining your set of [% terms.bugs %] using the rest of the form. [% terms.bugs %] using the rest of the form.
If you choose a third axis, it will be represented by multiple tables of data.
Note: vertical axis settings will be ignored for pie charts.
</p> </p>
<script type="text/javascript"><!--
[%# The Y-axis fields are not used for pie charts %]
function chartTypeChanged() {
// format[2] is the pie chart radio button
if (document.reportform.format[2].checked == true) {
document.reportform.y_axis_field.disabled = true;
document.reportform.cumulate[0].disabled = true;
document.reportform.cumulate[1].disabled = true;
} else {
document.reportform.y_axis_field.disabled = false;
document.reportform.cumulate[0].disabled = false;
document.reportform.cumulate[1].disabled = false;
}
}
// -->
</script>
[% button_name = "Generate Report" %] [% button_name = "Generate Report" %]
<form method="get" action="report.cgi" name="reportform"> <form method="get" action="report.cgi" name="reportform">
...@@ -48,6 +63,7 @@ ...@@ -48,6 +63,7 @@
<tr> <tr>
<td valign="middle"> <td valign="middle">
<b>Vertical Axis:</b><br> <b>Vertical Axis:</b><br>
<noscript><small>(not for pie charts)</small><br></noscript>
[% PROCESS select name = 'y_axis_field' %]<br> [% PROCESS select name = 'y_axis_field' %]<br>
<br> <br>
<b>Plot Data Sets:</b><br> <b>Plot Data Sets:</b><br>
...@@ -56,8 +72,7 @@ ...@@ -56,8 +72,7 @@
Individually<br> Individually<br>
<input type="radio" name="cumulate" value="1" <input type="radio" name="cumulate" value="1"
[% " checked" IF default.cumulate.0 == "1" %]> [% " checked" IF default.cumulate.0 == "1" %]>
Added Summed
</td> </td>
<td width="150" height="150"> <td width="150" height="150">
<table border="1" width="100%" height="100%"> <table border="1" width="100%" height="100%">
...@@ -80,6 +95,7 @@ ...@@ -80,6 +95,7 @@
[% FOREACH chart_format = chart_formats %] [% FOREACH chart_format = chart_formats %]
<input type="radio" name="format" <input type="radio" name="format"
value="[% chart_format.name FILTER html %]" value="[% chart_format.name FILTER html %]"
onchange="chartTypeChanged()"
[% " checked" IF default.chart_format.0 == chart_format.name %]> [% " checked" IF default.chart_format.0 == chart_format.name %]>
[% chart_format.description FILTER html %]<br> [% chart_format.description FILTER html %]<br>
[% END %] [% END %]
......
...@@ -27,16 +27,15 @@ ...@@ -27,16 +27,15 @@
[% PROCESS global/variables.none.tmpl %] [% PROCESS global/variables.none.tmpl %]
[% PROCESS global/header.html.tmpl [% PROCESS global/header.html.tmpl
title = "Generate Report" title = "Generate Tabular Report"
onload = "selectProduct(document.forms['reportform']);" onload = "selectProduct(document.forms['reportform']);"
%] %]
[% PROCESS "search/search-report-select.html.tmpl" %] [% PROCESS "search/search-report-select.html.tmpl" %]
<p> <p>
Produce a table of [% terms.bug %] counts by choosing one or more fields as your axes, Choose one or more fields as your axes, and then refine your set of
and then refining your set of [% terms.bugs %] using the rest of the form. [% terms.bugs %] using the rest of the form.
If you choose a third axis, it will be represented by multiple tables of data.
</p> </p>
[% button_name = "Generate Report" %] [% button_name = "Generate Report" %]
...@@ -51,12 +50,6 @@ ...@@ -51,12 +50,6 @@
<b>Horizontal Axis:</b> <b>Horizontal Axis:</b>
[% PROCESS select name = 'x_axis_field' %] [% PROCESS select name = 'x_axis_field' %]
</td> </td>
<td>&nbsp;&nbsp;</td>
<td rowspan="2">
<b>Format:</b><br>
<input type="radio" name="ctype" value="html" checked="checked">HTML<br>
<input type="radio" name="ctype" value="csv">CSV
</td>
</tr> </tr>
<tr> <tr>
......
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