This commit is contained in:
Mateusz Gruszczyński
2025-02-23 17:47:54 +01:00
parent a53ff42934
commit 0267e4c2bb
13 changed files with 944 additions and 0 deletions

33
templates/logs.html Normal file
View File

@ -0,0 +1,33 @@
{% extends "base.html" %}
{% block title %}Logi - Aplikacja Updatera{% endblock %}
{% block content %}
<h2>Logi</h2>
<table class="table table-striped">
<thead class="table-dark">
<tr>
<th>Data i czas</th>
<th>Urządzenie</th>
<th>Wiadomość</th>
</tr>
</thead>
<tbody>
{% for log in logs %}
<tr>
<td>{{ log.timestamp.strftime('%Y-%m-%d %H:%M:%S') }}</td>
<td>
{% if log.device_id %}
<a href="{{ url_for('device_detail', device_id=log.device_id) }}">Urządzenie #{{ log.device_id }}</a>
{% else %}
Ogólne
{% endif %}
</td>
<td><pre style="white-space: pre-wrap;">{{ log.message }}</pre></td>
</tr>
{% else %}
<tr>
<td colspan="3" class="text-center">Brak logów.</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}