Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions data/.lfs/command_center.html.tar.gz
Git LFS file not shown
13 changes: 3 additions & 10 deletions dimos/web/websocket_vis/websocket_vis_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
from starlette.staticfiles import StaticFiles
import uvicorn

from dimos.utils.data import get_data

# Path to the frontend HTML templates and command-center build
_TEMPLATES_DIR = FilePath(__file__).parent.parent / "templates"
_DASHBOARD_HTML = _TEMPLATES_DIR / "rerun_dashboard.html"
Expand Down Expand Up @@ -218,7 +220,7 @@ async def serve_index(request): # type: ignore[no-untyped-def]

async def serve_command_center(request): # type: ignore[no-untyped-def]
"""Serve the command center 2D visualization (built React app)."""
index_file = _COMMAND_CENTER_DIR / "index.html"
index_file = get_data("command_center.html")
if index_file.exists():
return FileResponse(index_file, media_type="text/html")
else:
Expand All @@ -233,15 +235,6 @@ async def serve_command_center(request): # type: ignore[no-untyped-def]
Route("/command-center", serve_command_center),
]

# Add static file serving for command-center assets if build exists
if _COMMAND_CENTER_DIR.exists():
routes.append(
Mount( # type: ignore[arg-type]
"/assets",
app=StaticFiles(directory=_COMMAND_CENTER_DIR / "assets"),
name="assets",
)
)
starlette_app = Starlette(routes=routes)

self.app = socketio.ASGIApp(self.sio, starlette_app)
Expand Down
Loading