RestClient - add getRuleChains by type. Updated edge_root_rule_chain - remove Success from RPC Call from device to Push to cloud

This commit is contained in:
Volodymyr Babak 2022-11-10 17:23:46 +02:00
parent 4a2386918a
commit 1b191acace
2 changed files with 6 additions and 6 deletions

View File

@ -174,11 +174,6 @@
"fromIndex": 3, "fromIndex": 3,
"toIndex": 7, "toIndex": 7,
"type": "Timeseries Updated" "type": "Timeseries Updated"
},
{
"fromIndex": 4,
"toIndex": 7,
"type": "Success"
} }
], ],
"ruleChainConnections": null "ruleChainConnections": null

View File

@ -2032,10 +2032,15 @@ public class RestClient implements ClientHttpRequestInterceptor, Closeable {
} }
public PageData<RuleChain> getRuleChains(PageLink pageLink) { public PageData<RuleChain> getRuleChains(PageLink pageLink) {
return getRuleChains(RuleChainType.CORE, pageLink);
}
public PageData<RuleChain> getRuleChains(RuleChainType ruleChainType, PageLink pageLink) {
Map<String, String> params = new HashMap<>(); Map<String, String> params = new HashMap<>();
params.put("type", ruleChainType.name());
addPageLinkToParam(params, pageLink); addPageLinkToParam(params, pageLink);
return restTemplate.exchange( return restTemplate.exchange(
baseURL + "/api/ruleChains?" + getUrlParams(pageLink), baseURL + "/api/ruleChains?type={type}&" + getUrlParams(pageLink),
HttpMethod.GET, HttpMethod.GET,
HttpEntity.EMPTY, HttpEntity.EMPTY,
new ParameterizedTypeReference<PageData<RuleChain>>() { new ParameterizedTypeReference<PageData<RuleChain>>() {