Running curves settings
This commit is contained in:
@ -113,7 +113,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, userconfiguration = None):
|
||||
"""
|
||||
Gets the curve names available at a given point in time.
|
||||
Called when the route /getvars is reached.
|
||||
@ -130,8 +130,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])
|
||||
|
||||
if not userconfiguration == None : userconfiguration = json.loads(userconfiguration)
|
||||
|
||||
blocks = self.influx_data_getter.get_available_variables_at_time([start_time, end_time], self.chart_configs)
|
||||
blocks = self.influx_data_getter.get_available_variables_at_time([start_time, end_time], self.chart_configs, userconfiguration)
|
||||
device_name = self.influx_data_getter.get_device_name(end_time)
|
||||
# updates the self.variables attribute to keep track of the available variables
|
||||
self.variables = {variable["name"]:variable["label"] for block in blocks for variable in block["curves"]}
|
||||
|
Reference in New Issue
Block a user