dashboard.py 1004 B

1234567891011121314151617181920212223242526272829
  1. from fastapi import APIRouter
  2. from fastapi.responses import HTMLResponse
  3. router = APIRouter(prefix="/dashboard", tags=["dashboard"])
  4. @router.get("/", response_class=HTMLResponse)
  5. def dashboard_home():
  6. return """<!doctype html>
  7. <html>
  8. <head>
  9. <meta charset=\"utf-8\" />
  10. <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />
  11. <title>Trader MCP Dashboard</title>
  12. <style>
  13. body { font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial; margin: 2rem; }
  14. .card { max-width: 720px; padding: 1.25rem; border: 1px solid #e5e7eb; border-radius: 12px; }
  15. code { background: #f3f4f6; padding: 0.15rem 0.35rem; border-radius: 8px; }
  16. .muted { color: #6b7280; }
  17. </style>
  18. </head>
  19. <body>
  20. <div class=\"card\">
  21. <h1>Trader MCP Dashboard</h1>
  22. <p class=\"muted\">Scaffold page. Connect your trading widgets to MCP routes when you’re ready.</p>
  23. <p>Current: <code>GET /dashboard/</code></p>
  24. </div>
  25. </body>
  26. </html>"""