Commit 867aef71 authored by gerv%gerv.net's avatar gerv%gerv.net

Bug 218568 - Clean up charting UI. Having played with it for a bit, it needed…

Bug 218568 - Clean up charting UI. Having played with it for a bit, it needed work. Patch by gerv; r=kiko, a=justdave.
parent eef0d285
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
donames = 1 donames = 1
%] %]
<script> <script language="JavaScript" type="text/javascript">
[%# This function takes necessary action on selection of a subcategory %] [%# This function takes necessary action on selection of a subcategory %]
function subcatSelected() { function subcatSelected() {
var cat = document.chartform.category.value; var cat = document.chartform.category.value;
...@@ -59,14 +59,88 @@ function subcatSelected() { ...@@ -59,14 +59,88 @@ function subcatSelected() {
[% gttext = "Grand Total" %] [% gttext = "Grand Total" %]
<h3>Current Data Sets:</h3> <form method="get" action="chart.cgi" name="chartform">
<p>
<span style="color: red">
Note: this new charting system is in beta. This means that retention of
data or defined data sets is on a best-efforts basis only, and cannot be
guaranteed. Please file any bugs you find or enhancement ideas you think
of.
</span>
</p>
<table cellpadding="2" cellspacing="2" border="0">
[% IF NOT category OR category.size == 0 %]
<tr>
<td>
<i>No data sets exist, or none are visible to you.</i>
</td>
</tr>
[% ELSE %]
<tr>
<th>Category:</th>
<noscript><th></th></noscript>
<th>Sub-category:</th>
<noscript><th></th></noscript>
<th>Name:</th>
<th><br>
</th>
</tr>
<tr>
[% PROCESS series_select sel = { name => 'category',
size => 5,
onchange = "catSelected();
subcatSelected();" } %]
<noscript>
<td>
<input type="submit" name="action-assemble" value="Update --&gt;">
</td>
</noscript>
[% PROCESS series_select sel = { name => 'subcategory',
size => 5,
onchange = "subcatSelected()" } %]
<noscript>
<td>
<input type="submit" name="action-assemble" value="Update --%gt;">
</td>
</noscript>
<td align="left">
<label for="name" accesskey="N">
<select name="name" id="name" style="width: 15em"
size="5" multiple="multiple"
[% FOREACH x = name.keys.sort %]
<option value="[% name.$x FILTER html %]">
[% x FILTER html %]</option>
[% END %]
</select>
</label>
</td>
<td align="center" valign="middle">
<input type="submit" name="action-add" value="Add To List"><br>
</td>
</tr>
[% END %]
</table>
<script language="JavaScript" type="text/javascript">
document.chartform.category[0].selected = true;
catSelected();
subcatSelected();
</script>
<h3>List Of Data Sets To Plot</h3>
<form method="get" action="chart.cgi" name="chartform">
[% IF chart.lines.size > 0 %] [% IF chart.lines.size > 0 %]
<table border="0" cellspacing="2" cellpadding="2"> <table cellspacing="2" cellpadding="2">
<tr> <tr>
<th>Select</th> <th>Select</th>
<th>As</th> <th>Label</th>
<th></th> <th></th>
<th>Data Set</th> <th>Data Set</th>
<th>Subs</th> <th>Subs</th>
...@@ -121,15 +195,13 @@ function subcatSelected() { ...@@ -121,15 +195,13 @@ function subcatSelected() {
value="[% series.series_id %]"> value="[% series.series_id %]">
</td> </td>
<td> <td align="center">
[% IF series.creator != 0 %] [% IF series.creator != 0 AND series.isSubscribed(user.id) %]
[% IF series.isSubscribed(user.id) %] <input type="submit" value="Unsubscribe" style="width: 12ex;"
<input type="submit" value="Unsubscribe" style="width: 12ex;" name="action-unsubscribe[% series.series_id %]">
name="action-unsubscribe[% series.series_id %]"> [% ELSE %]
[% ELSE %] <input type="submit" value="Subscribe" style="width: 12ex;"
<input type="submit" value="Subscribe" style="width: 12ex;" name="action-subscribe[% series.series_id %]">
name="action-subscribe[% series.series_id %]">
[% END %]
[% END %] [% END %]
</td> </td>
...@@ -181,7 +253,7 @@ function subcatSelected() { ...@@ -181,7 +253,7 @@ function subcatSelected() {
</td> </td>
<td></td> <td></td>
<td valign="bottom"> <td valign="bottom" colspan="2">
<b>Date Range:</b> <b>Date Range:</b>
<input type="text" size="12" name="datefrom" <input type="text" size="12" name="datefrom"
value="[% time2str("%Y-%m-%d", chart.datefrom) IF chart.datefrom%]"> value="[% time2str("%Y-%m-%d", chart.datefrom) IF chart.datefrom%]">
...@@ -190,92 +262,33 @@ function subcatSelected() { ...@@ -190,92 +262,33 @@ function subcatSelected() {
value="[% time2str("%Y-%m-%d", chart.dateto) IF chart.dateto %]"> value="[% time2str("%Y-%m-%d", chart.dateto) IF chart.dateto %]">
</td> </td>
<td valign="bottom">
</td>
<td style="text-align: right" valign="bottom"> <td style="text-align: right" valign="bottom">
<input type="submit" name="action-wrap" value="Chart" <input type="submit" name="action-wrap" value="Chart This List">
style="width: 5em;">
</td> </td>
</tr> </tr>
</table> </table>
[% ELSE %] [% ELSE %]
<p><i>None</i></p> <p><i>None</i></p>
[% END %] [% END %]
</form>
<h3>Select Data Sets:</h3>
<table cellpadding="2" cellspacing="2" border="0">
[% IF NOT category OR category.size == 0 %]
<tr>
<td>
<i>You do not have permissions to see any data sets, or none
exist.</i>
</td>
</tr>
[% ELSE %]
<tr>
<th>Category:</th>
<noscript><th></th></noscript>
<th>Sub-category:</th>
<noscript><th></th></noscript>
<th>Name:</th>
<th><br>
</th>
</tr>
<tr>
[% PROCESS series_select sel = { name => 'category',
size => 5,
onchange = "catSelected();
subcatSelected();" } %]
<noscript>
<td>
<input type="submit" name="action-assemble" value="Update -->">
</td>
</noscript>
[% PROCESS series_select sel = { name => 'subcategory',
size => 5,
onchange = "subcatSelected()" } %]
<noscript>
<td>
<input type="submit" name="action-assemble" value="Update -->">
</td>
</noscript>
<td align="left">
<label for="name" accesskey="N">
<select name="name" id="name" style="width: 15em"
size="5" multiple="multiple"
[% FOREACH x = name.keys.sort %]
<option value="[% name.$x FILTER html %]"
[%# " selected" IF lsearch(default.name, x) != -1 %]>
[% x FILTER html %]</option>
[% END %]
</select>
</label>
</td>
<td style="text-align: center; vertical-align: middle;"> <h4>How Subscriptions Work</h4>
<input type="submit" name="action-add" value="Add"
style="width: 3em;"><br>
</td>
</tr>
[% END %]
</table>
<script> <p>
document.chartform.category[0].selected = true; Administrators may mark data sets as public, which then show up in everyone's
catSelected(); list. All others are not public, and you must explicitly subscribe to them in
subcatSelected(); order for them to appear in your list.
</script> </p>
</form>
<p>
When you
[% IF UserInGroup('editbugs') %] [% IF UserInGroup('editbugs') %]
<h3><a href="query.cgi?format=create-series">New Data Set</a></h3> <a href="query.cgi?format=create-series">create a new data set</a>,
[% END %] [% ELSE %]
create a new data set,
[% END %]
you are automatically subscribed to it. When the last person unsubscribes
from a data set, data stops being collected.
</p>
[% PROCESS global/footer.html.tmpl %] [% PROCESS global/footer.html.tmpl %]
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
[% button_name = "Change" %] [% button_name = "Change" %]
[% PROCESS reports/series.html.tmpl %] [% PROCESS reports/series.html.tmpl %]
<input type="hidden" name="action-alter" value="1">
[% IF default.series_id %] [% IF default.series_id %]
<input type="hidden" name="series_id" value="[% default.series_id %]"> <input type="hidden" name="series_id" value="[% default.series_id %]">
...@@ -40,8 +41,13 @@ ...@@ -40,8 +41,13 @@
</form> </form>
<p> <p>
<b>Creator</b>: <a href="mailto:[% creator.email FILTER html %]"> <b>Creator</b>:
[% creator.email FILTER html %]</a> [% IF creator.email %]
<a href="mailto:[% creator.email FILTER html %]">
[% creator.email FILTER html %]</a>
[% ELSE %]
(automatically created by [% terms.Bugzilla %])
[% END %]
</p> </p>
<p> <p>
......
...@@ -86,11 +86,14 @@ ...@@ -86,11 +86,14 @@
</td> </td>
<td></td> <td></td>
<td> <td>
<input type="submit" value="[% button_name FILTER html %]"> <input type="submit" name="action-create" value="Create Data Set">
</td> </td>
</tr>
</tbody> </tbody>
</table> </table>
<script> <script language="JavaScript" type="text/javascript">
document.chartform.category[0].selected = true;
catSelected();
checkNewState(); checkNewState();
</script> </script>
...@@ -352,7 +352,9 @@ function selectProduct(f) { ...@@ -352,7 +352,9 @@ function selectProduct(f) {
value="[% default.short_desc.0 FILTER html %]"> value="[% default.short_desc.0 FILTER html %]">
</td> </td>
<td> <td>
<input type="submit" value="[% button_name FILTER html %]"> [% IF button_name %]
<input type="submit" value="[% button_name FILTER html %]">
[% END %]
</td> </td>
</tr> </tr>
......
...@@ -32,34 +32,19 @@ ...@@ -32,34 +32,19 @@
onload = "selectProduct(document.forms['chartform']);" onload = "selectProduct(document.forms['chartform']);"
%] %]
[% button_name = "I'm Feeling Buggy" %]
<form method="get" action="chart.cgi" name="chartform"> <form method="get" action="chart.cgi" name="chartform">
[% PROCESS search/form.html.tmpl %] [% PROCESS search/form.html.tmpl %]
<table> <p>
<tr> <input type="submit" name="action-search" value="Run Search">
<td> to see which bugs would be included in this series.
<input type="radio" id="action-search" </p>
name="action" value="search" checked="checked">
<label for="action-search">Run this search</label></td> <h3>Data Set Parameters</h3>
</tr>
<tr>
<td>
<input type="radio" id="action-create" name="action" value="create">
<label for="action-create">
Start recording [% terms.bug %] count data for this search, as follows:
</label>
<br>
[% INCLUDE reports/series.html.tmpl %] [% INCLUDE reports/series.html.tmpl %]
</td>
</tr>
</table>
<hr> <hr>
[% PROCESS "search/boolean-charts.html.tmpl" %] [% PROCESS "search/boolean-charts.html.tmpl" %]
......
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