Skip to content

Commit

Permalink
Nacos console Service list .Group search is not correct alibaba#4306
Browse files Browse the repository at this point in the history
  • Loading branch information
wangchunhao committed Nov 24, 2020
1 parent c8d46a6 commit 92523de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,5 +189,7 @@ public class Constants {
public static final String HTTP_PREFIX = "http";

public static final String ALL_PATTERN = "*";


public static final int SERVICE_INFO_SPLIT_SIZE = 2;

}
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ public int getInstanceCount() {
}
return total;
}

public int getPagedService(String namespaceId, int startPage, int pageSize, String param, String containedInstance,
List<Service> serviceList, boolean hasIpCount) {

Expand All @@ -935,7 +935,7 @@ public int getPagedService(String namespaceId, int startPage, int pageSize, Stri

if (StringUtils.isNotBlank(param)) {
StringJoiner regex = new StringJoiner(Constants.SERVICE_INFO_SPLITER);
for (String s : param.split(Constants.SERVICE_INFO_SPLITER)) {
for (String s : param.split(Constants.SERVICE_INFO_SPLITER, Constants.SERVICE_INFO_SPLIT_SIZE)) {
regex.add(StringUtils.isBlank(s) ? Constants.ANY_PATTERN
: Constants.ANY_PATTERN + s + Constants.ANY_PATTERN);
}
Expand Down

0 comments on commit 92523de

Please sign in to comment.