32 lines
1.5 KiB
HTML
32 lines
1.5 KiB
HTML
{% extends 'base.html' %}
|
|
{% block title %}<i class="fa-solid fa-bell me-2 text-primary"></i>Powiadomienia{% endblock %}
|
|
{% block content %}
|
|
{% set eyebrow='Log systemowy' %}{% set heading='Dziennik powiadomień' %}{% set description='Ostatnie wpisy z kanałów Pushover, maili i pozostałych integracji.' %}
|
|
{% include 'partials/page_header.html' with context %}
|
|
|
|
{% set tone_map = {'wysłano':'success','wysłane':'success','sukces':'success','błąd':'danger','blad':'danger','pominięto':'secondary','oczekuje':'warning'} %}
|
|
<div class="card shadow-sm border-0">
|
|
<div class="table-responsive">
|
|
<table class="table table-hover mb-0 align-middle">
|
|
<thead>
|
|
<tr><th>Data</th><th>Kanał</th><th>Status</th><th>Treść</th></tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for log in logs %}
|
|
{% set status = status_pl(log.status) %}
|
|
{% set badge = tone_map.get(status|lower, 'light') %}
|
|
<tr>
|
|
<td class="text-nowrap small">{{ log.created_at.strftime('%Y-%m-%d %H:%M') if log.created_at else '—' }}</td>
|
|
<td><span class="badge rounded-pill text-bg-light border">{{ channel_pl(log.channel) }}</span></td>
|
|
<td><span class="badge rounded-pill text-bg-{{ badge }}">{{ status }}</span></td>
|
|
<td class="small">{{ log.message }}</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr><td colspan="4" class="text-center text-secondary py-5">Brak wpisów.</td></tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|