diff --git a/services/api-server/src/api_server/html5.py b/services/api-server/src/api_server/html5.py index 9bdaedb..246989b 100644 --- a/services/api-server/src/api_server/html5.py +++ b/services/api-server/src/api_server/html5.py @@ -837,6 +837,7 @@ def render_html5_authoring_apply_result(project_id: str, result: object | None = {escape(change_id)} {escape(version_id)} + {_authoring_apply_summary("change-set", status, change_id, version_id)}
Change-set применен в workspace для проекта {escape(project_id)}.
""" @@ -944,6 +945,7 @@ def render_html5_metadata_apply_result(project_id: str, result: object | None = {escape(change_id)} {escape(version_id)} + {_authoring_apply_summary("metadata", status, change_id, version_id)}Metadata draft применен в workspace для проекта {escape(project_id)}.
""" @@ -1754,6 +1756,18 @@ def _authoring_detail_summary(diff: Iterable[object], checks: Iterable[object], """ +def _authoring_apply_summary(kind: str, status: str, change_id: str, version_id: str) -> str: + return f""" + + """ + + def _named_node_item(label: str, node: object) -> str: name = getattr(node, "qualified_name", None) or getattr(node, "name", "") kind = getattr(node, "kind", label) diff --git a/services/api-server/tests/test_api.py b/services/api-server/tests/test_api.py index 0b7b199..c75305b 100644 --- a/services/api-server/tests/test_api.py +++ b/services/api-server/tests/test_api.py @@ -1,6 +1,7 @@ from pathlib import Path -from uuid import uuid4 +import re import time +from uuid import uuid4 import zipfile from fastapi.testclient import TestClient @@ -3045,6 +3046,35 @@ def test_authoring_metadata_object_preview_and_apply(tmp_path: Path): assert "Expected version id does not match current metadata preview" in html5_blocked_apply.text assert "