feat(phase-9): implement layout variations, pareto fleet optimization, and final demonstration
This commit is contained in:
@@ -86,6 +86,20 @@ class DashboardHTTPHandler(BaseHTTPRequestHandler):
|
||||
self._send_json(comparisons, headers=headers)
|
||||
return
|
||||
|
||||
# Optimization & Layout comparison: /api/optimization
|
||||
if path == "/api/optimization":
|
||||
opt_data = self.data_provider.get_optimization_data()
|
||||
self._send_json(opt_data, headers=headers)
|
||||
return
|
||||
|
||||
if path == "/api/optimization/comparison.svg":
|
||||
svg_content = self.data_provider.get_optimization_svg()
|
||||
if svg_content:
|
||||
self._send_bytes(svg_content.encode("utf-8"), "image/svg+xml; charset=utf-8", headers=headers)
|
||||
else:
|
||||
self._send_error(HTTPStatus.NOT_FOUND, "Optimization comparison SVG not found")
|
||||
return
|
||||
|
||||
# Serve static assets
|
||||
self._serve_static(path)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user