diff --git a/config/lab4.ini b/config/lab4.ini index 07023ff..4791db9 100644 --- a/config/lab4.ini +++ b/config/lab4.ini @@ -1,4 +1,4 @@ [chart] T_stat=K_3 -T_stat.raw=unit -T_nvd.raw=unit \ No newline at end of file +T_stat.raw=+ +T_nvd.raw=+ \ No newline at end of file diff --git a/influxdb.py b/influxdb.py index ed641d4..af0672d 100644 --- a/influxdb.py +++ b/influxdb.py @@ -351,13 +351,13 @@ class InfluxDataGetter: variable = { "name":name, "label":content[1]["secop_module"], - "params":{"value":{"cat":"unit", "color":"", "unit":value_unit}} # main value, shown by default + "params":{"value":{"cat":"+", "color":"", "unit":value_unit}} # main value, shown by default } for param_name, param_content in content[1]["params_cfg"].items(): param_unit = "1" if (not "unit" in param_content.keys() or param_content["unit"] == "") else param_content["unit"] variable["params"][param_name] = { - "cat":"unit" if param_name == "target" else "None", # target is also shown by default, not the other parameters + "cat":"+" if param_name == "target" else "-", # target is also shown by default, not the other parameters "color":"", "unit":param_unit } @@ -417,7 +417,7 @@ class InfluxDataGetter: for variable in available_variables: params = list(variable["params"].keys()) for param_key in params: - if variable["params"][param_key]["cat"] == "None": + if variable["params"][param_key]["cat"] == "-": del variable["params"][param_key] return available_variables @@ -472,7 +472,7 @@ class InfluxDataGetter: for available_variable in available_variables: key = available_variable["unit"] - if available_variable["cat"] != "unit": + if available_variable["cat"] != "+": key = available_variable["cat"] if key not in groups.keys(): groups[key] = {"tag":key, "unit":available_variable["unit"], "curves":[]}