{% extends "base.html" %} {% block breadcrumb_items %} {% endblock %} {% block content %}

Admin Dashboard

Welcome to the FABI+ administration interface

{{ dashboard_data.models|length }}

Models

{% set total_records = dashboard_data.models|sum(attribute='count') %} {{ total_records }}

Total Records

{{ user.username }}

Current User

{% if user.is_superuser %} Superuser {% elif user.is_staff %} Staff {% else %} User {% endif %}

Access Level

Models Overview
Click on a model to manage its data
{% if dashboard_data.models %}
{% for model in dashboard_data.models %}
{{ model.verbose_name_plural }}
{{ model.count }}

{{ model.description or 'No description available' }}

{% if model.fields %}
Fields:
{% for field in model.fields %} {% if loop.index <= 4 %} {{ field.name }} {% endif %} {% endfor %} {% if model.fields|length > 4 %} +{{ model.fields|length - 4 }} more {% endif %}
{% endif %}
{% endfor %}
{% else %}
No Models Found

No models are currently registered in the system.

{% endif %}
Quick Actions
User Management

Manage user accounts and permissions

{% if user.is_superuser %}
Activity Monitor

View system activities and logs

Live Server Logs

Monitor real-time server logs

System Settings

Configure application settings

Analytics

View system analytics and reports

Security

Monitor security and access logs

{% endif %}
{% if user.is_superuser %}
Recent Activity
View All
{% if recent_activities %}
{% for activity in recent_activities %}
{% if activity.activity_type == 'LOGIN' %} {% elif activity.activity_type == 'LOGOUT' %} {% elif activity.activity_type == 'CREATE' %} {% elif activity.activity_type == 'UPDATE' %} {% elif activity.activity_type == 'DELETE' %} {% elif activity.activity_type == 'ADMIN_ACCESS' %} {% else %} {% endif %}
{{ activity.description }}

{% if activity.user_email %} by {{ activity.user_email }} {% else %} by anonymous user {% endif %} {% if activity.user_ip %} from {{ activity.user_ip }} {% endif %}

{% if activity.object_type and activity.object_repr %} {{ activity.object_type }}: {{ activity.object_repr }} {% endif %}
{{ activity.timestamp.strftime('%H:%M:%S') }} {% if activity.level == 'high' or activity.level == 'critical' %}
{{ activity.level.upper() }} {% elif activity.level == 'medium' %}
{{ activity.level.upper() }} {% endif %}
{% endfor %}
{% else %}
No Recent Activity

No recent activities to display.

{% endif %}
{% endif %} {% if user.is_superuser and dashboard_stats %}
Activity Statistics

{{ dashboard_stats.total_activities or 0 }}

Total Activities

{{ dashboard_stats.today_activities or 0 }}

Today
Database Statistics
{% set total_records = dashboard_data.models|sum(attribute='count') %}

{{ dashboard_data.models|length }}

Models

{{ total_records }}

Records
{% endif %} {% endblock %} {% block extra_js %} {% endblock %}