From f1ddf54f4cfc06d99ded78e496c45b324fc0815d Mon Sep 17 00:00:00 2001 From: "gerv%gerv.net" <> Date: Tue, 8 Oct 2002 13:41:17 +0000 Subject: Bug 171437 - Enhancements to generic reporting. Reporting menu, 3D tables, rearranged UI, better API for new report types. Patch by gerv; r=joel. --- template/en/default/global/useful-links.html.tmpl | 2 +- template/en/default/global/user-error.html.tmpl | 5 + template/en/default/reports/menu.html.tmpl | 61 ++++++ template/en/default/reports/report-table.csv.tmpl | 57 ++++++ template/en/default/reports/report-table.html.tmpl | 207 +++++++++++++++++++++ template/en/default/reports/table.csv.tmpl | 41 ---- template/en/default/reports/table.html.tmpl | 143 -------------- .../default/search/search-report-table.html.tmpl | 98 +++++----- 8 files changed, 377 insertions(+), 237 deletions(-) create mode 100644 template/en/default/reports/menu.html.tmpl create mode 100644 template/en/default/reports/report-table.csv.tmpl create mode 100644 template/en/default/reports/report-table.html.tmpl delete mode 100644 template/en/default/reports/table.csv.tmpl delete mode 100644 template/en/default/reports/table.html.tmpl (limited to 'template/en/default') diff --git a/template/en/default/global/useful-links.html.tmpl b/template/en/default/global/useful-links.html.tmpl index 785a9d75e..07ae8f6fe 100644 --- a/template/en/default/global/useful-links.html.tmpl +++ b/template/en/default/global/useful-links.html.tmpl @@ -49,7 +49,7 @@ bug # | - Reports + Reports | Requests diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl index 1f36f6f1e..91ee01743 100644 --- a/template/en/default/global/user-error.html.tmpl +++ b/template/en/default/global/user-error.html.tmpl @@ -521,6 +521,11 @@ [% title = "Wrong Token" %] That token cannot be used to change your email address. + [% ELSIF error == "z_axis_defined_with_no_x_axis" %] + [% title = "Nonsensical Options" %] + You've defined a field for multiple tables without having defined + a horizontal axis for those tables. + [% ELSIF error == "zero_length_file" %] [% title = "File Is Empty" %] The file you are trying to attach is empty! diff --git a/template/en/default/reports/menu.html.tmpl b/template/en/default/reports/menu.html.tmpl new file mode 100644 index 000000000..d93717532 --- /dev/null +++ b/template/en/default/reports/menu.html.tmpl @@ -0,0 +1,61 @@ + +[%# 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. It's a list of the available report + # types in Bugzilla. + #%] + +[% PROCESS global/header.html.tmpl + title = "Reporting and Charting Kitchen" +%] + +

+ Bugzilla allows you to view and track the state of your bug database in + all manner of exciting ways. +

+ +

Current State

+ + + +

Change Over Time

+ + + +[% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/reports/report-table.csv.tmpl b/template/en/default/reports/report-table.csv.tmpl new file mode 100644 index 000000000..a80a618c8 --- /dev/null +++ b/template/en/default/reports/report-table.csv.tmpl @@ -0,0 +1,57 @@ +[%# 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. + #%] + +[% tbl_names = names.tbl.keys.sort %] +[% col_names = names.col.keys.sort %] +[% row_names = names.row.keys.sort %] + +[% FOREACH tbl = tbl_names %] + [% IF tbl_field -%] + [% tbl FILTER html %] + [% END %] + + [% 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.$tbl AND data.$tbl.$col AND data.$tbl.$col.$row %] + [% data.$tbl.$col.$row -%], + [% ELSE %] + [% -%]0, + [% END %] + [% END %] + + [% END %] + +[% END %] diff --git a/template/en/default/reports/report-table.html.tmpl b/template/en/default/reports/report-table.html.tmpl new file mode 100644 index 000000000..81ca27866 --- /dev/null +++ b/template/en/default/reports/report-table.html.tmpl @@ -0,0 +1,207 @@ + +[%# 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 + # data: hash of hash of hash of numbers. Bug counts. + # names: hash of hash of strings. Names of tables, rows and columns. + # 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. + #%] + +[% PROCESS "global/field-descs.html.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: + [% "$tbl_field_disp / " IF tbl_field %] + [% "$col_field_disp / " IF col_field %] + [% row_field_disp %] +[% 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 */ + " +%] + +
+ [% time2str("%Y-%m-%d %H:%M:%S", time) %] +
+ +[% tbl_names = names.tbl.keys.sort %] +[% col_names = names.col.keys.sort %] +[% row_names = names.row.keys.sort %] + +[% total_name = "Total" %] + +[% IF tbl_field %] + [%# Calculate and set up the Total table %] + + [% FOREACH tbl = tbl_names %] + [% FOREACH row = row_names %] + [% FOREACH col = col_names %] + [% data.$total_name.$col.$row = + data.$total_name.$col.$row + data.$tbl.$col.$row %] + [% END %] + [% END %] + [% END %] + + [% tbl_names.push(total_name) %] +[% END %] + +
+ +[% FOREACH tbl = tbl_names %] + + [% IF tbl_field %] + + + + + [% END %] + + + + + + + + + +
+ +

[% tbl FILTER html %]

+
+ + [% col_field_disp FILTER html %] +
+ [% row_field_disp FILTER html %] + + + +[% classes = [ [ "t1", "t2" ] , [ "t3", "t4" ] ] %] +[% col_idx = 0 %] +[% row_idx = 0 %] +[% grand_total = 0 %] + + + [% IF col_field %] + + + [% FOREACH col = col_names %] + [% col_totals.$col = 0 %] + [% NEXT IF col == "" %] + + [% col_idx = 1 - col_idx %] + + [% END %] + + + [% END %] + + [% FOREACH row = row_names %] + [% row_total = 0 %] + + [% row_idx = 1 - row_idx %] + + + [% FOREACH col = col_names %] + [% row_total = row_total + data.$tbl.$col.$row %] + [% col_totals.$col = col_totals.$col + data.$tbl.$col.$row %] + [% 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.$tbl.$col.$row AND data.$tbl.$col.$row > 0 %] + + [% data.$tbl.$col.$row %] + [% ELSE %] + . + [% END %] + + + [% row_total %] + [% grand_total = grand_total + row_total %] +
+ Total + + + [% col_totals.$col %] + + + + [% grand_total %] + +
+ + +
+ +
+ +[% END %] + + Edit this report +
+ +
+ +[% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/reports/table.csv.tmpl b/template/en/default/reports/table.csv.tmpl deleted file mode 100644 index 96b0c3971..000000000 --- a/template/en/default/reports/table.csv.tmpl +++ /dev/null @@ -1,41 +0,0 @@ -[%# 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 deleted file mode 100644 index d9a04d5fd..000000000 --- a/template/en/default/reports/table.html.tmpl +++ /dev/null @@ -1,143 +0,0 @@ - -[%# 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 index 32f816135..73d542124 100644 --- a/template/en/default/search/search-report-table.html.tmpl +++ b/template/en/default/search/search-report-table.html.tmpl @@ -29,47 +29,51 @@ onload = "selectProduct(document.forms['reportform']);" %] +[% PROCESS "global/field-descs.html.tmpl" %] +

- 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. + Produce a table of bug counts by choosing one or more fields to plot against + each other, and then refining your set of bugs using the rest of the form. If + you choose a third axis, it will be represented by multiple tables of data.

[% button_name = "Generate Report" %]
- +
- - - - + + + + - - - - -
- Vertical Axis - - Horizontal Axis - -    - - Format - + + Horizontal Axis: + [% PROCESS select sel = { name => 'x_axis_field', noop = 1 } %] +    + Format:
+ HTML
+ CSV +
+ + Vertical Axis:
[% PROCESS select sel = { name => 'y_axis_field' } %]
- [% PROCESS select sel = { name => 'x_axis_field', noop = 1 } %] - -    - - HTML - CSV + + + + + +
+ Multiple Tables:
+ [% PROCESS select sel = { name => 'z_axis_field', noop = 1 } %] +
+
@@ -77,7 +81,8 @@
- + +
[% PROCESS "search/boolean-charts.html.tmpl" %] @@ -91,35 +96,24 @@ [%############################################################################%] [% 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" } ] %] + [% fields = ["product", "component", "version", "rep_platform", + "op_sys", "bug_status", "resolution", "bug_severity", + "priority", "target_milestone", "keywords", "assigned_to", + "reporter", "qa_contact", "votes" ] %] [% END %] -- cgit v1.2.3-24-g4f1b