Github user paul-rogers commented on a diff in the pull request:
https://github.com/apache/drill/pull/923#discussion_r136657555
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/StatusResources.java
---
@@ -50,75 +53,124 @@
public class StatusResources {
static final org.slf4j.Logger logger =
org.slf4j.LoggerFactory.getLogger(StatusResources.class);
+ public static final String PATH_STATUS_JSON = "/status.json";
+ public static final String PATH_STATUS = "/status";
+ public static final String PATH_OPTIONS_JSON = "/options.json";
+ public static final String PATH_INTERNAL_OPTIONS_JSON =
"/internal_options.json";
+ public static final String PATH_OPTIONS = "/options";
+ public static final String PATH_INTERNAL_OPTIONS = "/internal_options";
+
@Inject UserAuthEnabled authEnabled;
@Inject WorkManager work;
@Inject SecurityContext sc;
@GET
- @Path("/status.json")
+ @Path(StatusResources.PATH_STATUS_JSON)
@Produces(MediaType.APPLICATION_JSON)
public Pair<String, String> getStatusJSON() {
return new ImmutablePair<>("status", "Running!");
}
@GET
- @Path("/status")
+ @Path(StatusResources.PATH_STATUS)
@Produces(MediaType.TEXT_HTML)
public Viewable getStatus() {
return ViewableWithPermissions.create(authEnabled.get(),
"/rest/status.ftl", sc, getStatusJSON());
}
- @GET
- @Path("/options.json")
- @RolesAllowed(DrillUserPrincipal.AUTHENTICATED_ROLE)
- @Produces(MediaType.APPLICATION_JSON)
- public List<OptionWrapper> getSystemOptionsJSON() {
+ private List<OptionWrapper> getSystemOptionsJSONHelper(boolean internal)
+ {
List<OptionWrapper> options = new LinkedList<>();
- for (OptionValue option : work.getContext().getOptionManager()) {
+ OptionManager optionManager = work.getContext().getOptionManager();
+ OptionList optionList = internal ?
optionManager.getInternalOptionList(): optionManager.getExternalOptionList();
+
+ for (OptionValue option : optionList) {
options.add(new OptionWrapper(option.name, option.getValue(),
option.type, option.kind));
}
+
--- End diff --
FWIW, DRILL-5716 introduces name sorting to this page. (I can never find
anything in the original unsorted list...)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---