Thread: [Openfirst-cvscommit] www/htdocs/bugzilla/reports chart.csv.tmpl,NONE,1.1 chart.html.tmpl,NONE,1.1 c
Brought to you by:
xtimg
Update of /cvsroot/openfirst/www/htdocs/bugzilla/reports In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28397/reports Added Files: chart.csv.tmpl chart.html.tmpl chart.png.tmpl create-chart.html.tmpl duplicates.rdf.tmpl edit-series.html.tmpl menu.html.tmpl report-bar.png.tmpl report-line.png.tmpl report-pie.png.tmpl report-table.csv.tmpl report-table.html.tmpl report.csv.tmpl report.html.tmpl series-common.html.tmpl series.html.tmpl Log Message: Bring templates up to date for Bugzilla 2.18.1 --- NEW FILE: report-pie.png.tmpl --- [%# 1....@bu... %] [%# The contents of this file are subject to the Mozilla Public # License Version 1.1 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of # the License at http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or # implied. See the License for the specific language governing # rights and limitations under the License. # # The Original Code is the Bugzilla Bug Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are # Copyright (C) 1998 Netscape Communications Corporation. All # Rights Reserved. # # Contributor(s): Gervase Markham <ge...@ge...> #%] [% PROCESS "global/field-descs.none.tmpl" %] [% col_field_disp = field_descs.$col_field || col_field %] [% FILTER null; USE graph = GD.Graph.pie(width, height); graph.set(title => col_field_disp, pie_height => 20, suppress_angle => 2, start_angle => 180); graph.plot(data.0).png | stdout(1); END; -%] --- NEW FILE: report-line.png.tmpl --- [%# 1....@bu... %] [%# The contents of this file are subject to the Mozilla Public # License Version 1.1 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of # the License at http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or # implied. See the License for the specific language governing # rights and limitations under the License. # # The Original Code is the Bugzilla Bug Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are # Copyright (C) 1998 Netscape Communications Corporation. All # Rights Reserved. # # Contributor(s): Gervase Markham <ge...@ge...> #%] [% PROCESS global/variables.none.tmpl %] [% y_label = "$terms.Bugs" %] [% PROCESS "global/field-descs.none.tmpl" %] [% col_field_disp = field_descs.$col_field || col_field %] [% IF cumulate %] [% USE graph = GD.Graph.area(width, height) %] [% graph.set(cumulate => "true") %] [% ELSE %] [% USE graph = GD.Graph.lines(width, height) %] [% END %] [% FILTER null; graph.set(x_label => col_field_disp, y_label => y_label, y_tick_number => 8, x_label_position => 0.5, x_labels_vertical => x_labels_vertical, legend_placement => "RT", line_width => 2, dclrs => ["lred", "lgreen", "lblue", "lyellow", "lpurple", "lorange", "black", "green", "blue", "dpink", "lbrown", "gray", "red", "dpurple", "gold", "marine"]); # Workaround for the fact that set_legend won't take row_names directly, # because row_names is an array reference rather than an array. graph.set_legend(row_names.0, row_names.1, row_names.2, row_names.3, row_names.4, row_names.5, row_names.6, row_names.7, row_names.8, row_names.9, row_names.10, row_names.11, row_names.12, row_names.13, row_names.14, row_names.15); graph.plot(data.0).png | stdout(1); END; -%] --- NEW FILE: report.html.tmpl --- [%# 1....@bu... %] [%# The contents of this file are subject to the Mozilla Public # License Version 1.1 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of # the License at http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or # implied. See the License for the specific language governing # rights and limitations under the License. # # The Original Code is the Bugzilla Bug Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are # Copyright (C) 1998 Netscape Communications Corporation. All # Rights Reserved. # # Contributor(s): Gervase Markham <ge...@ge...> #%] [%# INTERFACE: # col_field: string. Name of the field being plotted as columns. # row_field: string. Name of the field being plotted as rows. # tbl_field: string. Name of the field being plotted as tables. # tbl_names: array. List of values for the field being plotted as tables. # time: integer. Seconds since the epoch. # data: <depends on format>. Data to plot. # format: string. Format of the individual reports. # width: integer. For image charts, height of the image. # height: integer. For image charts, width of the image. # switchbase: string. Base URL for format switching. # cumulate: boolean. For bar/line charts, whether to cumulate data sets. #%] [% DEFAULT width = 600 height = 350 %] [% IF min_width AND width < min_width %] [% width = min_width %] [% END %] [%# We ignore row_field for pie charts %] [% IF format == "pie" %] [% row_field = "" %] [% END %] [% PROCESS "global/field-descs.none.tmpl" %] [% tbl_field_disp = field_descs.$tbl_field || tbl_field %] [% col_field_disp = field_descs.$col_field || col_field %] [% row_field_disp = field_descs.$row_field || row_field %] [% title = BLOCK %] Report: [% IF tbl_field %] [% tbl_field_disp FILTER html %] [% END %] [% " / " IF tbl_field AND (col_field OR row_field) %] [% IF row_field %] [% row_field_disp FILTER html %] [% END %] [% " / " IF col_field AND row_field %] [% col_field_disp FILTER html %] [% END %] [% PROCESS global/header.html.tmpl style = " .t1 { background-color: #ffffff } /* white */ .t2 { background-color: #dfefff } /* light blue */ .t3 { background-color: #dddddd } /* grey */ .t4 { background-color: #c3d3ed } /* darker blue */ .ttotal { background-color: #cfffdf } /* light green */ " h3 = time2str("%Y-%m-%d %H:%M:%S", time) %] [% IF debug %] <p>[% query FILTER html %]</p> [% END %] <div align="center"> [% FOREACH tbl = tbl_names %] [% IF tbl == "-total-" %] [% tbl_disp = "Total" %] [% ELSE %] [% tbl_disp = tbl %] [% END %] [% IF format == "table" %] [% PROCESS "reports/report-table.html.tmpl" %] [% ELSE %] [% IF tbl %] <h2>[% tbl_disp FILTER html %]</h2> [% END %] [% imageurl = BLOCK %]report.cgi?[% imagebase %]&format= [% format FILTER url_quote %]&ctype=png&action=plot& [% IF tbl_field %] [% IF tbl != "-total-" %] [% tbl_field FILTER url_quote %]=[% tbl FILTER url_quote %]& [% ELSE %] [% FOREACH tblname = tbl_names %] [% IF tblname != "-total-" %] [% tbl_field FILTER url_quote %]=[% tblname FILTER url_quote %]& [% END %] [% END %] [% END %] [% END %]width=[% width %]&height=[% height %] [% END %] <img alt="Graphical report results" src="[% imageurl %]" width="[% width %]" height="[% height %]"> [% END %] <br> [% END %] <table> <tr> <td> [% formats = [ { name => "pie", description => "Pie" }, { name => "bar", description => "Bar" }, { name => "line", description => "Line" }, { name => "table", description => "Table" } ] %] [% formaturl = "report.cgi?$switchbase&width=$width&height=$height" _ "&action=wrap" %] [% FOREACH other_format = formats %] [% NEXT IF other_format.name == "pie" AND row_field AND col_field %] [% UNLESS other_format.name == format %] <a href="[% formaturl %]&format=[% other_format.name %]"> [% END %] [% other_format.description FILTER html %] [% "</a>" UNLESS other_format.name == format %] | [% END %] <a href="[% formaturl %]&ctype=csv&format=table">CSV</a> </td> [% IF format != "table" %] <td> </td> [% sizeurl = BLOCK %]report.cgi? [% switchbase %]&action=wrap&format= [% format FILTER html %][% END %] <td align="center"> <a href="[% sizeurl %]&width=[% width %]&height= [% height + 100 %]">Taller</a><br> <a href="[% sizeurl %]&width=[% width - 100 %]&height= [% height %]">Thinner</a> * <a href="[% sizeurl %]&width=[% width + 100 %]&height= [% height %]">Fatter</a> <br> <a href="[% sizeurl %]&width=[% width %]&height= [% height - 100 %]">Shorter</a><br> </td> [% END %] <tr> </table> <p> [% IF format == "table" %] <a href="query.cgi?[% switchbase %]&format=report-table">Edit this report</a> [% ELSE %] <a href="query.cgi?[% switchbase %]&chart_format= [% format %]&format=report-graph&cumulate=[% cumulate %]"> Edit this report </a> [% END %] </p> </div> [% PROCESS global/footer.html.tmpl %] --- NEW FILE: report-table.html.tmpl --- [%# 1....@bu... %] [%# The contents of this file are subject to the Mozilla Public # License Version 1.1 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of # the License at http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or # implied. See the License for the specific language governing # rights and limitations under the License. # # The Original Code is the Bugzilla Bug Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are # Copyright (C) 1998 Netscape Communications Corporation. All # Rights Reserved. # # Contributor(s): Gervase Markham <ge...@ge...> # <rd...@ca...> #%] [%# INTERFACE: # buglistbase: The base query for this table, in URL form # col_field: string. Name of the field being plotted as columns. # row_field: string. Name of the field being plotted as rows. # tbl_field: string. Name of the field being plotted as tables. # col_names: array. List of values for the field being plotted as columns. # row_names: array. List of values for the field being plotted as rows. # data: <depends on format>. Data to plot. Only data.$tbl is accessed. # tbl: Name of a hash in data which is the table to be plotted. #%] [% PROCESS "global/field-descs.none.tmpl" %] [% col_field_disp = field_descs.$col_field || col_field %] [% row_field_disp = field_descs.$row_field || row_field %] [% IF tbl == "-total-" %] [% urlbase = BLOCK %]buglist.cgi?[% buglistbase %] [% "&$tbl_vals" IF tbl_vals %][% END %] [% ELSE %] [% urlbase = BLOCK %]buglist.cgi?[% buglistbase %]& [% tbl_field FILTER url_quote %]=[% tbl FILTER url_quote %][% END %] [% END %] <table> [% IF tbl_field %] <tr> <td> </td> <td align="center"> <h2>[% tbl_disp FILTER html %]</h2> </td> </tr> [% END %] <tr> <td> </td> <td align="center"> <strong>[% col_field_disp FILTER html %]</strong> </td> </tr> <tr> <td valign="middle"> <strong>[% row_field_disp FILTER html %]</strong> </td> <td> [% classes = [ [ "t1", "t2" ] , [ "t3", "t4" ] ] %] [% col_idx = 0 %] [% row_idx = 0 %] [% grand_total = 0 %] <table border="1"> [% IF col_field %] <tr> <td class="[% classes.$row_idx.$col_idx %]"> </td> [% FOREACH col = col_names %] [% col_totals.$col = 0 %] [% NEXT IF col == "" %] [% col_idx = 1 - col_idx %] <td class="[% classes.$row_idx.$col_idx %]"> [% col FILTER html FILTER replace('^ $',' ') %] </td> [% END %] <td class="ttotal"> Total </td> </tr> [% END %] [% FOREACH row = row_names %] [% row_total = 0 %] [% row_idx = 1 - row_idx %] <tr> <td class="[% classes.$row_idx.$col_idx %]" align="right"> [% row FILTER html FILTER replace('^ $',' ') %] </td> [% FOREACH col = col_names %] [% row_total = row_total + data.$tbl.$col.$row %] [% NEXT IF col == "" %] [% col_totals.$col = col_totals.$col + data.$tbl.$col.$row %] [% col_idx = 1 - col_idx %] <td class="[% classes.$row_idx.$col_idx %]" align="center"> [% IF data.$tbl.$col.$row AND data.$tbl.$col.$row > 0 %] <a href="[% urlbase %]& [% row_field FILTER url_quote %]=[% row FILTER url_quote %]& [% col_field FILTER url_quote %]=[% col FILTER url_quote %]"> [% data.$tbl.$col.$row %]</a> [% ELSE %] . [% END %] </td> [% END %] <td class="ttotal" align="right"> <a href="[% urlbase %]& [% row_field FILTER url_quote %]=[% row FILTER url_quote %] [% "&$col_vals" IF col_vals %]"> [% row_total %]</a> [% grand_total = grand_total + row_total %] </td> </tr> [% END %] <tr> [% row_idx = 1 - row_idx %] <td class="ttotal"> Total </td> [% FOREACH col = col_names %] [% NEXT IF col == "" %] <td class="ttotal" align="center"> <a href="[% urlbase %]& [% col_field FILTER url_quote %]=[% col FILTER url_quote %] [% "&$row_vals" IF row_vals %]"> [% col_totals.$col %]</a> <strong> </td> [% END %] <td class="ttotal" align="right"> <strong> <a href="[% urlbase %] [% "&$row_vals" IF row_vals %] [% "&$col_vals" IF col_vals %]">[% grand_total %]</a> </strong> </td> </tr> </table> </td> </tr> </table> --- NEW FILE: series.html.tmpl --- [%# 1....@bu... %] [%# The contents of this file are subject to the Mozilla Public # License Version 1.1 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of # the License at http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or # implied. See the License for the specific language governing # rights and limitations under the License. # # The Original Code is the Bugzilla Bug Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are # Copyright (C) 1998 Netscape Communications Corporation. All # Rights Reserved. # # Contributor(s): Gervase Markham <ge...@ge...> #%] [%# INTERFACE: # default: hash. Defaults for category, subcategory, name etc. # button_name: string. What the button will say. # category: hash (keyed by category) of hashes (keyed by subcategory) of # hashes (keyed by name), with value being the series_id of the # series. Contains details of all series the user can see. #%] [% PROCESS "reports/series-common.html.tmpl" newtext = "New (name below)" %] <table cellpadding="2" cellspacing="2" border="0" style="text-align: left; margin-left: 20px"> <tbody> <tr> <th>Category:</th> <th></th> <th>Sub-category:</th> <th>Name:</th> <td></td> </tr> <tr> [% PROCESS series_select sel = { name => 'category', size => 5, onchange => "catSelected()" } %] <td> <noscript> <input type="submit" name="action-edit" value="Update -->"> </noscript> </td> [% PROCESS series_select sel = { name => 'subcategory', size => 5, onchange => "checkNewState()" } %] <td valign="top" name="name"> <input type="text" name="name" maxlength="64" value="[% default.name.0 FILTER html %]" size="25"> </td> <td valign="top"> <span style="font-weight: bold;">Run every</span> <input type="text" size="2" name="frequency" value="[% (default.frequency.0 OR 7) FILTER html %]"> <span style="font-weight: bold;"> day(s)</span><br> [%# Change 'admin' here and in Series.pm, or remove the check completely, if you want to change who can make series public. %] [% IF UserInGroup('admin') %] <input type="checkbox" name="public" [% "checked='checked'" IF default.public.0 %]> <span style="font-weight: bold;">Visible to all<br> (within group restrictions)</span> [% END %] </td> </tr> <tr> <td> <input type="text" style="width: 100%" name="newcategory" maxlength="64" value="[% default.newcategory.0 FILTER html %]"> </td> <td></td> <td> <input type="text" style="width: 100%" name="newsubcategory" maxlength="64" value="[% default.newsubcategory.0 FILTER html %]"> </td> <td></td> <td> <input type="submit" name="submit-button" value="[% button_name FILTER html %]"> </td> </tr> </tbody> </table> --- NEW FILE: chart.csv.tmpl --- [%# 1....@bu... %] [%# The contents of this file are subject to the Mozilla Public # License Version 1.1 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of # the License at http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or # implied. See the License for the specific language governing # rights and limitations under the License. # # The Original Code is the Bugzilla Bug Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are # Copyright (C) 1998 Netscape Communications Corporation. All # Rights Reserved. # # Contributor(s): Gervase Markham <ge...@ge...> #%] [% data = chart.data %] Date\Series, [% FOREACH label = chart.labels %] [% label FILTER csv %][% "," UNLESS loop.last %] [% END %] [%# The data, which is in the correct format for GD, is conceptually the wrong # way round for CSV output. So, we need to invert it here, which is why # these loops aren't just plain FOREACH. #%] [% i = 0 %] [% WHILE i < data.0.size %] [% j = 0 %] [% WHILE j < data.size %] [% data.$j.$i %][% "," UNLESS (j == data.size - 1) %] [% j = j + 1 %] [% END %] [% i = i + 1 %] [% END %] --- NEW FILE: create-chart.html.tmpl --- [%# 1....@bu... %] [%# The contents of this file are subject to the Mozilla Public # License Version 1.1 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of # the License at http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or # implied. See the License for the specific language governing # rights and limitations under the License. # # The Original Code is the Bugzilla Bug Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are # Copyright (C) 1998 Netscape Communications Corporation. All # Rights Reserved. # # Contributor(s): Gervase Markham <ge...@ge...> #%] [%# INTERFACE: # chart: Chart object representing the currently assembled chart. # category: hash (keyed by category) of hashes (keyed by subcategory) of # hashes (keyed by name), with value being the series_id of the # series. Contains details of all series the user can see. #%] [% PROCESS global/header.html.tmpl title = "Create Chart" %] [% PROCESS "reports/series-common.html.tmpl" donames = 1 %] <script language="JavaScript" type="text/javascript"> [%# This function takes necessary action on selection of a subcategory %] function subcatSelected() { var cat = document.chartform.category.value; var subcat = document.chartform.subcategory.value; var names = series[cat][subcat]; var namewidget = document.chartform.name; namewidget.options.length = 0; var i = 0; for (x in names) { namewidget.options[i] = new Option(x, names[x]); i++; } namewidget.options[0].selected = true; checkNewState(); } </script> [% gttext = "Grand Total" %] <form method="get" action="chart.cgi" name="chartform"> <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> <th></th> <th>Sub-category:</th> <th></th> <th>Name:</th> <th><br> </th> </tr> <tr> [% PROCESS series_select sel = { name => 'category', size => 5, onchange = "catSelected(); subcatSelected();" } %] <td> <noscript> <input type="submit" name="action-assemble" value="Update -->"> </noscript> </td> [% PROCESS series_select sel = { name => 'subcategory', size => 5, onchange = "subcatSelected()" } %] <td> <noscript> <input type="submit" name="action-assemble" value="Update -->"> </noscript> </td> <td align="left"> <label for="name" accesskey="N"> <select name="name" id="name" style="width: 15em" size="5" multiple="multiple" [%+ "disabled=\"disabled\"" UNLESS name.keys.size %]> [% FOREACH x = name.keys.sort %] <option value="[% name.$x FILTER html %]"> [% x FILTER html %]</option> [% END %] [% UNLESS name.keys.size %] <option value="" disabled="disabled"></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; document.chartform.subcategory.disabled = ''; document.chartform.name.disabled = ''; catSelected(); subcatSelected(); </script> <h3>List Of Data Sets To Plot</h3> [% IF chart.lines.size > 0 %] <table cellspacing="2" cellpadding="2"> <tr> <th style="width: 5em;">Select</th> <th>Label</th> <th></th> <th>Data Set</th> <th></th> </tr> [%# The external loop has two counters; one which keeps track of where we # are in the old labels array, and one which keeps track of the new # indexes for the form elements. They are different if chart.lines has # empty slots in it. #%] [% labelidx = 0 %] [% newidx = 0 %] [% FOREACH line = chart.lines %] [% IF NOT line %] [%# chart.lines has an empty slot, so chart.labels will too. We # increment labelidx only to keep the labels in sync with the data. #%] [% labelidx = labelidx + 1 %] [% NEXT %] [% END %] [% FOREACH series = line %] <tr> [% IF loop.first %] <td align="center" rowspan="[% line.size %]"> <input type="checkbox" value="1" name="select[% newidx %]"> </td> <td rowspan="[% line.size %]"> <input type="text" size="20" name="label[% newidx %]" value="[% (chart.labels.$labelidx OR series.name) FILTER html %]"> </td> [% END %] <td> [% "{" IF line.size > 1 %] </td> <td> [% series.category FILTER html %] / [%+ series.subcategory FILTER html %] / [%+ series.name FILTER html %] <input type="hidden" name="line[% newidx %]" value="[% series.series_id %]"> </td> <td align="center"> [% IF user.id == series.creator OR UserInGroup("admin") %] <a href="chart.cgi?action=edit&series_id= [% series.series_id %]">Edit</a> | [% END %] <a href="buglist.cgi?cmdtype=dorem&namedcmd= [% series.category FILTER url_quote %]%20/%20 [% series.subcategory FILTER url_quote %]%20/%20 [% series.name FILTER url_quote -%]&series_id= [% series.series_id %]&remaction=runseries">Run Search</a> </td> </tr> [% END %] [% labelidx = labelidx + 1 %] [% newidx = newidx + 1 %] [% END %] [% IF chart.gt %] <tr> <td align="center"> <input type="checkbox" value="1" name="select65536"> <input type="hidden" value="1" name="gt"> </td> <td> <input type="text" size="20" name="labelgt" value="[% (chart.labelgt OR gttext) FILTER html %]"> </td> <td></td> <td> <i>[% gttext FILTER html %]</i> </td> <td></td> </tr> [% END %] <tr> <td colspan="6"> </td> </tr> <tr> <td valign="bottom" style="text-align: center;"> <input type="submit" name="action-sum" value="Sum" style="width: 5em;"><br> <input type="submit" name="action-remove" value="Remove" style="width: 5em;"> </td> <td style="text-align: right; vertical-align: bottom;"> <b>Cumulate:</b> <input type="checkbox" name="cumulate" value="1" [% " checked" IF chart.cumulate %]> </td> <td></td> <td valign="bottom"> <b>Date Range:</b> <input type="text" size="12" name="datefrom" value="[% time2str("%Y-%m-%d", chart.datefrom) IF chart.datefrom%]"> <b>to</b> <input type="text" size="12" name="dateto" value="[% time2str("%Y-%m-%d", chart.dateto) IF chart.dateto %]"> </td> <td style="text-align: right" valign="bottom"> <input type="submit" name="action-wrap" value="Chart This List"> </td> </tr> </table> [% ELSE %] <p><i>None</i></p> [% END %] </form> [% IF UserInGroup('editbugs') %] <h3><a href="query.cgi?format=create-series">Create New Data Set</a></h3> [% END %] [% PROCESS global/footer.html.tmpl %] --- NEW FILE: report.csv.tmpl --- [%# 1....@bu... %] [%# The contents of this file are subject to the Mozilla Public # License Version 1.1 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of # the License at http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or # implied. See the License for the specific language governing # rights and limitations under the License. # # The Original Code is the Bugzilla Bug Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are # Copyright (C) 1998 Netscape Communications Corporation. All # Rights Reserved. # # Contributor(s): Gervase Markham <ge...@ge...> #%] [% PROCESS "global/field-descs.none.tmpl" %] [% FOREACH tbl = tbl_names %] [% PROCESS "reports/report-table.csv.tmpl" %] [% END %] --- NEW FILE: chart.html.tmpl --- [%# 1....@bu... %] [%# The contents of this file are subject to the Mozilla Public # License Version 1.1 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of # the License at http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or # implied. See the License for the specific language governing # rights and limitations under the License. # # The Original Code is the Bugzilla Bug Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are # Copyright (C) 1998 Netscape Communications Corporation. All # Rights Reserved. # # Contributor(s): Gervase Markham <ge...@ge...> #%] [%# INTERFACE: #%] [% DEFAULT width = 600 height = 350 %] [% PROCESS global/header.html.tmpl title = "Chart" h3 = time2str("%Y-%m-%d %H:%M:%S", time) %] <div align="center"> [% imageurl = BLOCK %]chart.cgi? [% imagebase FILTER html %]&ctype=png&action=plot&width= [% width %]&height=[% height -%] [% END %] <img alt="Graphical report results" src="[% imageurl %]" width="[% width %]" height="[% height %]"> <p> [% sizeurl = BLOCK %]chart.cgi? [% imagebase FILTER html %]&action=wrap [% END %] <a href="[% sizeurl %]&width=[% width %]&height= [% height + 100 %]">Taller</a><br> <a href="[% sizeurl %]&width=[% width - 100 %]&height= [% height %]">Thinner</a> * <a href="[% sizeurl %]&width=[% width + 100 %]&height= [% height %]">Fatter</a> <br> <a href="[% sizeurl %]&width=[% width %]&height= [% height - 100 %]">Shorter</a><br> </p> <p> <a href="chart.cgi? [% imagebase FILTER html %]&ctype=csv&action=plot">CSV</a> | <a href="chart.cgi?[% imagebase FILTER html %]&action=assemble">Edit this chart</a> </p> </div> [% PROCESS global/footer.html.tmpl %] --- NEW FILE: report-table.csv.tmpl --- [%# 1....@bu... %] [%# The contents of this file are subject to the Mozilla Public # License Version 1.1 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of # the License at http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or # implied. See the License for the specific language governing # rights and limitations under the License. # # The Original Code is the Bugzilla Bug Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are # Copyright (C) 1998 Netscape Communications Corporation. All # Rights Reserved. # # Contributor(s): Gervase Markham <ge...@ge...> #%] [%# INTERFACE: # See report-table.html.tmpl. #%] [% PROCESS global/variables.none.tmpl %] [% num_bugs = BLOCK %]Number of [% terms.bugs %][% END %] [% tbl_field_disp = field_descs.$tbl_field || tbl_field %] [% col_field_disp = field_descs.$col_field || col_field %] [% row_field_disp = field_descs.$row_field || row_field %] [% title = BLOCK %] [% IF tbl_field %] [% tbl_field_disp FILTER csv %]: [% tbl FILTER csv %] [% END %] [% IF row_field %] [% row_field_disp FILTER csv %] [% END %] [% " / " IF col_field AND row_field %] [% col_field_disp FILTER csv %] [% END %] [% title %], [% IF col_field -%] [% FOREACH col = col_names -%] [% col FILTER csv -%], [% END -%] [% ELSE -%] [% num_bugs %], [% END %] [% FOREACH row = row_names %] [% row FILTER csv -%], [% FOREACH col = col_names %] [% IF data.$tbl AND data.$tbl.$col AND data.$tbl.$col.$row %] [% data.$tbl.$col.$row -%], [% ELSE %] [% -%]0, [% END %] [% END %] [% END %] --- NEW FILE: menu.html.tmpl --- [%# 1....@bu... %] [%# The contents of this file are subject to the Mozilla Public # License Version 1.1 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of # the License at http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or # implied. See the License for the specific language governing # rights and limitations under the License. # # The Original Code is the Bugzilla Bug Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are # Copyright (C) 1998 Netscape Communications Corporation. All # Rights Reserved. # # Contributor(s): Gervase Markham <ge...@ge...> #%] [%# INTERFACE: # This template has no interface. It's a list of the available report # types in Bugzilla. #%] [% PROCESS global/variables.none.tmpl %] [% PROCESS global/header.html.tmpl title = "Reporting and Charting Kitchen" %] <p> [% terms.Bugzilla %] allows you to view and track the state of the [% terms.bug %] database in all manner of exciting ways. </p> <h2>Current State</h2> <ul> <li> <strong><a href="query.cgi">Search</a></strong> - list sets of [% terms.bugs %]. </li> <li> <strong> <a href="query.cgi?format=report-table">Tabular reports</a> </strong> - tables of [% terms.bug %] counts in 1, 2 or 3 dimensions, as HTML or CSV. </li> <li> <strong> <a href="query.cgi?format=report-graph">Graphical reports</a> </strong> - line graphs, bar and pie charts. </li> </ul> <h2>Change Over Time</h2> <ul> <li> <strong><a href="reports.cgi">Old Charts</a></strong> - plot the status and/or resolution of [% terms.bugs %] against time, for each product in your database. </li> [% IF UserInGroup(Param("chartgroup")) %] <li> <strong><a href="chart.cgi">New Charts</a></strong> - plot any arbitrary search against time. Far more powerful. </li> [% END %] </ul> [% PROCESS global/footer.html.tmpl %] --- NEW FILE: duplicates.rdf.tmpl --- [% template_version = "1....@bu..." %] [%# The contents of this file are subject to the Mozilla Public # License Version 1.1 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of # the License at http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or # implied. See the License for the specific language governing # rights and limitations under the License. # # The Original Code is the Bugzilla Bug Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are # Copyright (C) 1998 Netscape Communications Corporation. All # Rights Reserved. # # Contributor(s): Myk Melez <my...@mo...> #%] <?xml version="1.0"?> <!-- [% template_version %] --> <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:bz="http://www.bugzilla.org/rdf#" xmlns:nc="http://home.netscape.com/NC-rdf#"> <bz:duplicates_report rdf:about="[% Param('urlbase') %]data/duplicates.rdf"> <bz:bugs> <Seq> [% FOREACH bug = bugs %] <li> <bz:bug rdf:about="[% Param('urlbase') %]show_bug.cgi?id=[% bug.id %]"> <bz:id nc:parseType="Integer">[% bug.id %]</bz:id> <bz:resolution>[% bug.resolution FILTER html %]</bz:resolution> <bz:duplicate_count nc:parseType="Integer">[% bug.count %]</bz:duplicate_count> <bz:duplicate_delta nc:parseType="Integer">[% bug.delta %]</bz:duplicate_delta> <bz:component>[% bug.component FILTER html %]</bz:component> <bz:severity>[% bug.bug_severity FILTER html %]</bz:severity> <bz:os>[% bug.op_sys FILTER html %]</bz:os> <bz:target_milestone>[% bug.target_milestone FILTER html %]</bz:target_milestone> <bz:summary>[% bug.short_desc FILTER html %]</bz:summary> </bz:bug> </li> [% END %] </Seq> </bz:bugs> </bz:duplicates_report> </RDF> --- NEW FILE: report-bar.png.tmpl --- [%# 1....@bu... %] [%# The contents of this file are subject to the Mozilla Public # License Version 1.1 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of # the License at http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or # implied. See the License for the specific language governing # rights and limitations under the License. # # The Original Code is the Bugzilla Bug Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are # Copyright (C) 1998 Netscape Communications Corporation. All # Rights Reserved. # # Contributor(s): Gervase Markham <ge...@ge...> #%] [% PROCESS global/variables.none.tmpl %] [% y_label = "$terms.Bugs" %] [% PROCESS "global/field-descs.none.tmpl" %] [% col_field_disp = field_descs.$col_field || col_field %] [% FILTER null; USE graph = GD.Graph.bars(width, height); graph.set(x_label => col_field_disp, y_label => y_label, y_tick_number => 8, y_number_format => "%d", x_label_position => 0.5, x_labels_vertical => x_labels_vertical, bar_spacing => 8, shadow_depth => 4, shadowclr => 'dred', show_values => 1, legend_placement => "RT"); graph.set(cumulate => "true", show_values => 0) IF cumulate; # Workaround for the fact that set_legend won't take row_names directly, # because row_names is an array reference rather than an array. graph.set_legend(row_names.0, row_names.1, row_names.2, row_names.3, row_names.4, row_names.5, row_names.6, row_names.7, row_names.8, row_names.9, row_names.10, row_names.11, row_names.12, row_names.13, row_names.14, row_names.15); graph.plot(data.0).png | stdout(1); END; -%] --- NEW FILE: series-common.html.tmpl --- [%# 1....@bu... %] [%# The contents of this file are subject to the Mozilla Public # License Version 1.1 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of # the License at http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or # implied. See the License for the specific language governing # rights and limitations under the License. # # The Original Code is the Bugzilla Bug Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are # Copyright (C) 1998 Netscape Communications Corporation. All # Rights Reserved. # # Contributor(s): Gervase Markham <ge...@ge...> #%] [%# INTERFACE: # donames: boolean. True if we have a multi-select for names as well as # categories and subcategories. # category: hash (keyed by category) of hashes (keyed by subcategory) of # hashes (keyed by name), with value being the series_id of the # series. Contains details of all series the user can see. #%] [% subcategory = category.${default.category} %] [% name = subcategory.${default.subcategory} %] <script type="text/javascript"> [%# This structure holds details of the series the user can select from. %] var series = { [% FOREACH c = category.keys.sort %] "[%+ c FILTER js %]" : { [% FOREACH s = category.$c.keys.sort %] "[%+ s FILTER js %]" : { [% IF donames %] [% FOREACH n = category.$c.$s.keys.sort %] "[% n FILTER js %]": [% category.$c.$s.$n FILTER js %][% ", " UNLESS loop.last %] [% END %] [% END %] }[% ", " UNLESS loop.last %] [% END %] }[% ", " UNLESS loop.last %] [% END %] }; [%# Should attempt to preserve selection across invocations @@@ %] [%# This function takes necessary action on selection of a category %] function catSelected() { var cat = document.chartform.category.value; var subcats = series[cat]; var subcatwidget = document.chartform.subcategory; subcatwidget.options.length = 0; var i = 0; for (x in subcats) { subcatwidget.options[i] = new Option(x, x); i++; } [% IF newtext %] subcatwidget.options[i] = new Option("[% newtext FILTER js %]", ""); [% END %] subcatwidget.options[0].selected = true; if (document.chartform.action[1]) { [%# On the query form, select the right radio button. %] document.chartform.action[1].checked = true; } checkNewState(); } [%# This function updates the disabled state of the two "new" textboxes %] function checkNewState() { var fm = document.chartform; if (fm.newcategory) { fm.newcategory.disabled = (fm.category.value != "" || fm.action[1] && fm.action[1].checked == false); fm.newsubcategory.disabled = (fm.subcategory.value != "" || fm.action[1] && fm.action[1].checked == false); } } </script> [%###########################################################################%] [%# Block for SELECT fields - pinched from search/form.html.tmpl #%] [%###########################################################################%] [% BLOCK series_select %] <td align="left"> <label for="[% sel.name %]" accesskey="[% sel.accesskey %]"> <select name="[% sel.name %]" id="[% sel.name %]" size="[% sel.size %]" style="width: 15em" [%+ "disabled=\"disabled\"" UNLESS ${sel.name}.keys.size || newtext %] [%+ "onchange=\"$sel.onchange\"" IF sel.onchange %]> [% FOREACH x = ${sel.name}.keys.sort %] <option value="[% x FILTER html %]" [% " selected" IF default.${sel.name} == x %]> [% x FILTER html %]</option> [% END %] [% IF newtext %] <option value="">[% newtext FILTER html %]</option> [% ELSIF NOT ${sel.name}.keys.size %] <option value="" disabled="disabled"></option> [% END %] </select> </label> </td> [% END %] --- NEW FILE: chart.png.tmpl --- [%# 1....@bu... %] [%# The contents of this file are subject to the Mozilla Public # License Version 1.1 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of # the License at http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or # implied. See the License for the specific language governing # rights and limitations under the License. # # The Original Code is the Bugzilla Bug Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are # Copyright (C) 1998 Netscape Communications Corporation. All # Rights Reserved. # # Contributor(s): Gervase Markham <ge...@ge...> #%] [% y_label = "Bugs" %] [% x_label = "Time" %] [% IF chart.cumulate %] [% USE graph = GD.Graph.area(width, height) %] [% graph.set(cumulate => "true") %] [% ELSE %] [% USE graph = GD.Graph.lines(width, height) %] [% END %] [% FILTER null; x_label_skip = (30 * chart.data.0.size / width); graph.set(x_label => x_label, y_label => y_label, y_tick_number => 8, x_label_position => 0.5, x_labels_vertical => 1, x_label_skip => x_label_skip, legend_placement => "RT", line_width => 2, dclrs => ["lred", "lgreen", "lblue", "lyellow", "lpurple", "lorange", "black", "green", "blue", "dpink", "lbrown", "gray", "red", "dpurple", "gold", "marine"]); # Workaround for the fact that set_legend won't take chart.labels directly, # because chart.labels is an array reference rather than an array. graph.set_legend(chart.labels.0, chart.labels.1, chart.labels.2, chart.labels.3, chart.labels.4, chart.labels.5, chart.labels.6, chart.labels.7, chart.labels.8, chart.labels.9, chart.labels.10, chart.labels.11, chart.labels.12, chart.labels.13, chart.labels.14, chart.labels.15); graph.plot(chart.data).png | stdout(1); END; -%] --- NEW FILE: edit-series.html.tmpl --- [%# 1....@bu... %] [%# The contents of this file are subject to the Mozilla Public # License Version 1.1 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of # the License at http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or # implied. See the License for the specific language governing # rights and limitations under the License. # # The Original Code is the Bugzilla Bug Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are # Copyright (C) 1998 Netscape Communications Corporation. All # Rights Reserved. # # Contributor(s): Gervase Markham <ge...@ge...> #%] [% title = "Edit Series" %] [% h2 = BLOCK %] [% default.category FILTER html %] / [%+ default.subcategory FILTER html %] / [%+ default.name FILTER html %] [% END %] [% PROCESS global/header.html.tmpl %] [% IF changes_saved %] <p> <font color="red"> Series updated. </font> </p> [% END %] <form method="get" action="chart.cgi" name="chartform"> [% PROCESS reports/series.html.tmpl button_name = "Change Data Set" %] <input type="hidden" name="action" value="alter"> [% IF default.series_id %] <input type="hidden" name="series_id" value="[% default.series_id %]"> [% END %] </form> <p> <b>Creator</b>: [% IF creator.email %] <a href="mailto:[% creator.email FILTER html %]"> [% creator.email FILTER html %]</a> [% ELSE %] (automatically created by [% terms.Bugzilla %]) [% END %] </p> <p>Note: it is not yet possible to edit the search associated with this data set. </p> <p> <a href="query.cgi?[% default.query FILTER html %]">View series search parameters</a> | <a href="buglist.cgi?cmdtype=dorem&namedcmd= [% default.category FILTER url_quote %]- [% default.subcategory FILTER url_quote %]- [% default.name FILTER url_quote %]&remaction=runseries&series_id= [% default.series_id %]">Run series search</a> </p> [% PROCESS global/footer.html.tmpl %] |