diff --git a/dashboard.py b/dashboard.py index 6adda98..3d9cee4 100644 --- a/dashboard.py +++ b/dashboard.py @@ -358,7 +358,13 @@ def camera(cam_id): if cam_id not in CAMERAS: return "Camera not found", 404 cam_dets = [d for d in reversed(detections) if d["cam"] == cam_id] - return render_template_string(CAM_HTML, cam_id=cam_id, cam=CAMERAS[cam_id], dets=cam_dets) + return render_template_string( + CAM_HTML, + cam_id=cam_id, + cam=CAMERAS[cam_id], + dets=cam_dets, + class_names=CLASS_NAMES, + ) @app.route("/api/verify/", methods=["POST"]) @@ -1103,6 +1109,18 @@ body{font-family:system-ui,-apple-system,sans-serif;background:#0f172a;color:#e2 .card-badge.unverified{background:rgba(148,163,184,.15);color:#64748b} .empty{text-align:center;padding:60px 20px;opacity:.4;font-size:14px;line-height:1.6} + +.cam-chart-panel{ + background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.06); + border-radius:14px;padding:16px 20px;margin-bottom:24px; +} +.cam-chart-panel h3{ + font-size:11px;opacity:.45;margin-bottom:12px;text-transform:uppercase;letter-spacing:.5px; +} +.bar-row{display:flex;align-items:center;margin-bottom:5px;font-size:12px;padding:3px 0;border-radius:5px} +.bar-label{width:58px;text-align:right;padding-right:8px;opacity:.7} +.bar-fill{height:16px;background:#3b82f6;border-radius:3px;transition:width .5s ease;min-width:2px} +.bar-num{padding-left:6px;opacity:.45;font-size:11px} @@ -1116,6 +1134,10 @@ body{font-family:system-ui,-apple-system,sans-serif;background:#0f172a;color:#e2
+
+

Detections by Species (this camera)

+
+
{% if dets %}
{% for d in dets %} @@ -1143,6 +1165,37 @@ body{font-family:system-ui,-apple-system,sans-serif;background:#0f172a;color:#e2 {% endif %}
+ """