{% extends "base.html" %}
{% block title %}Wykryte anomalie{% endblock %}
{% block content %}
<div class="container">
  <h2 class="mb-4">Wykryte anomalie</h2>
  <table class="table table-bordered">
    <thead>
      <tr>
        <th>Data</th>
        <th>Urządzenie</th>
        <th>Opis</th>
        <th>Status</th>
      </tr>
    </thead>
    <tbody>
      {% for anomaly in anomalies %}
      <tr>
        <td>{{ anomaly.timestamp.strftime('%Y-%m-%d %H:%M:%S') }}</td>
        <td>{{ anomaly.device.name or anomaly.device.ip if anomaly.device }}</td>
        <td>{{ anomaly.description }}</td>
        <td>{{ 'Rozwiązana' if anomaly.resolved else 'Otwarta' }}</td>
      </tr>
      {% endfor %}
    </tbody>
  </table>
</div>
{% endblock %}