summaryrefslogtreecommitdiffstats
path: root/extensions/ProductDashboard/template/en/default/pages/productdashboard/components.html.tmpl
blob: 7f5a05568893aec46c7bddd5249a77198825ad40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
[%# This Source Code Form is subject to the terms of the Mozilla Public
  # License, v. 2.0. If a copy of the MPL was not distributed with this
  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  #
  # This Source Code Form is "Incompatible With Secondary Licenses", as
  # defined by the Mozilla Public License, v. 2.0.
  #%]

[% IF summary.keys %]

  <h3>Summary for [% summary.type FILTER html %]: [% summary.value FILTER html %]</h3>

  <style>
    .yui-skin-sam .yui-dt table {width:100%;}
  </style>

  <script type="text/javascript">
  <!--
  var column_defs = [
      { key:"id", label:"ID", sortable:true, sortOptions:{ sortFunction:sortBugIdLinks } },
      { key:"bug_status", label:"Status", sortable:true },
      { key:"version", label:"Version", sortable:true },
      { key:"component", label:"Component", sortable:true },
      { key:"bug_severity", label:"Severity", sortable:true, sortOptions:{ sortFunction:sortBugSeverity } },
      { key:"Summary", label:"Summary", sortable:false },
  ];
  var fields = [
      { key:"id" },
      { key:"bug_status" },
      { key:"version" },
      { key:"component" },
      { key:"bug_severity" },
      { key:"Summary" }
  ];
  [% IF user.is_timetracker %]
    addStatListener("past_due", "past_due_table", column_defs, fields, {
        [% IF summary.past_due.size > 25 %] paginator: new YAHOO.widget.Paginator({ rowsPerPage: 25 }) [% END %]
    });
  [% END %]
  addStatListener("updated_recently", "updated_recently_table", column_defs, fields, {
      [% IF summary.updated_recently.size > 25 %] paginator: new YAHOO.widget.Paginator({ rowsPerPage: 25 }) [% END %]
  });
  -->
  </script>

  [% IF user.is_timetracker %]
    <p>
      <a href="#past_due">Past Due</a> |
      <a href="#updated_recently">Updated Recently</a> 
    </p>
  [% END %]

  <div class="yui-skin-sam">

    [% IF user.is_timetracker %]
      <a name="past_due"></a>
      <b>[% summary.past_due.size FILTER html %] Past Due [% terms.Bugs %]</b> (deadline is before today's date)
      (<a href="[% bug_link FILTER html %]&amp;[% summary.type FILTER uri %]=[% summary.value FILTER uri %]&field0-0-0=deadline&type0-0-0=lessthan&value0-0-0=[% summary.timestamp FILTER uri %]&order=deadline">full list</a>)
      <div id="past_due">
        <table id="past_due_table" cellspacing="3" cellpadding="0" border="0" width="100%">
        <thead>
            <tr bgcolor="#CCCCCC">
              [% FOREACH column = [ "ID", "Status", "Version", "Component", "Severity" "Summary" ] %]
                <th>[% column FILTER html %]</th>
              [% END %]
            </tr>
        </thead>
        <tbody>
        [% FOREACH bug = summary.past_due %]
          [% count = loop.count() %]
          <tr class="[%+ count % 2 == 1 ? "bz_row_odd" : "bz_row_even" -%]">
            <td align="center"><a href="[% urlbase FILTER none %]show_bug.cgi?id=[% bug.id FILTER uri %]">
              [% bug.id FILTER html %]</a></td>
            <td align="center">[% bug.status FILTER html %]</td>
            <td align="center">[% bug.version FILTER html %]</td>
            <td align="center">[% bug.component FILTER html %]</td>
            <td align="center">[% bug.severity FILTER html %]</td>
            <td>[% bug.summary FILTER html %]</td>
          </tr>
        [% END %]
        </tbody>
        </table>
      </div>
      <br>
    [% END %]

    <a name="updated_recently"></a>
    <b>[% summary.updated_recently.size FILTER html %] Most Recently Updated [% terms.Bugs %]</b>
    [% IF user.is_timetracker %](<a href="#top">back to top</a>)[% END %]
    (<a href="[% bug_link FILTER html %]&amp;[% summary.type FILTER uri %]=[% summary.value FILTER uri %]&order=changeddate DESC">full list</a>)
    <div id="updated_recently">
      <table id="updated_recently_table" cellspacing="3" cellpadding="0" border="0" width="100%">
      <thead>
          <tr bgcolor="#CCCCCC">
            [% FOREACH column = [ "ID", "Status", "Version", "Component", "Severity" "Summary" ] %]
              <th>[% column FILTER html %]</th>
            [% END %]
          </tr>
      </thead>
      <tbody>
      [% FOREACH bug = summary.updated_recently %]
        [% count = loop.count() %]
        <tr class="[%+ count % 2 == 1 ? "bz_row_odd" : "bz_row_even" -%]">
          <td align="center"><a href="[% urlbase FILTER none %]show_bug.cgi?id=[% bug.id FILTER uri %]">
            [% bug.id FILTER html %]</a></td>
          <td align="center">[% bug.status FILTER html %]</td>
          <td align="center">[% bug.version FILTER html %]</td>
          <td align="center">[% bug.component FILTER html %]</td>
          <td align="center">[% bug.severity FILTER html %]</td>
          <td>[% bug.summary FILTER html %]</td>
        </tr>
      [% END %]
      </tbody>
      </table>
    </div>
  </div>

[% ELSE %]

  [% summary_url = "page.cgi?id=productdashboard.html&amp;product=$url_filtered_product&bug_status=$url_filtered_status&tab=components" %]

  <script type="text/javascript">
  <!--
  var column_defs = [
      { key:"name", label:"Name", sortable:true },
      { key:"count", label:"Count", sortable:true },
      { key:"percentage", label:"Percentage", sortable:false },
      { key:"bug_list", label:"[% terms.Bug %] List", sortable:false }
  ];
  var fields = [
      { key:"name" },
      { key:"count", parser:"number" },
      { key:"percentage" },
      { key:"bug_list" }
  ];
  addStatListener("component_counts", "component_counts_table", column_defs, fields, {});
  addStatListener("version_counts", "version_counts_table", column_defs, fields, {});
  addStatListener("milestone_counts", "milestone_counts_table", column_defs, fields, {});
  -->
  </script>

  <p>
    <a href="#component">Component</a> |
    <a href="#version">Version</a> |
    <a href="#milestone">Milestone</a>
  </p>

  <p>Click on value to show additional information</p>

  <div class="yui-skin-sam"> 
    <a name="component"></a>
    <b>Component</b>
    <div id="component_counts">
      <table id="component_counts_table" border="0" cellspacing="3" cellpadding="0">
      <thead>
        <tr>
          <th>Name</th>
          <th>Count</th>
          <th>Percentage</th>
          <th>[% terms.Bug %] List</th>
        </tr>
      </thead>
      <tbody>
      [% FOREACH col = by_component %]
        <tr>
          <td>
            <a href="[% summary_url FILTER none %]&component=[% col.0 FILTER uri %]">
            [% col.0 FILTER html %]</a>
          </td>
          <td align="right">
            [% col.1 FILTER html %]
          </td>
          <td width="70%">
            [% INCLUDE bar_graph count = col.1 %]
          </td>
          <td> 
            <a href="[% bug_link FILTER html %]&amp;component=[% col.0 FILTER uri %]">View</a>
          </td>
        </tr>
      [% END %]
      </tbody>
      </table>
    </div>
    <br>
    <a name="version"></a>
    <b>Version</b>
    (<a href="#top">back to top</a>)
    <div id="version_counts">
      <table id="version_counts_table" border="0" cellspacing="3" cellpadding="0">
      <thead>
        <tr>
          <th>Name</th>
          <th>Count</th>
          <th>Percentage</th>
          <th>[% terms.Bug %] List</th>
        </tr>
      </thead>
      <tbody>
      [% FOREACH col = by_version %]
        <tr>
          <td>
            <a href="[% summary_url FILTER none %]&version=[% col.0 FILTER uri %]">
            [% col.0 FILTER html %]</a>
          </td>
          <td align="right">
            [% col.1 FILTER html %]
          </td>
          <td width="70%">
            [% INCLUDE bar_graph count = col.1 %]
          </td>
          <td> 
            <a href="[% bug_link FILTER html %]&amp;version=[% col.0 FILTER uri %]">View</a>
          </td>
        </tr>
      [% END %]
      </tbody>
      </table>
    </div>

    [% IF Param('usetargetmilestone') %]
      <br>
      <a name="milestone"></a>
      <b>Milestone</b>
      (<a href="#top">back to top</a>)
      <div id="milestone_counts">
        <table id="milestone_counts_table" border="0" cellspacing="3" cellpadding="0">
        <thead>
          <tr>
            <th>Name</th>
            <th>Count</th>
            <th>Percentage</th>
            <th>[% terms.Bug %] List</th>
          </tr>
        </thead>
        <tbody>
        [% FOREACH col = by_milestone %]
          <tr>
            <td>
              <a href="[% summary_url FILTER none %]&target_milestone=[% col.0 FILTER uri %]">
              [% col.0 FILTER html %]</a>
            </td>
            <td align="right">
              [% col.1 FILTER html %]
            </td>
            <td width="70%">
              [% INCLUDE bar_graph count = col.1 %]
            </td>
            <td> 
              <a href="[% bug_link FILTER html %]&amp;target_milestone=[% col.0 FILTER uri %]">View</a>
            </td>
          </tr>
        [% END %]
        </tbody>
        </table>
      </div>
    [% END %]
  </div>

[% END %]