Fix template syntax errors - use dictionary access job['key'] instead of job.key
This commit is contained in:
1 parent
576ea9edec
commit
54cd87c0f4
3 files changed
+36
-36
No files matched your search
+15
-15
@@ -186,38 +186,38 @@
|
||||
<div class="job-item">
|
||||
<div class="job-header">
|
||||
<div class="job-info">
|
||||
<strong>Job Name:</strong> {{ job.id }}<br>
|
||||
<strong>Started:</strong> {{ job.timestamp.strftime('%Y-%m-%d %H:%M:%S') if job.timestamp else 'Unknown' }}<br>
|
||||
{% if job.file_count %}
|
||||
<strong>Files:</strong> {{ job.file_count }}<br>
|
||||
<strong>Job Name:</strong> {{ job['id'] }}<br>
|
||||
<strong>Started:</strong> {{ job['timestamp'].strftime('%Y-%m-%d %H:%M:%S') if job['timestamp'] else 'Unknown' }}<br>
|
||||
{% if job['file_count'] %}
|
||||
<strong>Files:</strong> {{ job['file_count'] }}<br>
|
||||
{% endif %}
|
||||
<strong>Status:</strong>
|
||||
{% if job.status == 'completed' %}
|
||||
{% if job['status'] == 'completed' %}
|
||||
<span class="status-completed">Completed</span>
|
||||
{% elif job.status == 'processing' %}
|
||||
{% elif job['status'] == 'processing' %}
|
||||
<span class="status-processing">Processing</span>
|
||||
{% elif job.status == 'failed' %}
|
||||
{% elif job['status'] == 'failed' %}
|
||||
<span class="status-failed">Failed</span>
|
||||
{% elif job.status == 'queued' %}
|
||||
{% elif job['status'] == 'queued' %}
|
||||
<span class="status-queued">Queued</span>
|
||||
{% else %}
|
||||
<span>{{ job.status|title }}</span>
|
||||
<span>{{ job['status']|title }}</span>
|
||||
{% endif %}
|
||||
{% if job.get('error') %}
|
||||
<br><strong>Error:</strong> {{ job.error }}
|
||||
<br><strong>Error:</strong> {{ job['error'] }}
|
||||
{% endif %}
|
||||
{% if job.get('message') %}
|
||||
<br><strong>Message:</strong> {{ job.message }}
|
||||
<br><strong>Message:</strong> {{ job['message'] }}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="job-actions">
|
||||
<a href="{{ url_for('job_status', job_id=job.id) }}" class="view-btn" style="display: inline-block; padding: 8px 16px; text-decoration: none; color: white; background-color: #17a2b8; border-radius: 4px;">View Details</a>
|
||||
{% if job.status == 'completed' %}
|
||||
<form action="{{ url_for('download_job', job_id=job.id) }}" method="get" style="display: inline;">
|
||||
<a href="{{ url_for('job_status', job_id=job['id']) }}" class="view-btn" style="display: inline-block; padding: 8px 16px; text-decoration: none; color: white; background-color: #17a2b8; border-radius: 4px;">View Details</a>
|
||||
{% if job['status'] == 'completed' %}
|
||||
<form action="{{ url_for('download_job', job_id=job['id']) }}" method="get" style="display: inline;">
|
||||
<button type="submit" class="download-btn">Download ZIP</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
<form action="{{ url_for('delete_job', job_id=job.id) }}" method="post" style="display: inline;" onsubmit="return confirm('Are you sure you want to delete this job?')">
|
||||
<form action="{{ url_for('delete_job', job_id=job['id']) }}" method="post" style="display: inline;" onsubmit="return confirm('Are you sure you want to delete this job?')">
|
||||
<button type="submit" class="delete-btn">Delete</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user