From 2c12b075340ac5058dc2c57b0e272048a6ba43f6 Mon Sep 17 00:00:00 2001 From: jiajiangnan Date: Thu, 29 Apr 2021 09:47:40 +0800 Subject: [PATCH] dashboard: Fix the incorrect function name in ParamFlowRuleEntity (#2173) --- .../csp/sentinel/dashboard/client/SentinelApiClient.java | 2 +- .../dashboard/datasource/entity/rule/ParamFlowRuleEntity.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/client/SentinelApiClient.java b/sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/client/SentinelApiClient.java index 396258e3..01420598 100755 --- a/sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/client/SentinelApiClient.java +++ b/sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/client/SentinelApiClient.java @@ -503,7 +503,7 @@ public class SentinelApiClient { AssertUtil.isTrue(port > 0, "Bad machine port"); return fetchItemsAsync(ip, port, GET_PARAM_RULE_PATH, null, ParamFlowRule.class) .thenApply(rules -> rules.stream() - .map(e -> ParamFlowRuleEntity.fromAuthorityRule(app, ip, port, e)) + .map(e -> ParamFlowRuleEntity.fromParamFlowRule(app, ip, port, e)) .collect(Collectors.toList()) ); } catch (Exception e) { diff --git a/sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/datasource/entity/rule/ParamFlowRuleEntity.java b/sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/datasource/entity/rule/ParamFlowRuleEntity.java index 56bd773c..b1c10d97 100644 --- a/sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/datasource/entity/rule/ParamFlowRuleEntity.java +++ b/sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/datasource/entity/rule/ParamFlowRuleEntity.java @@ -38,7 +38,7 @@ public class ParamFlowRuleEntity extends AbstractRuleEntity { this.rule = rule; } - public static ParamFlowRuleEntity fromAuthorityRule(String app, String ip, Integer port, ParamFlowRule rule) { + public static ParamFlowRuleEntity fromParamFlowRule(String app, String ip, Integer port, ParamFlowRule rule) { ParamFlowRuleEntity entity = new ParamFlowRuleEntity(rule); entity.setApp(app); entity.setIp(ip);