Arsnael commented on code in PR #2399: URL: https://github.com/apache/james-project/pull/2399#discussion_r1746909076
########## docs/modules/servers/partials/operate/webadmin.adoc: ########## @@ -100,7 +100,7 @@ Performs health checks for the given components. Components are referenced by their URL encoded names. .... -curl -XGET http://ip:port/healthcheck?checks={backend-name-1}+{backend-name}%20backend +curl -XGET http://ip:port/healthcheck?check=HealthCheck1$check=HealthCheck%20two Review Comment: ```suggestion curl -XGET http://ip:port/healthcheck?check=HealthCheck1&check=HealthCheck%20two ``` ########## server/protocols/webadmin/webadmin-core/src/main/java/org/apache/james/webadmin/routes/HealthCheckRoutes.java: ########## @@ -90,18 +88,26 @@ public void define(Service service) { } public Object validateHealthChecks(Request request, Response response) { - Optional<String> maybeComponentNamesString = Optional.ofNullable(request.queryParams(QUERY_PARAM_COMPONENT_NAMES)); - Collection<HealthCheck> healthChecks = maybeComponentNamesString.map(this::getHealthChecks).orElse(healthCheckMap.values()); + Set<ComponentName> selectedComponentNames = + Arrays.stream(Optional.ofNullable(request.queryParamsValues(QUERY_PARAM_COMPONENT_NAMES)).orElse(new String[0])) + .map(ComponentName::new) + .collect(ImmutableSet.toImmutableSet()); + Collection<HealthCheck> selectedHealthChecks; + if (selectedComponentNames.isEmpty()) { + selectedHealthChecks = healthChecks; Review Comment: Not fixed -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
