{% extends "base.html" %} {% load static %} {% load i18n %} {% block title %}{% trans "Audit Dashboard" %}{% endblock %} {% block content %}

{% trans "System Activity Logs" %}

{% trans "Viewing Logs" %}: {{ tab_title }}

{% trans "Displaying" %}: {{ logs.start_index }}-{{ logs.end_index }} {% trans "of" %} {{ total_count }} {% trans "total records." %}

{% trans "Model Changes (CRUD)" %} {% trans "User Authentication" %} {% trans "HTTP Requests" %}
{% if active_tab == 'crud' %} {% elif active_tab == 'login' %} {% elif active_tab == 'request' %} {% endif %} {% for log in logs.object_list %} {% if active_tab == 'crud' %} {% elif active_tab == 'login' %} {% elif active_tab == 'request' %} {% endif %} {% empty %} {% endfor %}
{% trans "Date/Time" %} {% trans "User" %} {% trans "Action" %} {% trans "Model" %} {% trans "Object PK" %} {% trans "Changes" %}
{% trans "Date/Time" %} {% trans "User" %} {% trans "Type" %} {% trans "Status" %} {% trans "IP Address" %}
{% trans "Date/Time" %} {% trans "User" %} {% trans "Method" %} {% trans "Path" %}
{{ log.datetime|date:"Y-m-d H:i:s" }} {{ log.user.email|default:"N/A" }} {% if log.event_type == 1 %} {% trans "CREATE" %} {% elif log.event_type == 2 %} {% trans "UPDATE" %} {% else %} {% trans "DELETE" %} {% endif %} {{ log.content_type.app_label }}.{{ log.content_type.model }} {{ log.object_id }}
{{ log.changed_fields }}
{{ log.datetime|date:"Y-m-d H:i:s" }} {% with user_obj=log.user %} {% if user_obj %} {{ user_obj.get_full_name|default:user_obj.username }} {% else %} {{ log.username|default:"N/A" }} {% endif %} {% endwith %} {% if log.login_type == 0 %}{% trans "Login" %} {% elif log.login_type == 1 %}{% trans "Logout" %} {% else %}{% trans "Failed Login" %}{% endif %} {% if log.login_type == 2 %} {% trans "Failed" %} {% else %} {% trans "Success" %} {% endif %} {{ log.remote_ip|default:"Unknown" }}
{{ log.datetime|date:"Y-m-d H:i:s" }} {{ log.user.get_full_name|default:log.user.email|default:"Anonymous" }} {{ log.method }} {{ log.url}}
{% trans "No logs found for this section or database is empty." %}
{% if logs.has_other_pages %}
{% for i in logs.paginator.page_range %} {% if i > logs.number|add:'-3' and i < logs.number|add:'3' %} {{ i }} {% elif i == logs.number|add:'-3' or i == logs.number|add:'3' %} ... {% endif %} {% endfor %}
{% endif %}
{% endblock %}