Changed plus to asterisk for showing curve
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
[chart]
|
[chart]
|
||||||
T_stat=K_3
|
T_stat=K_3
|
||||||
T_stat.raw=+
|
T_stat.raw=*
|
||||||
T_nvd.raw=+
|
T_nvd.raw=*
|
@ -8,7 +8,7 @@ Such a file has to be located under the `config/` folder.
|
|||||||
|
|
||||||
The current process for getting the different information is the following :
|
The current process for getting the different information is the following :
|
||||||
1. Available variables and parameters are got from InfluxDB, more specifically in the `setup_info` field of the measurements `nicos/se_main`, `nicos/se_stick`, `nicos/se_addons`. Here :
|
1. Available variables and parameters are got from InfluxDB, more specifically in the `setup_info` field of the measurements `nicos/se_main`, `nicos/se_stick`, `nicos/se_addons`. Here :
|
||||||
- The category `+` is given to parameters `value` and `target`, the category `-` is given to any other parameters.
|
- The category `*` is given to parameters `value` and `target`, the category `-` is given to any other parameters.
|
||||||
- The unit is `1` is it is not present or if it is an empty string, or the unit if correct.
|
- The unit is `1` is it is not present or if it is an empty string, or the unit if correct.
|
||||||
- The color is not given yet.
|
- The color is not given yet.
|
||||||
2. The configuration file `generic.ini` is first used to modify the different values for each couple variable/parameter.
|
2. The configuration file `generic.ini` is first used to modify the different values for each couple variable/parameter.
|
||||||
@ -81,7 +81,7 @@ Valid syntaxes for this example are `T_plato=unit:K,color:#FF0000` or `T_plato=c
|
|||||||
|
|
||||||
## Special values and omissions
|
## Special values and omissions
|
||||||
|
|
||||||
If `cat` is `+`, then the associated parameter is displayed, in the block of its unit.
|
If `cat` is `*`, then the associated parameter is displayed, in the block of its unit.
|
||||||
If `cat` is `-`, then the associated parameter is not displayed. This can be used to explicitely hide `value` and/or `target` parameters of a variable.
|
If `cat` is `-`, then the associated parameter is not displayed. This can be used to explicitely hide `value` and/or `target` parameters of a variable.
|
||||||
|
|
||||||
Omitting a value means that it will be inherited from the previous configuration files.
|
Omitting a value means that it will be inherited from the previous configuration files.
|
||||||
@ -89,4 +89,4 @@ Omitting a value means that it will be inherited from the previous configuration
|
|||||||
## Diverse examples
|
## Diverse examples
|
||||||
|
|
||||||
- `T_plato=-` : the `value` parameter of T_plato is never displayed
|
- `T_plato=-` : the `value` parameter of T_plato is never displayed
|
||||||
- `T_plato.raw=+` : the `raw` parameter of T_plato will be displayed in the default block corresponding to its unit
|
- `T_plato.raw=*` : the `raw` parameter of T_plato will be displayed in the default block corresponding to its unit
|
@ -353,13 +353,13 @@ class InfluxDataGetter:
|
|||||||
variable = {
|
variable = {
|
||||||
"name":name,
|
"name":name,
|
||||||
"label":content[1]["secop_module"],
|
"label":content[1]["secop_module"],
|
||||||
"params":{"value":{"cat":"+", "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():
|
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"]
|
param_unit = "1" if (not "unit" in param_content.keys() or param_content["unit"] == "") else param_content["unit"]
|
||||||
variable["params"][param_name] = {
|
variable["params"][param_name] = {
|
||||||
"cat":"+" if param_name == "target" else "-", # 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":"",
|
"color":"",
|
||||||
"unit":param_unit
|
"unit":param_unit
|
||||||
}
|
}
|
||||||
@ -498,7 +498,7 @@ class InfluxDataGetter:
|
|||||||
|
|
||||||
for available_variable in available_variables:
|
for available_variable in available_variables:
|
||||||
key = available_variable["unit"]
|
key = available_variable["unit"]
|
||||||
if available_variable["cat"] != "+":
|
if available_variable["cat"] != "*":
|
||||||
key = available_variable["cat"]
|
key = available_variable["cat"]
|
||||||
if key not in groups.keys():
|
if key not in groups.keys():
|
||||||
groups[key] = {"tag":key, "unit":available_variable["unit"], "curves":[]}
|
groups[key] = {"tag":key, "unit":available_variable["unit"], "curves":[]}
|
||||||
|
Reference in New Issue
Block a user