1
[%# 1.0@bugzilla.org %]
2
[%# The contents of this file are subject to the Mozilla Public
3
# License Version 1.1 (the "License"); you may not use this file
4
# except in compliance with the License. You may obtain a copy of
5
# the License at http://www.mozilla.org/MPL/
7
# Software distributed under the License is distributed on an "AS
8
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
9
# implied. See the License for the specific language governing
10
# rights and limitations under the License.
12
# The Original Code is the Bugzilla Bug Tracking System.
14
# The Initial Developer of the Original Code is Netscape Communications
15
# Corporation. Portions created by Netscape are
16
# Copyright (C) 1998 Netscape Communications Corporation. All
19
# Contributor(s): Gervase Markham <gerv@gerv.net>
23
# col_field: string. Name of the field being plotted as columns.
24
# row_field: string. Name of the field being plotted as rows.
25
# tbl_field: string. Name of the field being plotted as tables.
26
# tbl_names: array. List of values for the field being plotted as tables.
27
# time: integer. Seconds since the epoch.
28
# data: <depends on format>. Data to plot.
29
# format: string. Format of the individual reports.
30
# width: integer. For image charts, height of the image.
31
# height: integer. For image charts, width of the image.
32
# imagebase: string. Base URL for chart image.
33
# switchbase: string. Base URL for format switching.
34
# cumulate: boolean. For bar/line charts, whether to cumulate data sets.
37
[% DEFAULT width = 600
41
[% IF min_width AND width < min_width %]
42
[% width = min_width %]
45
[%# We ignore row_field for pie charts %]
46
[% IF format == "pie" %]
50
[% PROCESS "global/field-descs.none.tmpl" %]
52
[% tbl_field_disp = field_descs.$tbl_field || tbl_field %]
53
[% col_field_disp = field_descs.$col_field || col_field %]
54
[% row_field_disp = field_descs.$row_field || row_field %]
55
[% switchbase = switchbase FILTER html %]
60
[% tbl_field_disp FILTER html %]
62
[% " / " IF tbl_field AND (col_field OR row_field) %]
64
[% row_field_disp FILTER html %]
66
[% " / " IF col_field AND row_field %]
67
[% col_field_disp FILTER html %]
70
[% PROCESS global/header.html.tmpl
72
.t1 { background-color: #ffffff } /* white */
73
.t2 { background-color: #dfefff } /* light blue */
74
.t3 { background-color: #dddddd } /* grey */
75
.t4 { background-color: #c3d3ed } /* darker blue */
76
.ttotal { background-color: #cfffdf } /* light green */
78
header_addl_info = time2str("%Y-%m-%d %H:%M:%S", time)
82
<p>[% query FILTER html %]</p>
87
[% FOREACH tbl = tbl_names %]
88
[% IF tbl == "-total-" %]
89
[% tbl_disp = "Total" %]
94
[% IF format == "table" %]
95
[% PROCESS "reports/report-table.html.tmpl" %]
98
<h2>[% tbl_disp FILTER html %]</h2>
101
[% imageurl = BLOCK %]report.cgi?[% imagebase FILTER html %]&format=
102
[% format FILTER url_quote %]&ctype=png&action=plot&
104
[% IF tbl != "-total-" %]
105
[% tbl_field FILTER url_quote %]=[% tbl FILTER url_quote %]&
107
[% FOREACH tblname = tbl_names %]
108
[% IF tblname != "-total-" %]
109
[% tbl_field FILTER url_quote %]=[% tblname FILTER url_quote %]&
113
[% END %]width=[% width %]&height=[% height %]
116
<img alt="Graphical report results" src="[% imageurl %]"
117
width="[% width %]" height="[% height %]">
125
[% formats = [ { name => "pie", description => "Pie" },
126
{ name => "bar", description => "Bar" },
127
{ name => "line", description => "Line" },
128
{ name => "table", description => "Table" } ] %]
130
[% formaturl = "report.cgi?$switchbase&width=$width" _
131
"&height=$height&action=wrap" %]
132
[% FOREACH other_format = formats %]
133
[% NEXT IF other_format.name == "pie" AND row_field AND col_field %]
134
[% UNLESS other_format.name == format %]
135
<a href="[% formaturl %]&format=[% other_format.name %]">
137
[% other_format.description FILTER html %]
138
[% "</a>" UNLESS other_format.name == format %] |
140
<a href="[% formaturl %]&ctype=csv&format=table">CSV</a>
143
[% IF format != "table" %]
145
148
[% sizeurl = BLOCK %]report.cgi?
149
[% switchbase %]&action=wrap&format=
150
[% format FILTER html %][% END %]
152
<a href="[% sizeurl %]&width=[% width %]&height=
153
[% height + 100 %]">Taller</a><br>
154
<a href="[% sizeurl %]&width=[% width - 100 %]&height=
155
[% height %]">Thinner</a> *
156
<a href="[% sizeurl %]&width=[% width + 100 %]&height=
157
[% height %]">Fatter</a> <br>
158
<a href="[% sizeurl %]&width=[% width %]&height=
159
[% height - 100 %]">Shorter</a><br>
166
[% IF format == "table" %]
167
<a href="query.cgi?[% switchbase %]&format=report-table">Edit
170
<a href="query.cgi?[% switchbase %]&chart_format=
171
[% format %]&format=report-graph&cumulate=[% cumulate %]">
179
[% PROCESS global/footer.html.tmpl %]