Browse Source
Merge pull request #9162 from ShvaykaD/bugfix/math-node-default-config
fix math node default config argument name issue because UI have strict order of arguments
feature/widget-bundles^2
Andrew Shvayka
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/math/TbMathNodeConfiguration.java
|
|
|
@ -33,8 +33,8 @@ public class TbMathNodeConfiguration implements NodeConfiguration<TbMathNodeConf |
|
|
|
public TbMathNodeConfiguration defaultConfiguration() { |
|
|
|
TbMathNodeConfiguration configuration = new TbMathNodeConfiguration(); |
|
|
|
configuration.setOperation(TbRuleNodeMathFunctionType.CUSTOM); |
|
|
|
configuration.setCustomFunction("(t - 32) / 1.8"); |
|
|
|
configuration.setArguments(List.of(new TbMathArgument("t", TbMathArgumentType.MESSAGE_BODY, "temperature"))); |
|
|
|
configuration.setCustomFunction("(x - 32) / 1.8"); |
|
|
|
configuration.setArguments(List.of(new TbMathArgument("x", TbMathArgumentType.MESSAGE_BODY, "temperature"))); |
|
|
|
configuration.setResult(new TbMathResult(TbMathArgumentType.MESSAGE_BODY, "temperatureCelsius", 2, false, false, null)); |
|
|
|
return configuration; |
|
|
|
} |
|
|
|
|