feat: Add static job logs view and enhance logging functionality with improved UI and error handling

This commit is contained in:
JB
2025-10-09 12:29:38 -07:00
parent 205c435e72
commit 6bd301b707
6 changed files with 231 additions and 5 deletions
+15
View File
@@ -0,0 +1,15 @@
{% extends "base.html" %}
{% block title %}Logs · {{ job.original_filename }}{% endblock %}
{% block content %}
<section class="card logs-static">
{% include "partials/logs.html" %}
{% if job.logs %}
<details class="log-copy">
<summary>Copy raw log output</summary>
<textarea class="log-copy__textarea" readonly>{{- log_text -}}</textarea>
</details>
{% endif %}
</section>
{% endblock %}
+9 -1
View File
@@ -1,4 +1,12 @@
<div class="card__title">Live log</div>
{% set is_static = static_view if static_view is defined and static_view else False %}
<div class="card__title-row">
<div class="card__title">Live log</div>
{% if not is_static %}
<a class="button button--ghost button--small" href="{{ url_for('web.job_logs_static', job_id=job.id) }}" target="_blank" rel="noopener">Open static view</a>
{% else %}
<a class="button button--ghost button--small" href="{{ url_for('web.job_detail', job_id=job.id) }}">Back to job</a>
{% endif %}
</div>
{% if job.logs %}
<ul class="log-list">
{% for entry in job.logs|reverse %}