Skip to content

Commit 2b64604

Browse files
author
Jeremy Ewing
committed
dashboard: keep detail view updated on WebSocket snapshots too
1 parent 5019162 commit 2b64604

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎api/static/index.html‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,10 @@ <h3>Global Control</h3>
863863
try {
864864
const msg = JSON.parse(ev.data);
865865
const payload = msg.type === 'snapshot' ? msg.data : msg;
866-
if (payload && payload.registers) renderMain(payload);
866+
if (payload && payload.registers) {
867+
renderMain(payload);
868+
if (currentDetail) updateDetail(payload);
869+
}
867870
} catch(e){}
868871
};
869872
ws.onclose = () => setTimeout(connectWS, 3000);

0 commit comments

Comments
 (0)