Skip to content

Commit

Permalink
Added an additional spot where Annotation support may need to be disa…
Browse files Browse the repository at this point in the history
…bled
  • Loading branch information
johann8384 committed Oct 7, 2016
1 parent 83b067e commit 1a90670
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions src/tsd/QueryRpc.java
Original file line number Diff line number Diff line change
Expand Up @@ -519,22 +519,27 @@ public static TSQuery parseQuery(final TSDB tsdb, final HttpQuery query) {
public static TSQuery parseQuery(final TSDB tsdb, final HttpQuery query,
final List<ExpressionTree> expressions) {
final TSQuery data_query = new TSQuery();

final disableAnnotations = tsdb.getConfig().getString("tsd.core.enable_annotations").equals("false");
data_query.setStart(query.getRequiredQueryStringParam("start"));
data_query.setEnd(query.getQueryStringParam("end"));

if (query.hasQueryStringParam("padding")) {
data_query.setPadding(true);
}
if (query.hasQueryStringParam("no_annotations")) {

if (disableAnnotations) {
data_query.setNoAnnotations(true);
data_query.setGlobalAnnotations(false);
} else {
if (query.hasQueryStringParam("no_annotations") || disableAnnotations) {
data_query.setNoAnnotations(true);
}

if (query.hasQueryStringParam("global_annotations") || disableAnnotations) {
data_query.setGlobalAnnotations(true);
}
}

if (query.hasQueryStringParam("global_annotations")) {
data_query.setGlobalAnnotations(true);
}


if (query.hasQueryStringParam("show_tsuids")) {
data_query.setShowTSUIDs(true);
}
Expand Down

0 comments on commit 1a90670

Please # to comment.