From 20634c2ad4d10eccd00f3b179206e6fc12c1860a Mon Sep 17 00:00:00 2001 From: 16337 <1633794139@qq.com> Date: Wed, 21 Jan 2026 17:13:05 +0800 Subject: [PATCH] fix(dashboard): align camera status field with backend API response --- frontend/src/pages/Dashboard.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/src/pages/Dashboard.tsx b/frontend/src/pages/Dashboard.tsx index a62cf8a..b06281e 100644 --- a/frontend/src/pages/Dashboard.tsx +++ b/frontend/src/pages/Dashboard.tsx @@ -64,7 +64,8 @@ const Dashboard: React.FC = () => { const res = await axios.get('/api/pipeline/status'); const cameras = Object.entries(res.data.cameras || {}).map(([id, info]) => ({ id, - ...info as any, + is_running: (info as any).is_running || false, + fps: (info as any).fps || 0, })); setCameraStatus(cameras); } catch (err) { @@ -163,8 +164,8 @@ const Dashboard: React.FC = () => { title={`摄像头 ${cam.id}`} description={ - - {cam.running ? '运行中' : '已停止'} + + {cam.is_running ? '运行中' : '已停止'} {cam.fps?.toFixed(1) || 0} FPS