Skip to content
Snippets Groups Projects
Verified Commit 4598895b authored by David Hoese's avatar David Hoese
Browse files

Fix realtime updates requesting 3 hours of data every update

parent 3b2edaa2
No related branches found
No related tags found
1 merge request!21Fix realtime updates requesting 3 hours of data every update
This diff is collapsed.
This diff is collapsed.
......@@ -128,6 +128,10 @@ function requestPlotUpdate(dataCache, div, plotsInfo, startTime, endTime, interv
interval = '1m';
// hours, minutes, seconds
time_parts = _.map(startTime.split(':'), Number);
if (update) {
// if we're updating then we don't need to get a ton of data every time
startTime = "-00:05:00";
}
dt_in_ms = -1000 * 60 * 60 * time_parts[0] + 1000 * 60 * time_parts[1] + 1000 * time_parts[2];
for (var i in intervalLookUp) {
if (dt_in_ms >= intervalLookUp[i][0]) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment