feat(web): sources, crawlers, metrics on tailwind

This commit is contained in:
kpa39l
2026-10-28 13:11:04 +00:00
parent 4f233d0ab2
commit b578139352
4 changed files with 128 additions and 131 deletions
+12 -12
View File
@@ -1,27 +1,27 @@
{% extends "base.html" %}
{% block title %}Метрики{% endblock %}
{% block content %}
<h4 class="mb-3">Метрики</h4>
<div class="row">
<h4 class="text-xl font-semibold mb-4">Метрики</h4>
<div class="grid grid-cols-1 md:grid-cols-3 gap-3">
{% for d in dirs %}
<div class="col-md-4 mb-3">
<div class="card">
<div class="card-body">
<h6 class="card-title">{{ d.direction or 'без направления' }} / {{ d.cnt }}</h6>
<small>👁 просмотров: {{ d.views or 0 }} · средние реакции: {{ "%.1f"|format(d.avg_reactions or 0) }}</small>
</div>
<div class="card card-outline bg-white mb-3">
<div class="card-content">
<h6 class="card-title">{{ d.direction or 'без направления' }} / {{ d.cnt }}</h6>
<small class="text-neutral-500">👁 просмотров: {{ d.views or 0 }} · средние реакции: {{ "%.1f"|format(d.avg_reactions or 0) }}</small>
</div>
</div>
{% endfor %}
</div>
<h5 class="mt-4">Последние запуски</h5>
<table class="table table-sm table-striped">
<thead><tr><th>Время</th><th>Источник</th><th>Стаус</th><th>Пстов</th></tr></thead>
<h5 class="text-lg font-semibold mt-6 mb-2">Последние запуски</h5>
<div class="overflow-x-auto card card-outline bg-white">
<table class="table table-sm table-zebra">
<thead class="bg-neutral-100"><tr><th>Время</th><th>Источник</th><th>Стаус</th><th>Пстов</th></tr></thead>
<tbody>
{% for r in runs %}
<tr><td>{{ r.started_at | dt }}</td><td>{{ r.source_id }}</td><td>{{ r.status }}</td><td>{{ r.posts_new }}/{{ r.posts_fetched }}</td></tr>
{% endfor %}
</tbody>
</table>
{% endblock %}
</div>
{% endblock %}