add counts for unavailable / abuse / abuse_blocked hosts to status view
This commit is contained in:
parent
bd0cf7c907
commit
c20295e68b
@ -19,6 +19,8 @@
|
||||
<dl>
|
||||
<dt>Total:</dt>
|
||||
<dd>{{ hosts_total }}</dd>
|
||||
<dt>Unavailable / Abuse / Abuse-Blocked:</dt>
|
||||
<dd>{{ hosts_unavailable }} / {{ hosts_abuse }} / {{ hosts_abuse_blocked }}</dd>
|
||||
<dt>ip v4 (ssl) / v6 (ssl) updated last 2d:</dt>
|
||||
<dd>{{ hosts_ipv4_2d }} ({{ hosts_ipv4_ssl_2d }}) / {{ hosts_ipv6_2d }} ({{ hosts_ipv6_ssl_2d }})</dd>
|
||||
<dt>ip v4 (ssl) / v6 (ssl) updated last 2w:</dt>
|
||||
|
@ -101,6 +101,9 @@ class StatusView(TemplateView):
|
||||
context['domains_unavailable'] = Domain.objects.filter(available=False).count()
|
||||
context['domains_public'] = Domain.objects.filter(public=True).count()
|
||||
context['hosts_total'] = Host.objects.count()
|
||||
context['hosts_unavailable'] = Host.objects.filter(available=False).count()
|
||||
context['hosts_abuse'] = Host.objects.filter(abuse=True).count()
|
||||
context['hosts_abuse_blocked'] = Host.objects.filter(abuse_blocked=True).count()
|
||||
t_now = now()
|
||||
before_2d = t_now - timedelta(hours=48)
|
||||
before_2w = t_now - timedelta(days=14)
|
||||
|
Loading…
x
Reference in New Issue
Block a user