{% extends 'dashboard/base.twig' %} {% block title %}Traçabilité des actions{% endblock %} {# HEADER : ACTIONS GLOBALES #} {% block actions %}
{# Bouton Exporter XLSX #} Exporter XLSX
{% endblock %} {% block body %}
{# STATISTIQUES #}

Journal d'Audit

Historique sécurisé par signature cryptographique

{{ logs.getTotalItemCount }} ENREGISTREMENTS
{# COLONNE ACTIONS VISIBLE UNIQUEMENT POUR ROOT #} {% if is_granted('ROLE_ROOT') %} {% endif %} {% for log in logs %} {# 1. DATE #} {# 2. ADMIN & UA #} {# 3. TYPE D'ACTION TRADUIT #} {# 3. TYPE D'ACTION TRADUIT ET STYLISÉ #} {# 4. INTÉGRITÉ (HASH CHECK) #} {# 5. DÉTAILS #} {# 6. CELLULE ACTIONS VISIBLE UNIQUEMENT POUR ROOT #} {% if is_granted('ROLE_ROOT') %} {% endif %} {% else %} {# On ajuste le colspan dynamiquement #} {% endfor %}
Horodatage Administrateur & Appareil Action Intégrité DétailsActions
{{ log.actionAt|date('d/m/Y') }}
{{ log.actionAt|date('H:i:s') }}
{{ log.account.firstName|first|upper }}{{ log.account.name|first|upper }}
{{ log.account.firstName }} {{ log.account.name }} {% if 'ROLE_ROOT' in log.account.roles %} Root {% endif %}
{{ log.account.email }}
{% if log.userAgent %} {% set ua = log.userAgent|lower %}
{% if 'firefox' in ua %} {% elseif 'chrome' in ua %} {% else %} {% endif %} {{ log.userAgent }}
{% endif %}
{% set typeMapping = { 'CREATE': { 'label': 'CRÉATION', 'style': 'bg-emerald-500/10 text-emerald-600 border-emerald-500/20' }, 'DELETE': { 'label': 'SUPPRESSION', 'style': 'bg-rose-500/10 text-rose-600 border-rose-500/20' }, 'UPDATE': { 'label': 'MODIFICATION', 'style': 'bg-blue-500/10 text-blue-600 border-blue-500/20' }, 'AUTH': { 'label': 'CONNEXION', 'style': 'bg-amber-500/10 text-amber-600 border-amber-500/20' }, 'VIEW': { 'label': 'CONSULTATION', 'style': 'bg-sky-500/10 text-sky-600 border-sky-500/20' }, 'SECURITY_ALERT': { 'label': 'ALERTE SÉCURITÉ', 'style': 'bg-orange-500/10 text-orange-600 border-orange-500/20' }, 'SECURITY_CRITICAL': { 'label': 'CRITIQUE', 'style': 'bg-red-600 text-white border-red-700 animate-pulse font-black' } } %} {# On récupère la configuration ou on utilise une valeur par défaut #} {% set config = typeMapping[log.type] ?? { 'label': log.type, 'style': 'bg-slate-500/10 text-slate-500 border-slate-500/20' } %} {{ config.label }} {% if log.hashCode == log.generateSignature %}
Valide
{% else %}
Altéré
{% endif %}
{{ log.message }}
{{ log.path }}
Aucun enregistrement.
{# PAGINATION #}
Page {{ logs.getCurrentPageNumber }} — {{ logs|length }} logs affichés
{% endblock %}