+ and - symbols for config files
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
[chart]
|
||||
T_stat=K_3
|
||||
T_stat.raw=unit
|
||||
T_nvd.raw=unit
|
||||
T_stat.raw=+
|
||||
T_nvd.raw=+
|
@ -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":[]}
|
||||
|
Reference in New Issue
Block a user