Interface web Flask securisee pour surveiller CPU, RAM, disques et processus (JVM, Nginx, Amadea Web 8 x64). Alertes email SMTP configurables, seuils reglables, compilation PyInstaller en .exe, installation service Windows via NSSM. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
61 lines
2.0 KiB
HTML
61 lines
2.0 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}Supervision - Alertes{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="d-flex justify-content-between align-items-center mb-3">
|
|
<h4 class="mb-0"><i class="bi bi-bell"></i> Historique des alertes</h4>
|
|
{% if alerts %}
|
|
<form method="POST" action="{{ url_for('clear_alerts') }}">
|
|
<button type="submit" class="btn btn-sm btn-outline-danger"
|
|
onclick="return confirm('Effacer tout l\'historique ?')">
|
|
<i class="bi bi-trash"></i> Effacer l'historique
|
|
</button>
|
|
</form>
|
|
{% endif %}
|
|
</div>
|
|
|
|
{% if not alerts %}
|
|
<div class="alert alert-info">
|
|
<i class="bi bi-info-circle"></i> Aucune alerte enregistree.
|
|
</div>
|
|
{% else %}
|
|
<div class="card">
|
|
<div class="card-body p-0">
|
|
<table class="table table-hover mb-0">
|
|
<thead>
|
|
<tr>
|
|
<th>Date</th>
|
|
<th>Type</th>
|
|
<th>Message</th>
|
|
<th>Valeur</th>
|
|
<th>Seuil</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for alert in alerts %}
|
|
<tr>
|
|
<td class="text-nowrap">
|
|
<small>{{ alert.timestamp[:19] | replace('T', ' ') }}</small>
|
|
</td>
|
|
<td>
|
|
{% if alert.type == 'process_down' %}
|
|
<span class="badge bg-danger">Processus</span>
|
|
{% else %}
|
|
<span class="badge bg-warning text-dark">Seuil</span>
|
|
{% endif %}
|
|
</td>
|
|
<td>{{ alert.message }}</td>
|
|
<td>{{ alert.value }}</td>
|
|
<td>{{ alert.threshold }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="text-muted small mt-2">
|
|
{{ alerts | length }} alerte(s) — les 500 dernieres sont conservees.
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|