From aaf6ccb9866059edabb6607d435e2c320afcf611 Mon Sep 17 00:00:00 2001 From: "gerv%gerv.net" <> Date: Wed, 25 Sep 2002 14:11:32 +0000 Subject: Bug 12282 - General summary reports. Patch by gerv; r=joel. --- template/en/default/global/code-error.html.tmpl | 4 + template/en/default/reports/table.csv.tmpl | 41 ++++++ template/en/default/reports/table.html.tmpl | 143 +++++++++++++++++++++ .../default/search/search-report-table.html.tmpl | 125 ++++++++++++++++++ 4 files changed, 313 insertions(+) create mode 100644 template/en/default/reports/table.csv.tmpl create mode 100644 template/en/default/reports/table.html.tmpl create mode 100644 template/en/default/search/search-report-table.html.tmpl (limited to 'template/en') diff --git a/template/en/default/global/code-error.html.tmpl b/template/en/default/global/code-error.html.tmpl index 55fac2aca..bf93977ad 100644 --- a/template/en/default/global/code-error.html.tmpl +++ b/template/en/default/global/code-error.html.tmpl @@ -78,6 +78,10 @@ [% ELSIF error == "no_bug_data" %] No data when fetching bug [% bug_id %]. + [% ELSIF error == "no_y_axis_defined" %] + No Y axis was defined when creating report. The X axis is optional, + but the Y axis is compulsory. + [% ELSIF error == "template_error" %] [% template_error_msg %] diff --git a/template/en/default/reports/table.csv.tmpl b/template/en/default/reports/table.csv.tmpl new file mode 100644 index 000000000..96b0c3971 --- /dev/null +++ b/template/en/default/reports/table.csv.tmpl @@ -0,0 +1,41 @@ +[%# 1.0@bugzilla.org %] +[%# 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 + #%] +[%# INTERFACE: + # See report.html.tmpl. + #%] +[% row_field FILTER csv -%] + +[% IF col_field -%] + \ [% col_field FILTER csv -%], +[% FOREACH col = col_names -%] +[% col FILTER csv -%], +[% END -%] +[% ELSE -%] +,Number of bugs, +[% END %] + +[% FOREACH row = row_names %] +[% row FILTER csv -%], +[% FOREACH col = col_names %] +[% IF data.$row AND data.$row.$col %][% data.$row.$col -%],[% ELSE %]0,[% END %] +[% END %] + +[% END %] diff --git a/template/en/default/reports/table.html.tmpl b/template/en/default/reports/table.html.tmpl new file mode 100644 index 000000000..d9a04d5fd --- /dev/null +++ b/template/en/default/reports/table.html.tmpl @@ -0,0 +1,143 @@ + +[%# 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 + # + #%] + +[%# INTERFACE: + # basequery: The base query for this table, in URL form + # row_field: string. The field name for the data in table rows + # col_field: string. The field name for the data in table columns + # col_names: array of strings. Values for the columns + # row_names: array of strings. Values for the rows + # col_totals: hash of integers. Totals for the columns, indexed by col_names. + # row_totals: hash of integers. Totals for the rows, indexed by row_names. + # data: hash of hash of numbers. Bug counts indexed by col_names and + # row_names values. + #%] + +[% PROCESS global/header.html.tmpl + title = "Report" + onload = "selectProduct(document.forms['queryform']);" + style = " + .t1 { background-color: #ffffff } + .t2 { background-color: #dfefff } + .t3 { background-color: #dddddd } + .t4 { background-color: #c3d3ed } + .ttotal { background-color: #cfffdf } + " +%] + +
+ + + + + + + + + + +
+ + [% col_field FILTER html %] +
+ [% row_field FILTER html %] + + + +[% classes = [ [ "t1", "t2" ] , [ "t3", "t4" ] ] %] +[% col_idx = 0 %] +[% row_idx = 0 %] + + + [% IF col_names %] + + + [% FOREACH col = col_names %] + [%# If no col header, skip the col. This makes display look right if + there's no defined X axis. Not doing this gives us two cols. %] + [% NEXT IF col == "" %] + [% col_idx = 1 - col_idx %] + + [% END %] + + + [% END %] + + [% FOREACH row = row_names %] + [% row_idx = 1 - row_idx %] + + + [% FOREACH col = col_names %] + [% NEXT IF col == "" %] + [% col_idx = 1 - col_idx %] + + [% END %] + + + [% END %] + + + [% row_idx = 1 - row_idx %] + + [% FOREACH col = col_names %] + [% NEXT IF col == "" %] + + [% END %] + + +
+ + [% col FILTER html %] + + Total +
+ [% row FILTER html %] + + [% IF data.$row.$col AND data.$row.$col > 0 %] + + [% data.$row.$col %] + [% ELSE %] + . + [% END %] + + [% row_totals.$row %] +
+ Total + + [% col_totals.$col %] + + + [% grand_total %] + +
+ + +
+ + Edit this report +
+ +
+ +[% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/search/search-report-table.html.tmpl b/template/en/default/search/search-report-table.html.tmpl new file mode 100644 index 000000000..32f816135 --- /dev/null +++ b/template/en/default/search/search-report-table.html.tmpl @@ -0,0 +1,125 @@ + +[%# 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 + #%] + +[%# INTERFACE: + # This template has no interface. However, to use it, you need to fulfill + # the interfaces of the templates it contains. + #%] + +[% PROCESS global/header.html.tmpl + title = "Generate Report" + onload = "selectProduct(document.forms['reportform']);" +%] + +

+ Produce a table of bug counts by choosing two fields to plot against each + other, and then refining your set of bugs using the rest of the form. +

+ +[% button_name = "Generate Report" %] + +
+ + + + + + + + + + + + + + + +
+ Vertical Axis + + Horizontal Axis + +    + + Format +
+ [% PROCESS select sel = { name => 'y_axis_field' } %] + + [% PROCESS select sel = { name => 'x_axis_field', noop = 1 } %] + +    + + HTML + CSV +
+ +
+ +[% PROCESS search/form.html.tmpl %] + +
+ + +
+ +[% PROCESS "search/boolean-charts.html.tmpl" %] + +
+ +[% PROCESS global/footer.html.tmpl %] + +[%############################################################################%] +[%# Block for SELECT fields #%] +[%############################################################################%] + +[% BLOCK select %] + [% fields = [ + { name => "", description => "---" }, + { name => "product", description => "Product" }, + { name => "component", description => "Component" }, + { name => "version", description => "Version" }, + { name => "rep_platform", description => "Platform" }, + { name => "op_sys", description => "OS" }, + { name => "bug_status", description => "Status" }, + { name => "resolution", description => "Resolution" }, + { name => "bug_severity", description => "Severity" }, + { name => "priority", description => "Priority" }, + { name => "target_milestone", description => "Target Milestone" }, + { name => "keywords", description => "Keywords" }, + { name => "assigned_to", description => "Assignee" }, + { name => "reporter", description => "Reporter" }, + { name => "qa_contact", description => "QA Contact" }, + { name => "votes", description => "Votes" } ] %] + + +[% END %] -- cgit v1.2.3-24-g4f1b