Add HTML5 operations SSE updates
CI / python (push) Has been cancelled
CI / rust (push) Has been cancelled

This commit is contained in:
2026-05-17 02:35:06 +03:00
parent 816b009f47
commit de7248db9e
3 changed files with 42 additions and 10 deletions
+5 -7
View File
@@ -112,12 +112,14 @@ def render_html5_operations(jobs: Iterable[object]) -> str:
<span>jobs</span>
</div>
</section>
<section class="band">
<section class="band" hx-ext="sse" sse-connect="/html5/operations/events">
<div class="section-title">
<h2>Очередь</h2>
<a class="button" href="/html5">Проекты</a>
</div>
{render_html5_operation_summary(job_list)}
<div data-html5-operations-summary-stream sse-swap="operations-summary" hx-swap="innerHTML">
{render_html5_operation_summary(job_list)}
</div>
<div class="table-wrap">
<table data-html5-operations>
<thead>
@@ -125,8 +127,7 @@ def render_html5_operations(jobs: Iterable[object]) -> str:
</thead>
<tbody
data-html5-operations-body
hx-get="/html5/operations/jobs"
hx-trigger="every 3s"
sse-swap="operations-jobs"
hx-swap="innerHTML"
>{render_html5_operation_rows(job_list)}</tbody>
</table>
@@ -148,9 +149,6 @@ def render_html5_operation_summary(jobs: Iterable[object]) -> str:
<div
class="ops-summary"
data-html5-operations-summary
hx-get="/html5/operations/summary"
hx-trigger="every 3s"
hx-swap="outerHTML"
>
{_metric("Всего", len(job_list))}
{_metric("В работе", running)}