Skip to content

Commit

Permalink
fixed the order by in raw data
Browse files Browse the repository at this point in the history
  • Loading branch information
antleb committed Feb 12, 2024
1 parent e90c5a4 commit 5a167d1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public JsonResponse handleRawDataRequest(RawDataRequestInfo requestInfo) throws
log.debug("Query:" + q.getName() );

try {
statsServiceResults = this.statsService.query(requestInfo.getQueries());
statsServiceResults = this.statsService.query(requestInfo.getQueries(), requestInfo.getOrderBy());

this.logChartInfo(requestInfo, statsServiceResults);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,22 @@ public class RawDataRequestInfo {
@JsonProperty
private List<RawDataSeriesInfo> series;

@JsonProperty
private String orderBy;

@JsonProperty
private boolean verbose;


public RawDataRequestInfo() {
}

public RawDataRequestInfo(List<RawDataSeriesInfo> series, String orderBy, boolean verbose) {
this.series = series;
this.orderBy = orderBy;
this.verbose = verbose;
}

@JsonIgnore
public List<Query> getQueries(){
ArrayList<Query> retList = new ArrayList<>();
Expand All @@ -48,20 +57,11 @@ public void setVerbose(boolean verbose) {
this.verbose = verbose;
}

public static void main(String[] args) throws JsonProcessingException {
RawDataRequestInfo requestInfo = new RawDataRequestInfo();
RawDataSeriesInfo seriesInfo = new RawDataSeriesInfo();

Query q = new Query();

q.setName("nananaann");
q.setParameters(Arrays.asList("asda", "adfsds"));

seriesInfo.setQuery(q);
requestInfo.setSeries(Arrays.asList(seriesInfo, seriesInfo));
requestInfo.setVerbose(true);

public String getOrderBy() {
return orderBy;
}

System.out.println(new ObjectMapper().writeValueAsString(requestInfo));
public void setOrderBy(String orderBy) {
this.orderBy = orderBy;
}
}

0 comments on commit 5a167d1

Please sign in to comment.