Update web/templates/tools/login_attempts.html

This commit is contained in:
Joshua Laymon 2025-08-31 00:37:04 +00:00
parent 05806eca45
commit 7d93563f43

View File

@ -23,17 +23,37 @@
<tr style="background:#fff; box-shadow:0 1px 3px rgba(0,0,0,0.08);">
<td style="padding:10px 14px;">{{ a.timestamp|date:"Y-m-d H:i:s" }}</td>
<td style="padding:10px 14px;">{{ a.username }}</td>
<td style="padding:10px 14px;">{{ a.ip_address|default:"—" }}</td>
<td style="padding:10px 14px;">
{% if a.ip_address %}
<a href="http://{{ a.ip_address }}" target="_blank"
style="display:inline-block; padding:4px 10px; border-radius:999px;
background:#e5e7eb; color:#111; text-decoration:none; font-size:0.85em;">
{{ a.ip_address }}
</a>
{% else %}
{% endif %}
</td>
<td style="padding:10px 14px;">
{% if a.success %}
<span class="badge badge-success">Success</span>
<span style="display:inline-block; padding:4px 12px; border-radius:999px;
background:#22c55e; color:#fff; font-size:0.85em;">
Success
</span>
{% else %}
<span class="badge badge-danger">Failed</span>
<span style="display:inline-block; padding:4px 12px; border-radius:999px;
background:#ef4444; color:#fff; font-size:0.85em;">
Failed
</span>
{% endif %}
</td>
</tr>
{% empty %}
<tr><td colspan="4" class="muted" style="padding:12px 14px;">No login attempts in the last 7 days.</td></tr>
<tr>
<td colspan="4" class="muted" style="padding:12px 14px;">
No login attempts in the last 7 days.
</td>
</tr>
{% endfor %}
</tbody>
</table>