Fix run detail page and recipe name
- Render HTML template for run detail (not just JSON) - Get recipe name from pending_runs instead of hardcoding "dag" Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -89,8 +89,9 @@ async def create_run(
|
||||
return run
|
||||
|
||||
|
||||
@router.get("/{run_id}", response_model=RunStatus)
|
||||
@router.get("/{run_id}")
|
||||
async def get_run(
|
||||
request: Request,
|
||||
run_id: str,
|
||||
run_service: RunService = Depends(get_run_service),
|
||||
):
|
||||
@@ -98,7 +99,16 @@ async def get_run(
|
||||
run = await run_service.get_run(run_id)
|
||||
if not run:
|
||||
raise HTTPException(404, f"Run {run_id} not found")
|
||||
return run
|
||||
|
||||
if wants_json(request):
|
||||
return run
|
||||
|
||||
# Render HTML detail page
|
||||
templates = get_templates(request)
|
||||
return render(templates, "runs/detail.html", request,
|
||||
run=run,
|
||||
active_tab="runs",
|
||||
)
|
||||
|
||||
|
||||
@router.delete("/{run_id}")
|
||||
|
||||
Reference in New Issue
Block a user