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:
@@ -192,9 +192,9 @@ function AdminJobsPage() {
|
|||||||
|
|
||||||
{totalJobs === 0 ? (
|
{totalJobs === 0 ? (
|
||||||
<p className="empty-message">No cache jobs yet. Jobs are created when packages are downloaded through the PyPI proxy.</p>
|
<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>
|
<p className="success-text">All jobs completed successfully.</p>
|
||||||
) : (
|
) : failedTasks.length > 0 ? (
|
||||||
<>
|
<>
|
||||||
<h3>Failed Tasks</h3>
|
<h3>Failed Tasks</h3>
|
||||||
<table className="jobs-table">
|
<table className="jobs-table">
|
||||||
@@ -236,6 +236,8 @@ function AdminJobsPage() {
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</>
|
</>
|
||||||
|
) : (
|
||||||
|
<p className="empty-message">Jobs are processing. No failures yet.</p>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user