summaryrefslogtreecommitdiffstats
path: root/template/en/default/admin
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2014-11-04 06:38:46 +0100
committerByron Jones <glob@mozilla.com>2014-11-04 06:38:46 +0100
commit7dc675fedb5b2631a8bafd0fb691eac485eff0af (patch)
tree548488280f00fc5e03ef841a2f997fa3fbb1ff73 /template/en/default/admin
parent300d1ba13e050aa1e954dde640092c448184cbba (diff)
downloadbugzilla-7dc675fedb5b2631a8bafd0fb691eac485eff0af.tar.gz
bugzilla-7dc675fedb5b2631a8bafd0fb691eac485eff0af.tar.xz
Bug 1092037: backport bug 1062739 to bmo (add the ability for administrators to limit the number of emails sent to a user per minute and hour)
Diffstat (limited to 'template/en/default/admin')
-rw-r--r--template/en/default/admin/admin.html.tmpl6
-rw-r--r--template/en/default/admin/reports/job_queue.html.tmpl74
2 files changed, 80 insertions, 0 deletions
diff --git a/template/en/default/admin/admin.html.tmpl b/template/en/default/admin/admin.html.tmpl
index 98f729b02..86bd8b973 100644
--- a/template/en/default/admin/admin.html.tmpl
+++ b/template/en/default/admin/admin.html.tmpl
@@ -127,6 +127,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 %]