Add HTML5 flowchart fragment
This commit is contained in:
@@ -43,6 +43,7 @@ from api_server.html5 import (
|
||||
render_html5_authoring_preview_result,
|
||||
render_html5_authoring_rollback_result,
|
||||
render_html5_editor,
|
||||
render_html5_flowchart,
|
||||
render_html5_index,
|
||||
render_html5_metadata_apply_result,
|
||||
render_html5_metadata_preview_result,
|
||||
@@ -1741,6 +1742,20 @@ async def html5_project_review(project_id: str) -> Response:
|
||||
)
|
||||
|
||||
|
||||
@app.get("/html5/projects/{project_id}/flowchart")
|
||||
async def html5_project_flowchart(
|
||||
project_id: str,
|
||||
focus: str | None = None,
|
||||
depth: int = 1,
|
||||
limit: int = 80,
|
||||
) -> Response:
|
||||
flowchart = await project_flowchart(project_id, focus=focus, depth=depth, limit=limit)
|
||||
return Response(
|
||||
render_html5_flowchart(project_id, flowchart),
|
||||
media_type="text/html; charset=utf-8",
|
||||
)
|
||||
|
||||
|
||||
@app.get("/html5/projects/{project_id}/objects/context/{object_name}")
|
||||
async def html5_project_object_context(project_id: str, object_name: str) -> Response:
|
||||
schema = await get_object_schema(project_id, object_name)
|
||||
|
||||
Reference in New Issue
Block a user