This commit is contained in:
2025-11-17 21:42:47 +01:00
parent c38fdab0ad
commit 74d4fea695
2 changed files with 897 additions and 0 deletions

View File

@@ -111,6 +111,24 @@ async def room_detail(request: Request, room_name: str) -> HTMLResponse:
})
@app.get("/device/{device_id}", response_class=HTMLResponse)
async def device_detail(request: Request, device_id: str) -> HTMLResponse:
"""Render the device detail page with controls.
Args:
request: The FastAPI request object
device_id: ID of the device to display
Returns:
HTMLResponse: Rendered device template
"""
return templates.TemplateResponse("device.html", {
"request": request,
"api_base": API_BASE,
"device_id": device_id
})
@app.get("/dashboard", response_class=HTMLResponse)
async def dashboard(request: Request) -> HTMLResponse:
"""Render the dashboard with rooms and devices.