earthcubeprojects-chords / chords

EarthCube CHORDS application code
GNU General Public License v2.0
25 stars 13 forks source link

Highchart graphs no longer refresh automatically #538

Closed mdye closed 1 year ago

mdye commented 5 years ago

The highchart graphs on the instrument pages no longer seem to update automatically. This means that points that were added since the instrument page was loaded are not displayed in real time.

It's possible that this was removed intentionally.

Cause: The "setInterval" function has been removed from the instruments graph

https://github.com/earthcubeprojects-chords/chords/blob/46d066369f1b9eea76107fbafb40368e201e31da/app/views/instruments/_multivariable_graph_chart.html.haml#L295

mdye commented 1 year ago

The current code to update the graph fetches the data with via a call to rails: /instruments/1/live?var=temp&start=0&end=0

this loads the full rials stack for each request this is also done for each instrument, every second...

Two changes should be made, I think: 1) perform the request directly to influxdb, so that the rails stack isn't involved in each request. 2) if possible, consolidate all requests for all variable for that instrument in to one request

MisterMartin commented 1 year ago

Fixed in 9689a35.