Simplified code for getting vars + corresponding doc
This commit is contained in:
@ -128,12 +128,11 @@ 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, userconfiguration)
|
||||
blocks = self.influx_data_getter.get_available_variables_at_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