74 lines
3.0 KiB
HTML
Raw Normal View History

2025-10-02 21:17:36 +02:00
{% extends "base.html" %}
{% block title %}Synchronization Logs - RSS Feed Manager{% endblock %}
{% block content %}
<h1 style="margin-bottom: 20px; font-size: 32px; font-weight: normal;">Synchronization Logs</h1>
<div style="margin-bottom: 20px;">
<a href="/newspapers" class="btn">Back to Newspapers</a>
<a href="/manage" class="btn">Back to Manage</a>
</div>
{% if sync_logs %}
<table>
<thead>
<tr>
<th>Sync Time</th>
<th>Total Feeds</th>
<th>Completed</th>
<th>Failed</th>
<th>Total Articles</th>
<th>New Articles</th>
<th>Duration (s)</th>
<th>Req/s</th>
<th>Status</th>
</tr>
</thead>
<tbody>
{% for log in sync_logs %}
<tr>
<td>{{ log.sync_time[:19].replace('T', ' ') }}</td>
<td>{{ log.total_feeds }}</td>
<td>{{ log.completed_feeds }}</td>
<td style="color: {% if log.failed_feeds > 0 %}#d93025{% else %}#5f6368{% endif %};">
{{ log.failed_feeds }}
</td>
<td>{{ log.total_articles_processed }}</td>
<td style="color: {% if log.new_articles > 0 %}#1e8e3e{% else %}#5f6368{% endif %};">
{{ log.new_articles }}
</td>
<td>{{ log.elapsed_seconds }}</td>
<td>{{ log.avg_req_per_sec }}</td>
<td>
{% if log.timed_out %}
<span style="color: #f9ab00;">Timeout</span>
{% else %}
<span style="color: #1e8e3e;">Complete</span>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div style="margin-top: 40px; padding: 20px; background-color: #f8f9fa; border-radius: 8px;">
<h3 style="font-size: 18px; font-weight: normal; margin-bottom: 15px;">Statistics Legend</h3>
<ul style="list-style: none; padding: 0; font-size: 14px; color: #5f6368;">
<li style="margin-bottom: 8px;"><strong>Total Feeds:</strong> Number of RSS feeds configured</li>
<li style="margin-bottom: 8px;"><strong>Completed:</strong> Number of feeds successfully fetched</li>
<li style="margin-bottom: 8px;"><strong>Failed:</strong> Number of feeds that failed to fetch</li>
<li style="margin-bottom: 8px;"><strong>Total Articles:</strong> All articles processed from feeds</li>
<li style="margin-bottom: 8px;"><strong>New Articles:</strong> Articles added (not duplicates)</li>
<li style="margin-bottom: 8px;"><strong>Duration:</strong> Total sync time in seconds</li>
<li style="margin-bottom: 8px;"><strong>Req/s:</strong> Average requests per second</li>
<li style="margin-bottom: 8px;"><strong>Status:</strong> Complete or Timeout (5 min limit reached)</li>
</ul>
</div>
{% else %}
<p style="text-align: center; padding: 40px; color: #5f6368;">
No synchronization logs available. Run a sync to see logs here.
</p>
{% endif %}
{% endblock %}