feat: add background tasks monitoring dashboard

Adds a unified view of all background tasks (imports and test runs)
under Platform Monitoring. Includes real-time status polling,
statistics overview, and task history.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-12 23:28:16 +01:00
parent a8d1c351fc
commit 280e719a7a
7 changed files with 715 additions and 2 deletions

View File

@@ -500,6 +500,25 @@ async def admin_imports_page(
)
@router.get("/background-tasks", response_class=HTMLResponse, include_in_schema=False)
async def admin_background_tasks_page(
request: Request,
current_user: User = Depends(get_current_admin_from_cookie_or_header),
db: Session = Depends(get_db),
):
"""
Render background tasks monitoring page.
Shows running and completed background tasks across the system.
"""
return templates.TemplateResponse(
"admin/background-tasks.html",
{
"request": request,
"user": current_user,
},
)
@router.get("/marketplace", response_class=HTMLResponse, include_in_schema=False)
async def admin_marketplace_page(
request: Request,