Working jumps (routes) + goToNow now reloads
This commit is contained in:
@ -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"]]
|
||||
|
Reference in New Issue
Block a user