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

This commit is contained in:
2026-05-16 21:53:56 +03:00
parent c3193b8211
commit 84303f208b
3 changed files with 122 additions and 0 deletions
@@ -42,6 +42,8 @@ from api_server.html5 import (
render_html5_project_rows,
render_html5_import_check,
render_html5_import_job,
render_html5_operation_rows,
render_html5_operations,
render_html5_settings_panel,
render_html5_setup_summary,
render_html5_source,
@@ -1612,6 +1614,22 @@ async def html5_delete_project(project_id: str, request: Request) -> Response:
)
@app.get("/html5/operations")
async def html5_operations() -> Response:
return Response(
render_html5_operations(_html5_operation_jobs()),
media_type="text/html; charset=utf-8",
)
@app.get("/html5/operations/jobs")
async def html5_operation_jobs() -> Response:
return Response(
render_html5_operation_rows(_html5_operation_jobs()),
media_type="text/html; charset=utf-8",
)
@app.get("/html5/projects/{project_id}/editor")
async def html5_project_editor(project_id: str, q: str = "") -> Response:
try:
@@ -7837,6 +7855,10 @@ def _current_import_source(project_id: str) -> ImportSourceKind:
return ImportSourceKind.XML_DUMP
def _html5_operation_jobs() -> list[OperationJob]:
return sorted(_operations.jobs.values(), key=lambda job: job.updated_at, reverse=True)[:50]
def _project_summaries() -> list[ProjectSummaryResponse]:
project_ids = set(_project_setup.keys())
stored_snapshots = _storage.list_snapshot_refs()