Render job list HTML. Args: jobs: List of job objects Returns: HTML string for job list
(jobs: list)
| 80 | """ |
| 81 | Render job list HTML. |
| 82 | |
| 83 | Args: |
| 84 | jobs: List of job objects |
| 85 | |
| 86 | Returns: |
| 87 | HTML string for job list |
| 88 | """ |
| 89 | if not jobs: |
| 90 | return "" |
| 91 | |
| 92 | job_list_template = """ |
| 93 | {%- for job in jobs %} |
| 94 | <div class="job-item"> |
| 95 | <div class="job-header"> |
| 96 | <div class="job-url">{{ job.repo_url }}</div> |
| 97 | <div class="job-status status-{{ job.status }}">{{ job.status.title() }}</div> |
| 98 | </div> |
| 99 | {%- if job.progress %} |
| 100 | <div class="job-progress">{{ job.progress }}</div> |
| 101 | {%- endif %} |
| 102 | {%- if job.status == 'completed' and job.docs_path %} |
| 103 | <div class="job-actions"> |
| 104 | <a href="/docs/{{ job.job_id }}" class="btn btn-small">View Documentation</a> |
| 105 | </div> |
| 106 | {%- endif %} |
| 107 | </div> |
| 108 | {%- endfor %} |
| 109 | """ |
| 110 | |
| 111 | return render_template(job_list_template, {"jobs": jobs}) |
nothing calls this directly
no test coverage detected