vdiravka commented on a change in pull request #1692: DRILL-6562: Plugin Management improvements URL: https://github.com/apache/drill/pull/1692#discussion_r267363331
########## File path: exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/StorageResources.java ########## @@ -137,31 +159,37 @@ public JsonResult enablePlugin(@PathParam("name") String name, @PathParam("val") } @GET - @Path("/storage/{name}/export") + @Path("/storage/{name}/export/{format}") @Produces(MediaType.APPLICATION_JSON) - public Response exportPlugin(@PathParam("name") String name) { - Response.ResponseBuilder response = Response.ok(getStoragePluginJSON(name)); - response.header("Content-Disposition", String.format("attachment;filename=\"%s.json\"", name)); - return response.build(); + public Response exportPlugin(@PathParam("name") String name, @PathParam("format") String format) { + if (JSON_FILE_NAME.equalsIgnoreCase(format) || HOCON_FILE_NAME.equalsIgnoreCase(format)) { + PluginConfigWrapper storagePluginConfigs = getPluginConfig(name); + Response.ResponseBuilder response = Response.ok(storagePluginConfigs); + response.header("Content-Disposition", String.format("attachment;filename=\"%s.%s\"", name, format)); Review comment: I applied it also in `LogsResources.java` class ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services