✨ feat(ansible): Ajoute les tâches cron pour recherche et sauvegarde
📝 style(templates): Crée un template de mail pour notifications de sauvegarde 🐛 fix(.gitignore): Exclut les fichiers de sauvegarde .zip 🎨 style(dashboard): Crée une page pour la gestion des sauvegardes ✨ feat(command): Implémente la commande de sauvegarde avec notification et rétention 🎨 style(dashboard): Améliore l'interface de recherche avec des effets visuels ✨ feat(dashboard): Ajoute une page pour la gestion des sauvegardes ✅ test(controller): Ajoute la logique de téléchargement et suppression des sauvegardes
This commit is contained in:
39
templates/mails/backup_notification.twig
Normal file
39
templates/mails/backup_notification.twig
Normal file
@@ -0,0 +1,39 @@
|
||||
{% extends 'mails/base.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<mj-section background-color="#ffffff" padding-bottom="20px" padding-top="20px">
|
||||
<mj-column width="100%">
|
||||
<mj-text align="center" font-size="20px" font-weight="900" font-family="Helvetica, Arial, sans-serif" text-transform="uppercase" letter-spacing="1px">
|
||||
Rapport de Sauvegarde
|
||||
</mj-text>
|
||||
|
||||
<mj-text align="center" color="{{ datas.backup.status == 'SUCCESS' ? '#10b981' : '#ef4444' }}" font-size="16px" font-weight="bold">
|
||||
Statut : {{ datas.backup.status == 'SUCCESS' ? 'OPÉRATION RÉUSSIE ✅' : 'ÉCHEC DÉTECTÉ ❌' }}
|
||||
</mj-text>
|
||||
|
||||
<mj-table padding="20px 40px">
|
||||
<tr style="border-bottom:1px solid #ecedee;text-align:left;padding:15px 0;">
|
||||
<th style="padding: 10px 0; color: #4b5563;">Date</th>
|
||||
<td style="padding: 10px 0; text-align: right; font-weight: bold;">{{ datas.backup.createdAt|date('d/m/Y H:i') }}</td>
|
||||
</tr>
|
||||
{% if datas.backup.status == 'SUCCESS' %}
|
||||
<tr style="border-bottom:1px solid #ecedee;text-align:left;padding:15px 0;">
|
||||
<th style="padding: 10px 0; color: #4b5563;">Taille de l'archive</th>
|
||||
<td style="padding: 10px 0; text-align: right; font-weight: bold; color: #2563eb;">{{ datas.backup.sizeMb }} MB</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr style="border-bottom:1px solid #ecedee;text-align:left;padding:15px 0;">
|
||||
<th style="padding: 10px 0; color: #4b5563;">ID Log</th>
|
||||
<td style="padding: 10px 0; text-align: right; font-family: monospace;">#{{ datas.backup.id }}</td>
|
||||
</tr>
|
||||
</mj-table>
|
||||
|
||||
{% if datas.backup.status == 'ERROR' %}
|
||||
<mj-text background-color="#fef2f2" color="#991b1b" padding="20px" font-family="monospace" font-size="12px" border-radius="8px">
|
||||
<strong>Message d'erreur :</strong><br/>
|
||||
{{ datas.backup.errorMessage }}
|
||||
</mj-text>
|
||||
{% endif %}
|
||||
</mj-column>
|
||||
</mj-section>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user