Add cancel job button and improve jobs table UI

- Remove "All Jobs" title
- Move Status column to front of table
- Add Cancel button for in-progress jobs
- Add cancel endpoint: POST /pypi/cache/cancel/{package_name}
- Add btn-danger CSS styling
This commit is contained in:
Mondo Diaz
2026-02-02 15:18:59 -06:00
parent 36cf288526
commit 0a6dad9af0
5 changed files with 114 additions and 21 deletions

View File

@@ -794,3 +794,11 @@ export async function retryAllPyPICacheTasks(): Promise<PyPICacheRetryResponse>
});
return handleResponse<PyPICacheRetryResponse>(response);
}
export async function cancelPyPICacheTask(packageName: string): Promise<PyPICacheRetryResponse> {
const response = await fetch(`/pypi/cache/cancel/${encodeURIComponent(packageName)}`, {
method: 'POST',
credentials: 'include',
});
return handleResponse<PyPICacheRetryResponse>(response);
}