Skip to content
Snippets Groups Projects
Commit 63e0fb79 authored by Martin Mareš's avatar Martin Mareš
Browse files

Web: Rozlišování jobů ve stavu failed a internal_error

parent 7c1f18d7
No related branches found
No related tags found
1 merge request!109Automatická oprava rozbitých PDF
This commit is part of merge request !109. Comments created here will be created in the context of that merge request.
...@@ -76,7 +76,7 @@ def job_file_size(job: db.Job, name: Optional[str]) -> Optional[int]: ...@@ -76,7 +76,7 @@ def job_file_size(job: db.Job, name: Optional[str]) -> Optional[int]:
def org_job(id: int): def org_job(id: int):
job = get_job(id) 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 isinstance(job.out_json, dict)
and 'errors' in job.out_json) and 'errors' in job.out_json)
......
...@@ -22,7 +22,7 @@ Třídění skenů {{ scans_title }} pro {{ ctx.round.name|lower }} kategorie {{ ...@@ -22,7 +22,7 @@ Třídění skenů {{ scans_title }} pro {{ ctx.round.name|lower }} kategorie {{
<script> <script>
setTimeout(function () { location.reload(1); }, 10_000); setTimeout(function () { location.reload(1); }, 10_000);
</script> </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> <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 %} {% else %}
......
...@@ -259,6 +259,14 @@ table.data tbody tr.job-failed:hover { ...@@ -259,6 +259,14 @@ table.data tbody tr.job-failed:hover {
background-color: #a66; 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 */ /* Users */
.user-test { .user-test {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment