Files
mirror/app/templates/mirrors/results.html
T
2026-06-03 17:33:19 +03:30

33 lines
1.5 KiB
HTML

{% extends "base.html" %}
{% block title %}نتایج تست{% endblock %}
{% block content %}
<h2>نتایج تست میرورها</h2>
<div class="btn-group mb-3">
<a href="{{ url_for('mirrors.results') }}" class="btn btn-sm btn-outline-dark">همه</a>
{% for cat in categories %}
<a href="{{ url_for('mirrors.results', category=cat) }}" class="btn btn-sm btn-outline-dark">{{ category_labels[cat] }}</a>
{% endfor %}
</div>
<div class="table-responsive">
<table class="table table-striped table-sm">
<thead><tr><th>میرور</th><th>دسته</th><th>تست</th><th>موفق</th><th>ms</th><th>خطا</th><th>زمان</th></tr></thead>
<tbody>
{% for r in results %}
<tr>
<td>{{ r.mirror.name }}</td>
<td>{{ category_labels.get(r.mirror.category, r.mirror.category) }}</td>
<td>{{ r.test_type }}</td>
<td>{% if r.success %}✓{% else %}✗{% endif %}</td>
<td>{{ '%.0f'|format(r.latency_ms) if r.latency_ms else '-' }}</td>
<td class="small text-danger">{{ r.error or '' }}</td>
<td>{{ r.tested_at.strftime('%m-%d %H:%M') }}</td>
</tr>
{% else %}
<tr><td colspan="7" class="text-center">نتیجه‌ای نیست — تست را اجرا کنید</td></tr>
{% endfor %}
</tbody>
</table>
</div>
<a href="{{ url_for('mirrors.list_mirrors') }}" class="btn btn-secondary">بازگشت</a>
{% endblock %}