diff --git a/mo/web/org_jobs.py b/mo/web/org_jobs.py index 8cf9786e86bdc9f7d335dd69da3cec78ddd83808..7851eab283ec46b899d7005f9f504c8dc2e4dd9d 100644 --- a/mo/web/org_jobs.py +++ b/mo/web/org_jobs.py @@ -76,7 +76,7 @@ def job_file_size(job: db.Job, name: Optional[str]) -> Optional[int]: def org_job(id: int): job = get_job(id) - has_errors = (job.state == db.JobState.failed + has_errors = (job.state in (db.JobState.failed, db.JobState.internal_error) and isinstance(job.out_json, dict) and 'errors' in job.out_json) diff --git a/mo/web/templates/org_contest_scans_process.html b/mo/web/templates/org_contest_scans_process.html index 03af33e3767c2553a215b3c54944205bad61850e..c6f3842599f1e44cd9634c5b62f5954685dd97e9 100644 --- a/mo/web/templates/org_contest_scans_process.html +++ b/mo/web/templates/org_contest_scans_process.html @@ -22,7 +22,7 @@ Třídění skenů {{ scans_title }} pro {{ ctx.round.name|lower }} kategorie {{ <script> setTimeout(function () { location.reload(1); }, 10_000); </script> -{% elif job.state == JobState.failed %} +{% elif job.state != JobState.done %} <p>Zpracování selhalo, více detailů naleznete v <a href="{{ url_for('org_job', id=job.job_id) }}">detailu dávky</a>.</p> {% else %} diff --git a/static/mo.css b/static/mo.css index 91cfe734ef48aac2f952406663a6000bf80aed4d..13b0d8d3f5766592c10b17b9c0ca018e209a94e0 100644 --- a/static/mo.css +++ b/static/mo.css @@ -259,6 +259,14 @@ table.data tbody tr.job-failed:hover { background-color: #a66; } +table.data tbody tr.job-internal_error { + background-color: #c22; +} + +table.data tbody tr.job-internal_error:hover { + background-color: #a44; +} + /* Users */ .user-test {