v1.4.0: fix #43, #31, #29, #49, #33 + shared templating

This commit is contained in:
2026-05-20 20:08:25 +03:00
parent ca4d00c895
commit 64991f0228
63 changed files with 5005 additions and 45 deletions
@@ -0,0 +1,16 @@
{% extends "page.html" %}
{% block page_content %}
<div class="card">
<div class="card-header"><h2>Паспорта объектов</h2></div>
<div class="table-wrap"><table><thead><tr><th>Объект</th><th>Автор</th><th>Object Index</th><th>Risk Score</th><th>SLA Price</th><th>Дата</th></tr></thead>
<tbody>{% for p in passports %}<tr>
<td>{{ p.object.name if p.object else '' }}</td>
<td>{{ p.creator.full_name if p.creator else '' }}</td>
<td><strong>{{ "%.2f"|format(p.object_index) if p.object_index else '—' }}</strong></td>
<td><span class="badge badge-{{ 'critical' if (p.risk_score or 0) > 70 else 'medium' if (p.risk_score or 0) > 40 else 'low' }}">{{ "%.2f"|format(p.risk_score) if p.risk_score else '—' }}</span></td>
<td>{{ "%.2f"|format(p.sla_price_monthly) if p.sla_price_monthly else '—' }} ₽</td>
<td><small>{{ p.created_at.strftime('%d.%m.%Y') if p.created_at else '' }}</small></td>
</tr>{% endfor %}</tbody></table>
</div>
</div>
{% endblock %}