diff --git a/apps/ui/main.py b/apps/ui/main.py index f356db2..07a6ce8 100644 --- a/apps/ui/main.py +++ b/apps/ui/main.py @@ -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. diff --git a/apps/ui/templates/device.html b/apps/ui/templates/device.html new file mode 100644 index 0000000..2ad82c6 --- /dev/null +++ b/apps/ui/templates/device.html @@ -0,0 +1,879 @@ + + +
+ + +