MCPcopy Create free account
hub / github.com/Ar-Ray-code/lingbot-depth-trt / DashboardHandler

Class DashboardHandler

python/scripts/viser_pointcloud_viewer.py:131–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129
130def make_dashboard_handler(raw_port: int, refined_port: int) -> type[BaseHTTPRequestHandler]:
131 class DashboardHandler(BaseHTTPRequestHandler):
132 def do_GET(self) -> None:
133 if self.path not in ("/", "/index.html"):
134 self.send_error(404)
135 return
136 body = f"""<!doctype html>
137<html lang="en">
138<head>
139 <meta charset="utf-8">
140 <meta name="viewport" content="width=device-width, initial-scale=1">
141 <title>LingBot-Depth point cloud comparison</title>
142 <style>
143 html, body {{
144 margin: 0;
145 width: 100%;
146 height: 100%;
147 overflow: hidden;
148 background: #111318;
149 color: #e8edf2;
150 font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
151 }}
152 header {{
153 height: 34px;
154 display: grid;
155 grid-template-columns: 1fr 1fr;
156 align-items: center;
157 background: #171a20;
158 border-bottom: 1px solid #2a2f38;
159 font-size: 13px;
160 font-weight: 600;
161 letter-spacing: 0;
162 }}
163 header div {{
164 padding: 0 12px;
165 }}
166 main {{
167 height: calc(100vh - 34px);
168 display: grid;
169 grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
170 gap: 1px;
171 background: #2a2f38;
172 }}
173 iframe {{
174 display: block;
175 width: 100%;
176 height: 100%;
177 border: 0;
178 background: #111318;
179 }}
180 @media (max-width: 900px) {{
181 body {{
182 overflow: auto;
183 }}
184 header, main {{
185 grid-template-columns: 1fr;
186 }}
187 main {{
188 height: calc(200vh - 34px);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected