fix: Fix timing issue in Media Flow dashboard data display
- Move updateFlowStats/updateServiceStats calls after DOM is ready - Use requestAnimationFrame to ensure elements exist before updating - Fixes "0 flows" display bug when data was actually available Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
6624cf5e6e
commit
acbed6797a
@ -270,7 +270,6 @@ return L.view.extend({
|
||||
});
|
||||
};
|
||||
|
||||
updateFlowStats();
|
||||
v.appendChild(flowSection);
|
||||
|
||||
// Stats by service (from history)
|
||||
@ -423,16 +422,22 @@ return L.view.extend({
|
||||
});
|
||||
};
|
||||
|
||||
updateServiceStats();
|
||||
v.appendChild(statsSection);
|
||||
|
||||
wrapper.appendChild(v);
|
||||
|
||||
// Call update functions after DOM is ready
|
||||
requestAnimationFrame(function() {
|
||||
updateFlowStats();
|
||||
updateServiceStats();
|
||||
});
|
||||
|
||||
// Setup auto-refresh
|
||||
poll.add(L.bind(function() {
|
||||
updateFlowStats();
|
||||
updateServiceStats();
|
||||
}, this), 5);
|
||||
|
||||
wrapper.appendChild(v);
|
||||
return wrapper;
|
||||
},
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user