forked from GithubBackups/healthchecks
Prepare for the removal of Check.user_id
This commit is contained in:
parent
fba8806e97
commit
e2d2665edf
@ -156,10 +156,10 @@ class Profile(models.Model):
|
|||||||
if nag and num_down == 0:
|
if nag and num_down == 0:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# Sort checks by owner. Need this because will group by owner in
|
# Sort checks by project. Need this because will group by project in
|
||||||
# template.
|
# template.
|
||||||
checks = checks.select_related("user", "user__profile")
|
checks = checks.select_related("project")
|
||||||
checks = checks.order_by("user_id")
|
checks = checks.order_by("project_id")
|
||||||
# list() executes the query, to avoid DB access while
|
# list() executes the query, to avoid DB access while
|
||||||
# rendering the template
|
# rendering the template
|
||||||
checks = list(checks)
|
checks = list(checks)
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
{% load humanize hc_extras %}
|
{% load humanize hc_extras %}
|
||||||
{% regroup checks by user as groups %}
|
{% regroup checks by project as groups %}
|
||||||
<table style="margin: 0; width: 100%; font-size: 16px;" cellpadding="0" cellspacing="0">
|
<table style="margin: 0; width: 100%; font-size: 16px;" cellpadding="0" cellspacing="0">
|
||||||
{% for group in groups %}
|
{% for group in groups %}
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" style="font-weight: bold; padding: 32px 8px 8px 8px; color: #333;">
|
<td colspan="2" style="font-weight: bold; padding: 32px 8px 8px 8px; color: #333;">
|
||||||
{{ group.grouper.profile|mangle_link }}
|
{{ group.grouper|mangle_link }}
|
||||||
</td>
|
</td>
|
||||||
<td style="padding: 32px 8px 8px 8px; margin: 0; font-size: 12px; color: #9BA2AB; font-family: Helvetica, Arial, sans-serif;">Last Ping</td>
|
<td style="padding: 32px 8px 8px 8px; margin: 0; font-size: 12px; color: #9BA2AB; font-family: Helvetica, Arial, sans-serif;">Last Ping</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user