Add HTML5 project setup view
CI / python (push) Has been cancelled
CI / rust (push) Has been cancelled

This commit is contained in:
2026-05-16 21:22:47 +03:00
parent 03f1af0301
commit 2580cf9832
3 changed files with 211 additions and 2 deletions
+27 -1
View File
@@ -35,7 +35,15 @@ from fastapi.responses import PlainTextResponse, Response, StreamingResponse
from neo4j import AsyncGraphDatabase
from pydantic import BaseModel, Field
from api_server.html5 import render_html5_editor, render_html5_index, render_html5_source, render_html5_status, render_html5_symbols
from api_server.html5 import (
render_html5_editor,
render_html5_index,
render_html5_project_setup,
render_html5_setup_summary,
render_html5_source,
render_html5_status,
render_html5_symbols,
)
from impact_engine import object_impact, routine_impact
from incremental_indexer import rebuild_changed_file
from integration_topology import IntegrationKind, build_integration_topology
@@ -1639,6 +1647,24 @@ async def html5_project_source(project_id: str, lineage_id: str) -> Response:
)
@app.get("/html5/projects/{project_id}/setup")
async def html5_project_setup(project_id: str) -> Response:
setup = _project_setup_response(project_id)
return Response(
render_html5_project_setup(project_id=project_id, projects=_project_summaries(), setup=setup),
media_type="text/html; charset=utf-8",
)
@app.get("/html5/projects/{project_id}/setup/summary")
async def html5_project_setup_summary(project_id: str) -> Response:
setup = _project_setup_response(project_id)
return Response(
render_html5_setup_summary(project_id, setup),
media_type="text/html; charset=utf-8",
)
@app.get("/version")
async def version() -> dict[str, str]:
return {"name": "sfera", "version": "0.1.0"}