[
https://issues.apache.org/jira/browse/SLING-4862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14680373#comment-14680373
]
Bertrand Delacretaz commented on SLING-4862:
--------------------------------------------
Thanks [~henzlerg] for your patch! I've quickly reviewed it, a few comments:
The HTML output is not escaped AFAICS, you can use the ResponseUtil class from
the Sling api bundle for that (and maybe just embed that class if the API
itself is not needed).
Are you accepting all HTTP methods by purpose? I would think GET and maybe POST
would be enough.
The usual convention in Sling is to use extensions to select the output format,
do you have a specific reason to use a "format" parameter?
The servlet's {{modified}} method is not useful IMO, it just reimplements the
default behavior.
I think the {{ResultHtmlSerializer.getClassForStatus()}} method can simply
return {{"hc" + status.toString()}}, and change the CSS class names to use
uppercase for the status part.
For the HTTP status selection I would prefer a parameter like
{{httpStatus=418:WARN}} which means "return status 418 if the overall status is
>= WARN" - but I can implement that myself if you want.
That's mostly minor things of course, apart from that I think this is a very
useful addition to our health checks!
> Sling Health Checks Servlet
> ---------------------------
>
> Key: SLING-4862
> URL: https://issues.apache.org/jira/browse/SLING-4862
> Project: Sling
> Issue Type: Improvement
> Components: Health Check
> Reporter: Bertrand Delacretaz
> Priority: Minor
> Attachments: SLING-4862-HealthCheckExecutorServlet.patch
>
>
> A Servlet that can execute health checks would be useful.
> It can take as input the tags of the HCs to execute, and output their results
> in JSON format.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)