Commit 8eb6d92c authored by gerv%gerv.net's avatar gerv%gerv.net

Bug 231391 - make "cumulate" option work on new charts, together with a few UI…

Bug 231391 - make "cumulate" option work on new charts, together with a few UI tweaks. Patch by gerv; r=kiko, a=myk.
parent b4f84b30
...@@ -89,6 +89,9 @@ sub init { ...@@ -89,6 +89,9 @@ sub init {
$self->{'datefrom'} = $cgi->param('datefrom'); $self->{'datefrom'} = $cgi->param('datefrom');
$self->{'dateto'} = $cgi->param('dateto'); $self->{'dateto'} = $cgi->param('dateto');
# If we are cumulating, a grand total makes no sense
$self->{'gt'} = 0 if $self->{'cumulate'};
# Make sure the dates are ones we are able to interpret # Make sure the dates are ones we are able to interpret
foreach my $date ('datefrom', 'dateto') { foreach my $date ('datefrom', 'dateto') {
if ($self->{$date}) { if ($self->{$date}) {
......
...@@ -280,7 +280,7 @@ if ($::FORM{'cmdtype'} eq "dorem") { ...@@ -280,7 +280,7 @@ if ($::FORM{'cmdtype'} eq "dorem") {
} }
elsif ($::FORM{'remaction'} eq "runseries") { elsif ($::FORM{'remaction'} eq "runseries") {
$::buffer = LookupSeries($::FORM{"series_id"}); $::buffer = LookupSeries($::FORM{"series_id"});
$vars->{'title'} = "Bug List: $::FORM{'namedcmd'}"; $vars->{'searchname'} = $::FORM{'namedcmd'};
$params = new Bugzilla::CGI($::buffer); $params = new Bugzilla::CGI($::buffer);
$order = $params->param('order') || $order; $order = $params->param('order') || $order;
} }
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
[% y_label = "Bugs" %] [% y_label = "Bugs" %]
[% x_label = "Time" %] [% x_label = "Time" %]
[% IF cumulate %] [% IF chart.cumulate %]
[% USE graph = GD.Graph.area(width, height) %] [% USE graph = GD.Graph.area(width, height) %]
[% graph.set(cumulate => "true") %] [% graph.set(cumulate => "true") %]
[% ELSE %] [% ELSE %]
......
...@@ -139,11 +139,11 @@ function subcatSelected() { ...@@ -139,11 +139,11 @@ function subcatSelected() {
[% IF chart.lines.size > 0 %] [% IF chart.lines.size > 0 %]
<table cellspacing="2" cellpadding="2"> <table cellspacing="2" cellpadding="2">
<tr> <tr>
<th>Select</th> <th style="width: 5em;">Select</th>
<th>Label</th> <th>Label</th>
<th></th> <th></th>
<th>Data Set</th> <th>Data Set</th>
<th>Subs</th> <th></th>
<th></th> <th></th>
</tr> </tr>
...@@ -182,34 +182,35 @@ function subcatSelected() { ...@@ -182,34 +182,35 @@ function subcatSelected() {
</td> </td>
<td> <td>
<a href="buglist.cgi?cmdtype=dorem&amp;namedcmd=
[% series.category FILTER html %]-
[% series.subcategory FILTER html %]-
[% series.name FILTER html -%]&amp;series_id=
[% series.series_id %]&amp;remaction=runseries">
[% series.category FILTER html %] / [% series.category FILTER html %] /
[%+ series.subcategory FILTER html %] / [%+ series.subcategory FILTER html %] /
[%+ series.name FILTER html %] [%+ series.name FILTER html %]
</a>
<input type="hidden" name="line[% newidx %]" <input type="hidden" name="line[% newidx %]"
value="[% series.series_id %]"> value="[% series.series_id %]">
</td> </td>
<td align="center"> <td align="center">
[% IF series.creator != 0 AND series.isSubscribed(user.id) %] [% IF series.creator != 0 %]
<input type="submit" value="Unsubscribe" style="width: 12ex;" [% IF series.isSubscribed(user.id) %]
name="action-unsubscribe[% series.series_id %]"> <input type="submit" value="Unsubscribe" style="width: 12ex;"
[% ELSE %] name="action-unsubscribe[% series.series_id %]">
<input type="submit" value="Subscribe" style="width: 12ex;" [% ELSE %]
name="action-subscribe[% series.series_id %]"> <input type="submit" value="Subscribe" style="width: 12ex;"
name="action-subscribe[% series.series_id %]">
[% END %]
[% END %] [% END %]
</td> </td>
<td align="center"> <td align="center">
[% IF user.id == series.creator OR UserInGroup("admin") %] [% IF user.id == series.creator OR UserInGroup("admin") %]
<a href="chart.cgi?action=edit&series_id= <a href="chart.cgi?action=edit&series_id=
[% series.series_id %]">Edit</a> [% series.series_id %]">Edit</a> |
[% END %] [% END %]
<a href="buglist.cgi?cmdtype=dorem&amp;namedcmd=
[% series.category FILTER html %]%20/%20
[% series.subcategory FILTER html %]%20/%20
[% series.name FILTER html -%]&amp;series_id=
[% series.series_id %]&amp;remaction=runseries">Run Search</a>
</td> </td>
</tr> </tr>
[% END %] [% END %]
...@@ -249,7 +250,8 @@ function subcatSelected() { ...@@ -249,7 +250,8 @@ function subcatSelected() {
<td style="text-align: right; vertical-align: bottom;"> <td style="text-align: right; vertical-align: bottom;">
<b>Cumulate:</b> <b>Cumulate:</b>
<input type="checkbox" name="cumulate" value="1"> <input type="checkbox" name="cumulate" value="1"
[% " checked" IF chart.cumulate %]>
</td> </td>
<td></td> <td></td>
......
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