Fix jobs dashboard showing misleading completion message

The dashboard was showing "All jobs completed successfully" whenever
there were no failed tasks, even if there were pending or in-progress
jobs. Now shows:
- "All jobs completed" only when pending=0 and in_progress=0
- "Jobs are processing. No failures yet." when jobs are in queue
This commit is contained in:
Mondo Diaz
2026-02-02 11:56:01 -06:00
parent 6a3a875a9c
commit c7eca269f4

View File

@@ -192,9 +192,9 @@ function AdminJobsPage() {
{totalJobs === 0 ? (
<p className="empty-message">No cache jobs yet. Jobs are created when packages are downloaded through the PyPI proxy.</p>
) : failedTasks.length === 0 ? (
) : failedTasks.length === 0 && cacheStatus?.pending === 0 && cacheStatus?.in_progress === 0 ? (
<p className="success-text">All jobs completed successfully.</p>
) : (
) : failedTasks.length > 0 ? (
<>
<h3>Failed Tasks</h3>
<table className="jobs-table">
@@ -236,6 +236,8 @@ function AdminJobsPage() {
</tbody>
</table>
</>
) : (
<p className="empty-message">Jobs are processing. No failures yet.</p>
)}
</>
)}