diff options
author | Byron Jones <glob@mozilla.com> | 2014-10-31 08:20:42 +0100 |
---|---|---|
committer | Byron Jones <glob@mozilla.com> | 2014-10-31 08:20:42 +0100 |
commit | 908480c98aa48a9d1caf09ee00f3cfe0863afec2 (patch) | |
tree | a15dc741c3fe821865291a0789fda1607d2a67a4 /template | |
parent | f1fda7c8b9cf4646374cc708c14942e5feed82d1 (diff) | |
download | bugzilla-908480c98aa48a9d1caf09ee00f3cfe0863afec2.tar.gz bugzilla-908480c98aa48a9d1caf09ee00f3cfe0863afec2.tar.xz |
Bug 1062739: add the ability for administrators to limit the number of emails sent to a user per minute and hour
r=dylan,a=glob
Diffstat (limited to 'template')
-rw-r--r-- | template/en/default/admin/admin.html.tmpl | 6 | ||||
-rw-r--r-- | template/en/default/admin/reports/job_queue.html.tmpl | 74 | ||||
-rw-r--r-- | template/en/default/global/user-error.html.tmpl | 2 |
3 files changed, 82 insertions, 0 deletions
diff --git a/template/en/default/admin/admin.html.tmpl b/template/en/default/admin/admin.html.tmpl index 9f60eb662..01e9f309b 100644 --- a/template/en/default/admin/admin.html.tmpl +++ b/template/en/default/admin/admin.html.tmpl @@ -118,6 +118,12 @@ and time, and get the result of these queries directly per email. This is a good way to create reminders and to keep track of the activity in your installation.</dd> + [% IF Param('use_mailer_queue') %] + [% class = user.in_group('admin') ? "" : "forbidden" %] + <dt id="view_job_queue" class="[% class %]"><a href="view_job_queue.cgi">Job Queue</a></dt> + <dd class="[% class %]">View the queue of undelivered/deferred jobs/emails.</dd> + [% END %] + [% Hook.process('end_links_right') %] </dl> </td> diff --git a/template/en/default/admin/reports/job_queue.html.tmpl b/template/en/default/admin/reports/job_queue.html.tmpl new file mode 100644 index 000000000..6057eac7f --- /dev/null +++ b/template/en/default/admin/reports/job_queue.html.tmpl @@ -0,0 +1,74 @@ +[%# 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. + #%] + +[% INCLUDE global/header.html.tmpl + title = "Job Queue Status" + style_urls = [ "skins/standard/admin.css" ] +%] + +[% IF jobs.size %] + + <p class="report_information"> + [% IF too_many_jobs %] + [% job_count FILTER html %] jobs found, + limiting results to [% constants.JOB_QUEUE_VIEW_MAX_JOBS FILTER html %] jobs. + [% ELSE %] + [% jobs.size FILTER none %] jobs(s) in the queue. + [% END %] + </p> + + <table id="report" class="hover" cellspacing="0" border="0" width="100%"> + <tr id="report-header"> + <th>Next Attempt After</th> + <th>Error Count</th> + <th>Error Time</th> + <th>Error Message</th> + <th>Job</th> + </tr> + [% FOREACH job IN jobs %] + <tr class="report item [% loop.count % 2 == 1 ? "report_row_odd" : "report_row_even" %]"> + <td nowrap> + [% IF job.grabbed_until %] + [% time2str("%Y-%m-%d %H:%M:%S %Z", job.grabbed_until) FILTER html %] + [% ELSE %] + [% time2str("%Y-%m-%d %H:%M:%S %Z", job.run_time) FILTER html %] + [% END %] + </td> + <td> + [% job.error_count || "-" FILTER html %] + </td> + <td nowrap> + [% IF job.error_count %] + [% time2str("%Y-%m-%d %H:%M:%S %Z", job.error_time) FILTER html %] + [% ELSE %] + - + [% END %] + </td> + <td> + [% IF job.grabbed_until %] + Deferred + [% ELSIF job.error_count %] + [% job.error_message FILTER html %] + [% ELSE %] + - + [% END %] + </td> + <td>[% job.subject || '-' FILTER html %]</td> + </tr> + [% END %] + </table> + +[% ELSE %] + + <p class="report_information"> + The job queue is empty. + </p> + +[% END %] + +[% INCLUDE global/footer.html.tmpl %] diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl index e9bdb63c4..78d8823f5 100644 --- a/template/en/default/global/user-error.html.tmpl +++ b/template/en/default/global/user-error.html.tmpl @@ -191,6 +191,8 @@ group access [% ELSIF object == "groups" %] groups + [% ELSIF object == "job_queue" %] + the job queue [% ELSIF object == "keywords" %] keywords [% ELSIF object == "milestones" %] |