Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #110 from ricardolstephen/opendistro-1.8
Browse files Browse the repository at this point in the history
Store REST routes as fields
  • Loading branch information
ricardolstephen authored May 27, 2020
2 parents dc5b81e + 256a9c4 commit b0f3a09
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ public class PerformanceAnalyzerConfigAction extends BaseRestHandler {
private static PerformanceAnalyzerConfigAction instance = null;
private boolean isInitialized = false;
private boolean featureEanbledDefaultValue = true;
private static final List<Route> ROUTES = unmodifiableList(asList(
new Route(org.elasticsearch.rest.RestRequest.Method.GET, "/_opendistro/_performanceanalyzer/config"),
new Route(org.elasticsearch.rest.RestRequest.Method.POST, "/_opendistro/_performanceanalyzer/config")
));

public static PerformanceAnalyzerConfigAction getInstance() {
return instance;
Expand All @@ -68,10 +72,7 @@ public PerformanceAnalyzerConfigAction(RestController controller) {

@Override
public List<Route> routes() {
return unmodifiableList(asList(
new Route(org.elasticsearch.rest.RestRequest.Method.GET, "/_opendistro/_performanceanalyzer/config"),
new Route(org.elasticsearch.rest.RestRequest.Method.POST, "/_opendistro/_performanceanalyzer/config")
));
return ROUTES;
}

@Override
Expand Down

0 comments on commit b0f3a09

Please sign in to comment.