Add HTML5 object data flow context
CI / python (push) Has been cancelled
CI / rust (push) Has been cancelled

This commit is contained in:
2026-05-17 00:28:54 +03:00
parent 79ae2b3023
commit c871a8bbd2
3 changed files with 86 additions and 2 deletions
+40 -1
View File
@@ -1748,10 +1748,21 @@ async def html5_project_object_context(project_id: str, object_name: str) -> Res
access = await get_object_access(project_id, object_name)
ui = await get_object_ui(project_id, object_name)
privacy = await object_privacy(project_id, object_name)
integrations = _integrations_for_object_context(project_id, impact)
runtime = _runtime_for_object_context(project_id, impact)
knowledge = _knowledge_for_object_context(schema, impact, ui)
return Response(
render_html5_object_context(project_id, schema, impact, access, ui, runtime, knowledge, privacy),
render_html5_object_context(
project_id,
schema,
impact,
access,
ui,
runtime,
knowledge,
privacy,
integrations,
),
media_type="text/html; charset=utf-8",
)
@@ -8178,6 +8189,34 @@ def _knowledge_for_object_context(
return sorted(records, key=lambda item: item.title.lower())[:12]
def _integrations_for_object_context(
project_id: str,
impact: ObjectImpactResponse,
) -> list[IntegrationEndpointResponse]:
owner_names = {
name
for group in [impact.modules, impact.routines]
for item in group
for name in [item.qualified_name, item.name]
if name
}
if not owner_names:
return []
snapshot = _project_snapshot_or_404(project_id)
return [
IntegrationEndpointResponse(
endpoint_id=endpoint.endpoint_id,
name=endpoint.name,
kind=endpoint.kind.value,
direction=endpoint.direction,
owner=endpoint.owner,
attributes=endpoint.attributes,
)
for endpoint in build_integration_topology(snapshot).endpoints
if endpoint.owner in owner_names
]
def _current_import_source(project_id: str) -> ImportSourceKind:
setup = _project_setup_response(project_id)
if setup.current_source is not None: