Skip to content

Commit

Permalink
refactor: optimize conditinos of queryFacadeImpl (traas-stack#507)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsy1001de authored Jun 15, 2023
1 parent a1dec14 commit 44b8a1c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public interface TenantInitService {
*/
String getTsdbTenant(String tenant);

Boolean checkConditions(String workspace, List<QueryFilter> filters);
Boolean checkConditions(String workspace, String metric, List<QueryFilter> filters);


/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public String getTsdbTenant(String tenant) {
}

@Override
public Boolean checkConditions(String workspace, List<QueryFilter> filters) {
public Boolean checkConditions(String workspace, String metric, List<QueryFilter> filters) {
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,8 @@ public QueryProto.QueryRequest convertRequest(DataQueryRequest request) {

QueryProto.Datasource.Builder datasourceBuilder = QueryProto.Datasource.newBuilder();
toProtoBean(datasourceBuilder, d);
Boolean aBoolean =
tenantInitService.checkConditions(ms.getWorkspace(), datasourceBuilder.getFiltersList());
Boolean aBoolean = tenantInitService.checkConditions(ms.getWorkspace(),
datasourceBuilder.getMetric(), datasourceBuilder.getFiltersList());
if (!aBoolean) {
throw new MonitorException("workspace is illegal");
}
Expand Down

0 comments on commit 44b8a1c

Please sign in to comment.