Working jumps (routes) + goToNow now reloads

This commit is contained in:
l_samenv
2024-08-14 08:27:59 +02:00
parent 58d44dd4d7
commit 5735fe9f01
7 changed files with 193 additions and 151 deletions

View File

@ -139,7 +139,7 @@ class InfluxGraph:
time = [float(t) for t in time.split(',')]
return dict(type='time', time= self.get_abs_time(time))
def w_getvars(self, time):
def w_getvars(self, time, all=False):
"""
Gets the curve names available at a given point in time.
Called when the route /getvars is reached.
@ -154,9 +154,10 @@ class InfluxGraph:
"""
time = [float(t) for t in time.split(',')]
start_time = int(self.get_abs_time(time)[0])
end_time = int(self.get_abs_time(time)[-1])
blocks = self.influx_data_getter.get_available_variables_at_time(end_time)
blocks = self.influx_data_getter.get_available_variables_at_time([start_time, end_time], all)
# updates the self.variables attribute to keep track of the available variables
self.variables = [variable["name"] for block in blocks for variable in block["curves"]]