Fix template syntax errors - use dictionary access job['key'] instead of job.key

This commit is contained in:
nmemmert committed 2025-11-05 14:50:53 -05:00
1 parent 576ea9edec
commit 54cd87c0f4
3 files changed
+36 -36

No files matched your search

+13 -13
View File
@@ -148,39 +148,39 @@
<div class="job-section">
<h2>Job Information</h2>
<div class="job-info">
<div><strong>Job Name:</strong> {{ job.id }}</div>
<div><strong>Started:</strong> {{ job.timestamp.strftime('%Y-%m-%d %H:%M:%S') if job.timestamp else 'Unknown' }}</div>
<div><strong>Files:</strong> {{ job.file_count if job.file_count else 'Processing...' }}</div>
<div><strong>Job Name:</strong> {{ job['id'] }}</div>
<div><strong>Started:</strong> {{ job['timestamp'].strftime('%Y-%m-%d %H:%M:%S') if job['timestamp'] else 'Unknown' }}</div>
<div><strong>Files:</strong> {{ job['file_count'] if job['file_count'] else 'Processing...' }}</div>
<div><strong>Status:</strong>
<span class="status-{{ job.status }}">
{{ job.status.title() }}
<span class="status-{{ job['status'] }}">
{{ job['status'].title() }}
</span>
</div>
</div>
{% if job.status == 'processing' %}
{% if job['status'] == 'processing' %}
<div class="status-section">
<h3>Processing Progress</h3>
<p id="statusMessage">{{ job.message }}</p>
<progress id="progressBar" value="{{ job.progress }}" max="100"></progress>
<p id="statusMessage">{{ job['message'] }}</p>
<progress id="progressBar" value="{{ job['progress'] }}" max="100"></progress>
<div style="margin-top: 10px;">
<strong>{{ job.progress }}% Complete</strong>
</div>
</div>
{% endif %}
{% if job.status == 'completed' %}
{% if job['status'] == 'completed' %}
<div class="status-section">
<h3>Processing Complete!</h3>
<p>{{ job.message }}</p>
<progress value="100" max="100"></progress>
<div style="margin-top: 20px;">
<a href="{{ url_for('download_job', job_id=job.id) }}" class="download-btn" style="color: white; text-decoration: none; padding: 10px 20px; border-radius: 4px; display: inline-block;">Download Results</a>
<a href="{{ url_for('download_job', job_id=job['id']) }}" class="download-btn" style="color: white; text-decoration: none; padding: 10px 20px; border-radius: 4px; display: inline-block;">Download Results</a>
</div>
</div>
{% endif %}
{% if job.status == 'failed' %}
{% if job['status'] == 'failed' %}
<div class="status-section">
<h3>Processing Failed</h3>
<p>{{ job.message }}</p>
@@ -199,11 +199,11 @@
<a href="{{ url_for('results') }}">View All Jobs</a>
</div>
{% if job.status == 'processing' %}
{% if job['status'] == 'processing' %}
<script>
// Auto-refresh for processing jobs
function updateStatus() {
fetch('/api/job/{{ job.id }}/status')
fetch("/api/job/{{ job['id'] }}/status")
.then(response => response.json())
.then(data => {
document.getElementById('statusMessage').textContent = data.message;