Files
rar-autopass/app/web/templates/_jurnal.html
Claude Agent 4a2afc68bf chore: curatare agresiva comentarii — scoatere referinte US/PRD din cod si template-uri
Eliminat zgomotul de trasabilitate (US-xxx, PRD x.x, Rn, OV-x, Tn, decizii/naratiune
istorica) din 41 fisiere app/ + template-uri. Pastrate comentariile care documenteaza
invarianti si logica ne-evidenta (idempotenta/hash, reconciliere anti-duplicat, RAR 500
esec definitiv, creds per cont, WAF User-Agent, 422 fara echo de parola, scope NULL->1),
curatate doar de tokeni.

Verificare: pentru cele 27 module .py curatate, structura de cod (tokeni non-comentariu/
non-string) e IDENTICA fata de HEAD -> doar comentarii/docstring-uri schimbate. Singura
schimbare de cod e in tests/test_web_responsive.py (scos 3 assert pe markeri US-006/007/008,
inlocuite de asertiunile structurale alaturate). 0 tokeni US/PRD reziduali in app/.
Regresie: 896 passed, 1 deselected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 21:44:24 +00:00

107 lines
4.6 KiB
HTML

{# _jurnal.html — tab Jurnal de aplicatie.
Lista paginata de evenimente (app_events), redactate la scriere. Filtre tip/nivel/
data + (admin) cont. #}
<section id="jurnal-section" aria-labelledby="jurnal-heading">
<div class="card">
<div style="display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:0 0 12px;">
<h2 id="jurnal-heading" style="font-size:15px; margin:0;">Jurnal de aplicatie</h2>
{% if is_admin %}
<span class="pill s-sent" style="font-size:11px;">admin: toate conturile</span>
{% else %}
<span class="muted" style="font-size:12px;">doar evenimentele contului tau</span>
{% endif %}
</div>
<form id="filtre-jurnal"
hx-get="/_fragments/jurnal"
hx-target="#jurnal-wrap"
hx-swap="innerHTML"
hx-trigger="submit, change"
style="display:flex; gap:10px; flex-wrap:wrap; align-items:flex-end; margin-bottom:12px;">
<div>
<label for="j-tip" class="muted" style="display:block; font-size:12px;">Tip eveniment</label>
<select id="j-tip" name="tip">
<option value="">toate</option>
{% for t in tipuri %}
<option value="{{ t }}" {% if f_tip == t %}selected{% endif %}>{{ t }}</option>
{% endfor %}
</select>
</div>
<div>
<label for="j-nivel" class="muted" style="display:block; font-size:12px;">Nivel</label>
<select id="j-nivel" name="nivel">
<option value="">toate</option>
{% for nv in ("INFO", "WARNING", "ERROR", "CRITICAL", "DEBUG") %}
<option value="{{ nv }}" {% if f_nivel == nv %}selected{% endif %}>{{ nv }}</option>
{% endfor %}
</select>
</div>
<div>
<label for="j-data-de" class="muted" style="display:block; font-size:12px;">Data de la</label>
<input id="j-data-de" type="date" name="data_de" value="{{ f_data_de }}">
</div>
<div>
<label for="j-data-pana" class="muted" style="display:block; font-size:12px;">pana la</label>
<input id="j-data-pana" type="date" name="data_pana" value="{{ f_data_pana }}">
</div>
{% if is_admin %}
<div>
<label for="j-cont" class="muted" style="display:block; font-size:12px;">Cont (id)</label>
<input id="j-cont" type="number" name="cont" value="{{ f_cont }}" placeholder="toate" style="max-width:100px;">
</div>
{% endif %}
<button type="submit">Filtreaza</button>
</form>
<div id="jurnal-wrap">
{% if evenimente %}
<div class="tablewrap">
<table>
<thead><tr>
<th>Cand</th>
<th>Sursa</th>
<th>Tip</th>
<th>Nivel</th>
{% if is_admin %}<th>Cont</th>{% endif %}
<th>Cod</th>
<th>Mesaj</th>
</tr></thead>
<tbody>
{% for e in evenimente %}
<tr>
<td class="muted" style="white-space:nowrap;">{{ e.ts }}</td>
<td>{{ e.sursa }}</td>
<td>{{ e.tip }}</td>
<td>
<span class="{% if e.nivel in ('ERROR','CRITICAL') %}s-error{% elif e.nivel == 'WARNING' %}s-needs_data{% else %}muted{% endif %}">{{ e.nivel }}</span>
</td>
{% if is_admin %}<td class="muted">{{ e.account_id if e.account_id is not none else '—' }}</td>{% endif %}
<td class="muted">{{ e.cod or '—' }}</td>
<td style="white-space:normal; max-width:360px;">{{ e.mesaj or '' }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{# Paginare: prev/next pe acelasi set de filtre #}
{% if prev_page is not none or next_page is not none %}
<div style="display:flex; gap:10px; margin-top:12px; align-items:center;">
{% if prev_page is not none %}
<a href="#" hx-get="/_fragments/jurnal?page={{ prev_page }}&tip={{ f_tip }}&nivel={{ f_nivel }}&data_de={{ f_data_de }}&data_pana={{ f_data_pana }}&cont={{ f_cont }}"
hx-target="#jurnal-wrap" hx-swap="innerHTML">&lsaquo; mai noi</a>
{% endif %}
<span class="muted" style="font-size:12px;">pagina {{ page + 1 }}</span>
{% if next_page is not none %}
<a href="#" hx-get="/_fragments/jurnal?page={{ next_page }}&tip={{ f_tip }}&nivel={{ f_nivel }}&data_de={{ f_data_de }}&data_pana={{ f_data_pana }}&cont={{ f_cont }}"
hx-target="#jurnal-wrap" hx-swap="innerHTML">mai vechi &rsaquo;</a>
{% endif %}
</div>
{% endif %}
{% else %}
<div class="empty">Niciun eveniment pe filtrul curent.</div>
{% endif %}
</div>
</div>
</section>