You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/10/18 23:20:14 UTC
[sling-org-apache-sling-hc-webconsole] branch master created (now
ad5b435)
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git.
at ad5b435 SLING-7167 Adjust READMEs
This branch includes the following new commits:
new 8329d97 SLING-3127 - prepare Health Check tools release
new da38f72 SLING-3127 - it's Apache Sling ;-)
new 7758b09 SLING-3127 - add scm info
new 0acb422 SLING-3127 - use latest parent pom
new 2e61450 [maven-release-plugin] prepare release org.apache.sling.hc.core-1.0.0
new 7d3efdf [maven-release-plugin] prepare for next development iteration
new 8bca7d7 [maven-release-plugin] prepare release org.apache.sling.hc.core-1.0.2
new de46239 [maven-release-plugin] prepare for next development iteration
new ebd361b SLING-3127 - prepare for release
new 2a2e06a [maven-release-plugin] prepare release org.apache.sling.hc.webconsole-1.0.4
new a231059 [maven-release-plugin] prepare for next development iteration
new 8d16152 SLING-3127 - switch to snapshots (we might switch back once hc.core is released)
new 02ce3df SLING-3127 - switch back to released hc.core bundle
new 3acbd01 SLING-3278 : Provide a HealthCheckExecutor service. Applied modified patch from Georg Henzler. I've changed the methods names and signatures of the executor service and did some implementation changes and code clean ups. This is not the final version, the commit should rather help going forward
new c85f2c9 SLING-3278 : Provide a HealthCheckExecutor service. Move executor into separate package, reuse Result from HC
new 6fcda76 SLING-3278 : Provide a HealthCheckExecutor service. Separate health check meta data into separate class.
new 680edd0 SLING-3278 : Provide a HealthCheckExecutor service. Clean up web console plugin code
new b570a13 SLING-3278 : Provide a HealthCheckExecutor service. Clean up web console plugin code
new b3c5b01 HealthCheckMetaData -> HealthCheckMetadata
new a063561 SLING-3278 : Provide a HealthCheckExecutor service. Change API to execute checks based on tags, add service reference to HealthCheckMetadata
new 378abc3 Prepare for release
new d16c469 [maven-release-plugin] prepare release org.apache.sling.hc.webconsole-1.1.0
new d7e0d4d [maven-release-plugin] prepare for next development iteration
new ba86fcf Switch to latest snapshot until release is done
new 92c4fdc Update to parent pom v19
new 9f12aa5 Updated to parent version 20
new 7c246a5 Back to snapshots, until the released modules are available
new e743edf Update to Sling Parent POM 22 with baselining enabled
new 15abc54 SLING-3501 - allow for combining Health Checks selection tags with OR in addition to the default AND. Contributed by Georg Henzler, thanks!
new eae61a2 SLING-3501 - tweak webconsole form label
new 72ca35e Correct typo in description
new 53719d9 Use released hc.core
new 68a8c72 [maven-release-plugin] prepare release org.apache.sling.hc.webconsole-1.1.2
new 4c3338e [maven-release-plugin] prepare for next development iteration
new dad6c35 Switch back to snapshot
new e9ba3c0 Add missing licence header
new 8a5fd03 SLING-4698 - Set parent.relativePath to empty for all modules
new c10d032 Update to Sling Parent 23
new 303ba5e Remove superflous sling.java.version=6 as it's the default now
new c1f5766 set parent version to 24 and add empty relativePath where missing
new 2f910bc Update the main reactor to parent 25
new e1149c0 Switch to parent pom 26
new 7a75f9d SLING-6944 fixed date format pattern
new ad5b435 SLING-7167 Adjust READMEs
The 44 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
--
To stop receiving notification emails like this one, please contact
['"commits@sling.apache.org" <co...@sling.apache.org>'].
[sling-org-apache-sling-hc-webconsole] 26/44: Updated to parent
version 20
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit 9f12aa5902461dea625daffec13619e27a30ab36
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Fri Aug 1 19:16:26 2014 +0000
Updated to parent version 20
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1615208 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 6a1f5f0..caaf023 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>19</version>
+ <version>20</version>
<relativePath>../../../../parent/pom.xml</relativePath>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 17/44: SLING-3278 : Provide
a HealthCheckExecutor service. Clean up web console plugin code
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit 680edd0db637e54fe26502eea951bc83192b3496
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Fri Jan 3 06:20:52 2014 +0000
SLING-3278 : Provide a HealthCheckExecutor service. Clean up web console plugin code
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1555016 13f79535-47bb-0310-9956-ffa450edef68
---
.../impl/HealthCheckWebconsolePlugin.java | 77 +++++++++++++---------
.../sling/hc/webconsole/impl/WebConsoleHelper.java | 22 ++++---
2 files changed, 61 insertions(+), 38 deletions(-)
diff --git a/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java b/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java
index 19513ae..a541ab1 100644
--- a/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java
+++ b/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java
@@ -80,7 +80,8 @@ public class HealthCheckWebconsolePlugin extends HttpServlet {
}
/** Serve static resource if applicable, and return true in that case */
- private boolean getStaticResource(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
+ private boolean getStaticResource(final HttpServletRequest req, final HttpServletResponse resp)
+ throws ServletException, IOException {
final String pathInfo = req.getPathInfo();
if(pathInfo!= null && pathInfo.contains("res/ui")) {
final String prefix = "/" + LABEL;
@@ -100,25 +101,26 @@ public class HealthCheckWebconsolePlugin extends HttpServlet {
}
@Override
- protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
- if(getStaticResource(req, resp)) {
+ protected void doGet(final HttpServletRequest req, final HttpServletResponse resp)
+ throws ServletException, IOException {
+ if (getStaticResource(req, resp)) {
return;
}
- final String tags = getParam(req, PARAM_TAGS, "");
+ final String tags = getParam(req, PARAM_TAGS, null);
final boolean debug = Boolean.valueOf(getParam(req, PARAM_DEBUG, "false"));
final boolean quiet = Boolean.valueOf(getParam(req, PARAM_QUIET, "false"));
- doForm(req, resp, tags, debug, quiet);
+ final PrintWriter pw = resp.getWriter();
+ doForm(pw, tags, debug, quiet);
// Execute health checks only if tags are specified (even if empty)
- if(req.getParameter(PARAM_TAGS) != null) {
+ if (tags != null) {
final HealthCheckFilter filter = new HealthCheckFilter(this.bundleContext);
try {
final ServiceReference[] refs = filter.getTaggedHealthCheckServiceReferences(tags.split(","));
Collection<HealthCheckExecutionResult> results = healthCheckExecutor.execute(refs);
- final PrintWriter pw = resp.getWriter();
pw.println("<table class='content healthcheck' cellpadding='0' cellspacing='0' width='100%'>");
int total = 0;
int failed = 0;
@@ -130,7 +132,7 @@ public class HealthCheckWebconsolePlugin extends HttpServlet {
failed++;
}
if (!quiet || !r.isOk()) {
- renderResult(resp, exR, debug);
+ renderResult(pw, exR, debug);
}
}
@@ -143,9 +145,12 @@ public class HealthCheckWebconsolePlugin extends HttpServlet {
}
}
- private void renderResult(HttpServletResponse resp, HealthCheckExecutionResult exResult, boolean debug) throws IOException {
+ private void renderResult(final PrintWriter pw,
+ final HealthCheckExecutionResult exResult,
+ final boolean debug)
+ throws IOException {
final Result result = exResult.getHealthCheckResult();
- final WebConsoleHelper c = new WebConsoleHelper(resp.getWriter());
+ final WebConsoleHelper c = new WebConsoleHelper(pw);
final StringBuilder status = new StringBuilder();
@@ -165,24 +170,26 @@ public class HealthCheckWebconsolePlugin extends HttpServlet {
c.tr();
c.tdContent();
- for(ResultLog.Entry e : result) {
- if(!debug && e.getStatus().equals(Result.Status.DEBUG)) {
+ for(final ResultLog.Entry e : result) {
+ if (!debug && e.getStatus().equals(Result.Status.DEBUG)) {
continue;
}
- final StringBuilder sb = new StringBuilder();
- sb.append("<div class='log").append(e.getStatus()).append("'>");
- sb.append(e.getStatus())
- .append(" ")
- .append(ResponseUtil.escapeXml(e.getMessage()))
- .append("</div>");
- c.writer().println(sb.toString());
+ c.writer().print("<div class='log");
+ c.writer().print(e.getStatus().toString());
+ c.writer().print("'>");
+ c.writer().print(e.getStatus().toString());
+ c.writer().print(' ');
+ c.writer().print(ResponseUtil.escapeXml(e.getMessage()));
+ c.writer().println("</div>");
}
c.closeTd();
}
- private void doForm(HttpServletRequest req, HttpServletResponse resp, String tags, boolean debug, boolean quiet)
- throws IOException {
- final PrintWriter pw = resp.getWriter();
+ private void doForm(final PrintWriter pw,
+ final String tags,
+ final boolean debug,
+ final boolean quiet)
+ throws IOException {
final WebConsoleHelper c = new WebConsoleHelper(pw);
pw.print("<form method='get'>");
pw.println("<table class='content' cellpadding='0' cellspacing='0' width='100%'>");
@@ -193,36 +200,46 @@ public class HealthCheckWebconsolePlugin extends HttpServlet {
c.tr();
c.tdLabel("Health Check tags (comma-separated)");
c.tdContent();
- pw.println("<input type='text' name='" + PARAM_TAGS + "' value='" + tags + "' class='input' size='80'>");
+ c.writer().print("<input type='text' name='" + PARAM_TAGS + "' value='");
+ if ( tags != null ) {
+ c.writer().print(ResponseUtil.escapeXml(tags));
+ }
+ c.writer().println("' class='input' size='80'>");
c.closeTd();
c.closeTr();
c.tr();
c.tdLabel("Show DEBUG logs");
c.tdContent();
- pw.println("<input type='checkbox' name='" + PARAM_DEBUG + "' class='input' value='true'"
- + (debug ? " checked=true " : "") + ">");
+ c.writer().print("<input type='checkbox' name='" + PARAM_DEBUG + "' class='input' value='true'");
+ if ( debug ) {
+ c.writer().print(" checked=true");
+ }
+ c.writer().println(">");
c.closeTd();
c.closeTr();
c.tr();
c.tdLabel("Show failed checks only");
c.tdContent();
- pw.println("<input type='checkbox' name='" + PARAM_QUIET + "' class='input' value='true'"
- + (quiet ? " checked=true " : "") + ">");
+ c.writer().print("<input type='checkbox' name='" + PARAM_QUIET + "' class='input' value='true'");
+ if ( quiet ) {
+ c.writer().print(" checked=true");
+ }
+ c.writer().println(">");
c.closeTd();
c.closeTr();
c.tr();
c.tdContent();
- pw.println("<input type='submit' value='Execute selected health checks'/>");
+ c.writer().println("<input type='submit' value='Execute selected health checks'/>");
c.closeTd();
c.closeTr();
- pw.println("</table></form>");
+ c.writer().println("</table></form>");
}
- private String getParam(HttpServletRequest req, String name, String defaultValue) {
+ private String getParam(final HttpServletRequest req, final String name, final String defaultValue) {
String result = req.getParameter(name);
if(result == null) {
result = defaultValue;
diff --git a/src/main/java/org/apache/sling/hc/webconsole/impl/WebConsoleHelper.java b/src/main/java/org/apache/sling/hc/webconsole/impl/WebConsoleHelper.java
index beb1b34..e623f31 100644
--- a/src/main/java/org/apache/sling/hc/webconsole/impl/WebConsoleHelper.java
+++ b/src/main/java/org/apache/sling/hc/webconsole/impl/WebConsoleHelper.java
@@ -21,19 +21,19 @@ import java.io.PrintWriter;
import org.apache.sling.api.request.ResponseUtil;
-/** Webconsole plugin to execute health check rules */
+/** Webconsole plugin to execute health check rules */
class WebConsoleHelper {
-
+
final PrintWriter pw;
-
- WebConsoleHelper(PrintWriter w) {
+
+ WebConsoleHelper(final PrintWriter w) {
pw = w;
}
PrintWriter writer() {
return pw;
}
-
+
void tdContent() {
pw.print("<td class='content' colspan='2'>");
}
@@ -47,7 +47,9 @@ class WebConsoleHelper {
}
void tdLabel(final String label) {
- pw.println("<td class='content'>" + ResponseUtil.escapeXml(label) + "</td>");
+ pw.print("<td class='content'>");
+ pw.print(ResponseUtil.escapeXml(label));
+ pw.println("</td>");
}
void tr() {
@@ -56,12 +58,16 @@ class WebConsoleHelper {
void titleHtml(String title, String description) {
tr();
- pw.println("<th colspan='3' class='content container'>" + ResponseUtil.escapeXml(title) + "</th>");
+ pw.print("<th colspan='3' class='content container'>");
+ pw.print(ResponseUtil.escapeXml(title));
+ pw.println("</th>");
closeTr();
if (description != null) {
tr();
- pw.println("<td colspan='3' class='content'>" +ResponseUtil.escapeXml(description) + "</th>");
+ pw.print("<td colspan='3' class='content'>");
+ pw.print(ResponseUtil.escapeXml(description));
+ pw.println("</th>");
closeTr();
}
}
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 43/44: SLING-6944 fixed date
format pattern
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit 7a75f9d39935f1b0d4543118efd496977dc9bf24
Author: Georg Henzler <gh...@apache.org>
AuthorDate: Fri Jun 9 09:54:04 2017 +0000
SLING-6944 fixed date format pattern
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1798181 13f79535-47bb-0310-9956-ffa450edef68
---
.../apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java b/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java
index 98f9231..59d43f1 100644
--- a/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java
+++ b/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java
@@ -164,7 +164,7 @@ public class HealthCheckWebconsolePlugin extends HttpServlet {
final StringBuilder status = new StringBuilder();
status.append("Tags: ").append(exResult.getHealthCheckMetadata().getTags());
- status.append(" Finished: ").append(new SimpleDateFormat("yyyy-MM-dd mm:ss").format(exResult.getFinishedAt()) + " after "
+ status.append(" Finished: ").append(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(exResult.getFinishedAt()) + " after "
+ msHumanReadable(exResult.getElapsedTimeInMs()));
c.titleHtml(exResult.getHealthCheckMetadata().getTitle(), null);
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 40/44: set parent version to
24 and add empty relativePath where missing
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit c1f5766dd8af188778422c2aeba1e510c87100cb
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Tue Jul 7 08:09:17 2015 +0000
set parent version to 24 and add empty relativePath where missing
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1689593 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 5a084f4..64519f2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>23</version>
+ <version>24</version>
<relativePath/>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 05/44:
[maven-release-plugin] prepare release org.apache.sling.hc.core-1.0.0
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit 2e61450c91067622a27c100a097488eeb033e58d
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Thu Sep 26 14:28:11 2013 +0000
[maven-release-plugin] prepare release org.apache.sling.hc.core-1.0.0
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1526506 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/pom.xml b/pom.xml
index 7b42c8b..e4f23af 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project
- xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -16,7 +13,7 @@
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.hc.webconsole</artifactId>
<packaging>bundle</packaging>
- <version>0.0.2-SNAPSHOT</version>
+ <version>1.0.0</version>
<name>Apache Sling Health Check Webconsole Plugin</name>
<inceptionYear>2013</inceptionYear>
@@ -30,9 +27,9 @@
</properties>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/webconsole</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/webconsole</developerConnection>
- <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/healthcheck/webconsole</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.hc.core-1.0.0/bundles/extensions/healthcheck/webconsole</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.hc.core-1.0.0/bundles/extensions/healthcheck/webconsole</developerConnection>
+ <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.hc.core-1.0.0/bundles/extensions/healthcheck/webconsole</url>
</scm>
<build>
@@ -61,7 +58,7 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.hc.core</artifactId>
- <version>0.0.2-SNAPSHOT</version>
+ <version>1.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 06/44:
[maven-release-plugin] prepare for next development iteration
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit 7d3efdf9aa36d0854b11adb5176e29492c5dcc89
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Thu Sep 26 14:29:30 2013 +0000
[maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1526509 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/pom.xml b/pom.xml
index e4f23af..60bf9f4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,7 +13,7 @@
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.hc.webconsole</artifactId>
<packaging>bundle</packaging>
- <version>1.0.0</version>
+ <version>1.0.1-SNAPSHOT</version>
<name>Apache Sling Health Check Webconsole Plugin</name>
<inceptionYear>2013</inceptionYear>
@@ -27,9 +27,9 @@
</properties>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.hc.core-1.0.0/bundles/extensions/healthcheck/webconsole</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.hc.core-1.0.0/bundles/extensions/healthcheck/webconsole</developerConnection>
- <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.hc.core-1.0.0/bundles/extensions/healthcheck/webconsole</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/webconsole</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/webconsole</developerConnection>
+ <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/healthcheck/webconsole</url>
</scm>
<build>
@@ -58,7 +58,7 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.hc.core</artifactId>
- <version>1.0.0</version>
+ <version>1.0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 38/44: Update to Sling
Parent 23
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit c10d032805c202cfed6e73f9514f70dba175424c
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu Jun 25 13:08:16 2015 +0000
Update to Sling Parent 23
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1687500 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 3df25db..b69478a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>22</version>
+ <version>23</version>
<relativePath/>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 23/44:
[maven-release-plugin] prepare for next development iteration
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit d7e0d4da4c77e8a02251f7031a263109584c3771
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Mon Jan 27 16:35:18 2014 +0000
[maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1561735 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index ccbc93a..8bfd700 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,7 +13,7 @@
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.hc.webconsole</artifactId>
<packaging>bundle</packaging>
- <version>1.1.0</version>
+ <version>1.1.1-SNAPSHOT</version>
<name>Apache Sling Health Check Webconsole Plugin</name>
<inceptionYear>2013</inceptionYear>
@@ -27,9 +27,9 @@
</properties>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.hc.webconsole-1.1.0</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.hc.webconsole-1.1.0</developerConnection>
- <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.hc.webconsole-1.1.0</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/webconsole</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/webconsole</developerConnection>
+ <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/healthcheck/webconsole</url>
</scm>
<build>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 39/44: Remove superflous
sling.java.version=6 as it's the default now
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit 303ba5e4e90f92847886bd8f1da2b9b4e3de0f25
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu Jun 25 13:14:53 2015 +0000
Remove superflous sling.java.version=6 as it's the default now
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1687505 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 4 ----
1 file changed, 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index b69478a..5a084f4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -40,10 +40,6 @@
Webconsole plugin for Sling Health Check Services
</description>
- <properties>
- <sling.java.version>6</sling.java.version>
- </properties>
-
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/webconsole</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/webconsole</developerConnection>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 29/44: SLING-3501 - allow
for combining Health Checks selection tags with OR in addition to the
default AND. Contributed by Georg Henzler, thanks!
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit 15abc54bbb0045fd472b681244ccb8c557997a4c
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Mon Jan 5 16:26:21 2015 +0000
SLING-3501 - allow for combining Health Checks selection tags with OR in addition to the default AND. Contributed by Georg Henzler, thanks!
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1649574 13f79535-47bb-0310-9956-ffa450edef68
---
.../impl/HealthCheckWebconsolePlugin.java | 71 +++++++++++++++++++++-
1 file changed, 68 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java b/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java
index e8dd07e..b7885bd 100644
--- a/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java
+++ b/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java
@@ -17,10 +17,13 @@
*/
package org.apache.sling.hc.webconsole.impl;
+import static org.apache.sling.hc.util.FormattingResultLog.msHumanReadable;
+
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
+import java.text.SimpleDateFormat;
import java.util.Collection;
import javax.servlet.Servlet;
@@ -37,6 +40,7 @@ import org.apache.felix.scr.annotations.Service;
import org.apache.sling.api.request.ResponseUtil;
import org.apache.sling.hc.api.Result;
import org.apache.sling.hc.api.ResultLog;
+import org.apache.sling.hc.api.execution.HealthCheckExecutionOptions;
import org.apache.sling.hc.api.execution.HealthCheckExecutionResult;
import org.apache.sling.hc.api.execution.HealthCheckExecutor;
@@ -60,6 +64,10 @@ public class HealthCheckWebconsolePlugin extends HttpServlet {
public static final String PARAM_DEBUG = "debug";
public static final String PARAM_QUIET = "quiet";
+ public static final String PARAM_FORCE_INSTANT_EXECUTION = "forceInstantExecution";
+ public static final String PARAM_COMBINE_TAGS_WITH_OR = "combineTagsWithOr";
+ public static final String PARAM_OVERRIDE_GLOBAL_TIMEOUT = "overrideGlobalTimeout";
+
@Reference
private HealthCheckExecutor healthCheckExecutor;
@@ -103,13 +111,25 @@ public class HealthCheckWebconsolePlugin extends HttpServlet {
final String tags = getParam(req, PARAM_TAGS, null);
final boolean debug = Boolean.valueOf(getParam(req, PARAM_DEBUG, "false"));
final boolean quiet = Boolean.valueOf(getParam(req, PARAM_QUIET, "false"));
+ final boolean combineTagsWithOr = Boolean.valueOf(getParam(req, PARAM_COMBINE_TAGS_WITH_OR, "false"));
+ final boolean forceInstantExecution = Boolean.valueOf(getParam(req, PARAM_FORCE_INSTANT_EXECUTION, "false"));
+ final String overrideGlobalTimeoutStr = getParam(req, PARAM_OVERRIDE_GLOBAL_TIMEOUT, "");
final PrintWriter pw = resp.getWriter();
- doForm(pw, tags, debug, quiet);
+ doForm(pw, tags, debug, quiet, combineTagsWithOr, forceInstantExecution, overrideGlobalTimeoutStr);
// Execute health checks only if tags are specified (even if empty)
if (tags != null) {
- Collection<HealthCheckExecutionResult> results = healthCheckExecutor.execute(tags.split(","));
+ HealthCheckExecutionOptions options = new HealthCheckExecutionOptions();
+ options.setCombineTagsWithOr(combineTagsWithOr);
+ options.setForceInstantExecution(forceInstantExecution);
+ try {
+ options.setOverrideGlobalTimeout(Integer.valueOf(overrideGlobalTimeoutStr));
+ } catch (NumberFormatException nfe) {
+ // override not set in UI
+ }
+
+ Collection<HealthCheckExecutionResult> results = healthCheckExecutor.execute(options, tags.split(","));
pw.println("<table class='content healthcheck' cellpadding='0' cellspacing='0' width='100%'>");
int total = 0;
@@ -129,6 +149,8 @@ public class HealthCheckWebconsolePlugin extends HttpServlet {
final WebConsoleHelper c = new WebConsoleHelper(resp.getWriter());
c.titleHtml("Summary", total + " HealthCheck executed, " + failed + " failures");
pw.println("</table>");
+ pw.println("<a href='configMgr/org.apache.sling.hc.core.impl.executor.HealthCheckExecutorImpl'>Configure executor</a><br/><br/>");
+
}
}
@@ -142,6 +164,9 @@ public class HealthCheckWebconsolePlugin extends HttpServlet {
final StringBuilder status = new StringBuilder();
status.append("Tags: ").append(exResult.getHealthCheckMetadata().getTags());
+ status.append(" Finished: ").append(new SimpleDateFormat("yyyy-MM-dd mm:ss").format(exResult.getFinishedAt()) + " after "
+ + msHumanReadable(exResult.getElapsedTimeInMs()));
+
c.titleHtml(exResult.getHealthCheckMetadata().getTitle(), null);
c.tr();
@@ -167,6 +192,10 @@ public class HealthCheckWebconsolePlugin extends HttpServlet {
c.writer().print(e.getStatus().toString());
c.writer().print(' ');
c.writer().print(ResponseUtil.escapeXml(e.getMessage()));
+ if (e.getException() != null) {
+ c.writer().print(" ");
+ c.writer().print(ResponseUtil.escapeXml(e.getException().toString()));
+ }
c.writer().println("</div>");
}
c.closeTd();
@@ -175,7 +204,10 @@ public class HealthCheckWebconsolePlugin extends HttpServlet {
private void doForm(final PrintWriter pw,
final String tags,
final boolean debug,
- final boolean quiet)
+ final boolean quiet,
+ final boolean combineTagsWithOr,
+ final boolean forceInstantExecution,
+ final String overrideGlobalTimeoutStr)
throws IOException {
final WebConsoleHelper c = new WebConsoleHelper(pw);
pw.print("<form method='get'>");
@@ -196,6 +228,17 @@ public class HealthCheckWebconsolePlugin extends HttpServlet {
c.closeTr();
c.tr();
+ c.tdLabel("Combine tags with logical 'or'");
+ c.tdContent();
+ c.writer().print("<input type='checkbox' name='" + PARAM_COMBINE_TAGS_WITH_OR + "' class='input' value='true'");
+ if (combineTagsWithOr) {
+ c.writer().print(" checked=true");
+ }
+ c.writer().println(">");
+ c.closeTd();
+ c.closeTr();
+
+ c.tr();
c.tdLabel("Show DEBUG logs");
c.tdContent();
c.writer().print("<input type='checkbox' name='" + PARAM_DEBUG + "' class='input' value='true'");
@@ -218,6 +261,28 @@ public class HealthCheckWebconsolePlugin extends HttpServlet {
c.closeTr();
c.tr();
+ c.tdLabel("Force instant execution (no cache, async checks are executed)");
+ c.tdContent();
+ c.writer().print("<input type='checkbox' name='" + PARAM_FORCE_INSTANT_EXECUTION + "' class='input' value='true'");
+ if (forceInstantExecution) {
+ c.writer().print(" checked=true");
+ }
+ c.writer().println(">");
+ c.closeTd();
+ c.closeTr();
+
+ c.tr();
+ c.tdLabel("Override global timeout");
+ c.tdContent();
+ c.writer().print("<input type='text' name='" + PARAM_OVERRIDE_GLOBAL_TIMEOUT + "' value='");
+ if (overrideGlobalTimeoutStr != null) {
+ c.writer().print(ResponseUtil.escapeXml(overrideGlobalTimeoutStr));
+ }
+ c.writer().println("' class='input' size='80'>");
+ c.closeTd();
+ c.closeTr();
+
+ c.tr();
c.tdContent();
c.writer().println("<input type='submit' value='Execute selected health checks'/>");
c.closeTd();
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 19/44: HealthCheckMetaData
-> HealthCheckMetadata
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit b3c5b0174e7a3287e7c16dbb3ffa003cf9044746
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Fri Jan 3 14:08:22 2014 +0000
HealthCheckMetaData -> HealthCheckMetadata
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1555097 13f79535-47bb-0310-9956-ffa450edef68
---
.../apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java b/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java
index 68be3b9..48f48ee 100644
--- a/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java
+++ b/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java
@@ -164,8 +164,8 @@ public class HealthCheckWebconsolePlugin extends HttpServlet {
final StringBuilder status = new StringBuilder();
- status.append("Tags: ").append(exResult.getHealthCheckMetaData().getTags());
- c.titleHtml(exResult.getHealthCheckMetaData().getTitle(), null);
+ status.append("Tags: ").append(exResult.getHealthCheckMetadata().getTags());
+ c.titleHtml(exResult.getHealthCheckMetadata().getTitle(), null);
c.tr();
c.tdContent();
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 04/44: SLING-3127 - use
latest parent pom
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit 0acb4225f7fe09fbf64b0d7b771aaa3ea43abcab
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Thu Sep 26 13:34:43 2013 +0000
SLING-3127 - use latest parent pom
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1526484 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pom.xml b/pom.xml
index d8c2e85..7b42c8b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,8 +9,8 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>17</version>
- <relativePath/>
+ <version>18</version>
+ <relativePath>../../../../parent/pom.xml</relativePath>
</parent>
<groupId>org.apache.sling</groupId>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 10/44:
[maven-release-plugin] prepare release org.apache.sling.hc.webconsole-1.0.4
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit 2a2e06a32627b6bca5b8cda6898ae3ab4bcb2785
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Thu Sep 26 15:01:06 2013 +0000
[maven-release-plugin] prepare release org.apache.sling.hc.webconsole-1.0.4
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1526541 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index 3942203..f71f16e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,7 +13,7 @@
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.hc.webconsole</artifactId>
<packaging>bundle</packaging>
- <version>1.0.3-SNAPSHOT</version>
+ <version>1.0.4</version>
<name>Apache Sling Health Check Webconsole Plugin</name>
<inceptionYear>2013</inceptionYear>
@@ -27,9 +27,9 @@
</properties>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/webconsole</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/webconsole</developerConnection>
- <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/healthcheck/webconsole</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.hc.webconsole-1.0.4</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.hc.webconsole-1.0.4</developerConnection>
+ <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.hc.webconsole-1.0.4</url>
</scm>
<build>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 01/44: SLING-3127 - prepare
Health Check tools release
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit 8329d97f13a8742d582c5719f007f180dd4bd0bd
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Thu Sep 26 13:17:13 2013 +0000
SLING-3127 - prepare Health Check tools release
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1526476 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 71 ++++++
.../impl/HealthCheckWebconsolePlugin.java | 237 +++++++++++++++++++++
.../sling/hc/webconsole/impl/WebConsoleHelper.java | 68 ++++++
src/main/resources/res/ui/healthcheck.css | 46 ++++
4 files changed, 422 insertions(+)
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..7c5f192
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.sling</groupId>
+ <artifactId>sling</artifactId>
+ <version>17</version>
+ <relativePath/>
+ </parent>
+
+ <groupId>org.apache.sling</groupId>
+ <artifactId>org.apache.sling.hc.webconsole</artifactId>
+ <packaging>bundle</packaging>
+ <version>0.0.2-SNAPSHOT</version>
+
+ <name>Sling Health Check Webconsole Plugin</name>
+ <inceptionYear>2013</inceptionYear>
+
+ <description>
+ Webconsole plugin for Sling Health Check Services
+ </description>
+
+ <properties>
+ <sling.java.version>6</sling.java.version>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-scr-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.compendium</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.sling</groupId>
+ <artifactId>org.apache.sling.hc.core</artifactId>
+ <version>0.0.2-SNAPSHOT</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.sling</groupId>
+ <artifactId>org.apache.sling.api</artifactId>
+ <version>2.1.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java b/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java
new file mode 100644
index 0000000..0f0de37
--- /dev/null
+++ b/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java
@@ -0,0 +1,237 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The SF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ */
+package org.apache.sling.hc.webconsole.impl;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PrintWriter;
+import java.util.Arrays;
+
+import javax.servlet.Servlet;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.felix.scr.annotations.Activate;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Properties;
+import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.Service;
+import org.apache.sling.api.request.ResponseUtil;
+import org.apache.sling.hc.api.HealthCheck;
+import org.apache.sling.hc.api.Result;
+import org.apache.sling.hc.api.ResultLog;
+import org.apache.sling.hc.util.HealthCheckFilter;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.component.ComponentContext;
+
+/** Webconsole plugin to execute health check services */
+@Component(immediate=true)
+@Service(Servlet.class)
+@SuppressWarnings("serial")
+@Properties({
+ @Property(name=org.osgi.framework.Constants.SERVICE_DESCRIPTION, value="Sling Health Check Web Console Plugin"),
+ @Property(name=org.osgi.framework.Constants.SERVICE_VENDOR, value="The Apache Software Foundation"),
+ @Property(name="felix.webconsole.label", value=HealthCheckWebconsolePlugin.LABEL),
+ @Property(name="felix.webconsole.title", value=HealthCheckWebconsolePlugin.TITLE),
+ @Property(name="felix.webconsole.category", value=HealthCheckWebconsolePlugin.CATEGORY),
+ @Property(name="felix.webconsole.css", value="/healthcheck/res/ui/healthcheck.css")
+})
+public class HealthCheckWebconsolePlugin extends HttpServlet {
+
+ public static final String TITLE = "Sling Health Check";
+ public static final String LABEL = "healthcheck";
+ public static final String CATEGORY = "Sling";
+ public static final String PARAM_TAGS = "tags";
+ public static final String PARAM_DEBUG = "debug";
+ public static final String PARAM_QUIET = "quiet";
+
+ private BundleContext bundleContext;
+
+ @Activate
+ protected void activate(ComponentContext ctx) {
+ bundleContext = ctx.getBundleContext();
+ }
+
+ /** Serve static resource if applicable, and return true in that case */
+ private boolean getStaticResource(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
+ final String pathInfo = req.getPathInfo();
+ if(pathInfo!= null && pathInfo.contains("res/ui")) {
+ final String prefix = "/" + LABEL;
+ final InputStream is = getClass().getResourceAsStream(pathInfo.substring(prefix.length()));
+ if(is == null) {
+ resp.sendError(HttpServletResponse.SC_NOT_FOUND, pathInfo);
+ }
+ final byte [] buffer = new byte[16384];
+ int n=0;
+ while( (n = is.read(buffer, 0, buffer.length)) > 0) {
+ resp.getOutputStream().write(buffer, 0, n);
+ }
+ resp.getOutputStream().flush();
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
+ if(getStaticResource(req, resp)) {
+ return;
+ }
+
+ final String tags = getParam(req, PARAM_TAGS, "");
+ final boolean debug = Boolean.valueOf(getParam(req, PARAM_DEBUG, "false"));
+ final boolean quiet = Boolean.valueOf(getParam(req, PARAM_QUIET, "false"));
+
+ doForm(req, resp, tags, debug, quiet);
+
+ // Execute health checks only if tags are specified (even if empty)
+ if(req.getParameter(PARAM_TAGS) != null) {
+ final ServiceReference[] references = new HealthCheckFilter(bundleContext).getTaggedHealthCheckServiceReferences(tags.split(","));
+
+ final PrintWriter pw = resp.getWriter();
+ pw.println("<table class='content healthcheck' cellpadding='0' cellspacing='0' width='100%'>");
+ int total = 0;
+ int failed = 0;
+ for(final ServiceReference ref : references) {
+ final HealthCheck hc = (HealthCheck) this.bundleContext.getService(ref);
+ if ( hc != null ) {
+ try {
+ final Result r = hc.execute();
+ total++;
+ if (!r.isOk()) {
+ failed++;
+ }
+ if (!quiet || !r.isOk()) {
+ renderResult(resp, ref, hc, r, debug);
+ }
+ } finally {
+ this.bundleContext.ungetService(ref);
+ }
+ }
+ }
+ final WebConsoleHelper c = new WebConsoleHelper(resp.getWriter());
+ c.titleHtml("Summary", total + " HealthCheck executed, " + failed + " failures");
+ pw.println("</table>");
+ }
+ }
+
+ private void renderResult(HttpServletResponse resp, final ServiceReference ref, HealthCheck hc, Result result, boolean debug) throws IOException {
+ final WebConsoleHelper c = new WebConsoleHelper(resp.getWriter());
+
+ final StringBuilder status = new StringBuilder();
+ final Object tags = ref.getProperty(HealthCheck.TAGS);
+ final String tagString;
+ if ( tags == null ) {
+ tagString = "";
+ } else if ( tags instanceof String[] ) {
+ tagString = Arrays.toString((String[])tags);
+ } else {
+ tagString = tags.toString();
+ }
+ status.append("Tags: ").append(tagString);
+ c.titleHtml(getName(ref, hc), null);
+
+ c.tr();
+ c.tdContent();
+ c.writer().print(ResponseUtil.escapeXml(status.toString()));
+ c.writer().print("<br/>Result: <span class='resultOk");
+ c.writer().print(result.isOk());
+ c.writer().print("'>");
+ c.writer().print(result.getStatus().toString());
+ c.writer().print("</span>");
+ c.closeTd();
+ c.closeTr();
+
+ c.tr();
+ c.tdContent();
+ for(ResultLog.Entry e : result) {
+ if(!debug && e.getStatus().equals(Result.Status.DEBUG)) {
+ continue;
+ }
+ final StringBuilder sb = new StringBuilder();
+ sb.append("<div class='log").append(e.getStatus()).append("'>");
+ sb.append(e.getStatus())
+ .append(" ")
+ .append(ResponseUtil.escapeXml(e.getMessage()))
+ .append("</div>");
+ c.writer().println(sb.toString());
+ }
+ c.closeTd();
+ }
+
+ private String getName(final ServiceReference ref, HealthCheck hc) {
+ Object result = ref.getProperty(HealthCheck.NAME);
+ if (result == null) {
+ result = hc;
+ }
+ return result.toString();
+ }
+
+ private void doForm(HttpServletRequest req, HttpServletResponse resp, String tags, boolean debug, boolean quiet)
+ throws IOException {
+ final PrintWriter pw = resp.getWriter();
+ final WebConsoleHelper c = new WebConsoleHelper(pw);
+ pw.print("<form method='get'>");
+ pw.println("<table class='content' cellpadding='0' cellspacing='0' width='100%'>");
+ c.titleHtml(TITLE, "To execute health check services, enter "
+ + " an optional list of tags, to select specific health checks, or no tags for all checks."
+ + " Prefix a tag with a minus sign (-) to omit checks having that tag.");
+
+ c.tr();
+ c.tdLabel("Health Check tags (comma-separated)");
+ c.tdContent();
+ pw.println("<input type='text' name='" + PARAM_TAGS + "' value='" + tags + "' class='input' size='80'>");
+ c.closeTd();
+ c.closeTr();
+
+ c.tr();
+ c.tdLabel("Show DEBUG logs");
+ c.tdContent();
+ pw.println("<input type='checkbox' name='" + PARAM_DEBUG + "' class='input' value='true'"
+ + (debug ? " checked=true " : "") + ">");
+ c.closeTd();
+ c.closeTr();
+
+ c.tr();
+ c.tdLabel("Show failed checks only");
+ c.tdContent();
+ pw.println("<input type='checkbox' name='" + PARAM_QUIET + "' class='input' value='true'"
+ + (quiet ? " checked=true " : "") + ">");
+ c.closeTd();
+ c.closeTr();
+
+ c.tr();
+ c.tdContent();
+ pw.println("<input type='submit' value='Execute selected health checks'/>");
+ c.closeTd();
+ c.closeTr();
+
+ pw.println("</table></form>");
+ }
+
+ private String getParam(HttpServletRequest req, String name, String defaultValue) {
+ String result = req.getParameter(name);
+ if(result == null) {
+ result = defaultValue;
+ }
+ return result;
+ }
+}
diff --git a/src/main/java/org/apache/sling/hc/webconsole/impl/WebConsoleHelper.java b/src/main/java/org/apache/sling/hc/webconsole/impl/WebConsoleHelper.java
new file mode 100644
index 0000000..beb1b34
--- /dev/null
+++ b/src/main/java/org/apache/sling/hc/webconsole/impl/WebConsoleHelper.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The SF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ */
+package org.apache.sling.hc.webconsole.impl;
+
+import java.io.PrintWriter;
+
+import org.apache.sling.api.request.ResponseUtil;
+
+/** Webconsole plugin to execute health check rules */
+class WebConsoleHelper {
+
+ final PrintWriter pw;
+
+ WebConsoleHelper(PrintWriter w) {
+ pw = w;
+ }
+
+ PrintWriter writer() {
+ return pw;
+ }
+
+ void tdContent() {
+ pw.print("<td class='content' colspan='2'>");
+ }
+
+ void closeTd() {
+ pw.print("</td>");
+ }
+
+ void closeTr() {
+ pw.println("</tr>");
+ }
+
+ void tdLabel(final String label) {
+ pw.println("<td class='content'>" + ResponseUtil.escapeXml(label) + "</td>");
+ }
+
+ void tr() {
+ pw.println("<tr class='content'>");
+ }
+
+ void titleHtml(String title, String description) {
+ tr();
+ pw.println("<th colspan='3' class='content container'>" + ResponseUtil.escapeXml(title) + "</th>");
+ closeTr();
+
+ if (description != null) {
+ tr();
+ pw.println("<td colspan='3' class='content'>" +ResponseUtil.escapeXml(description) + "</th>");
+ closeTr();
+ }
+ }
+}
diff --git a/src/main/resources/res/ui/healthcheck.css b/src/main/resources/res/ui/healthcheck.css
new file mode 100644
index 0000000..75b79cf
--- /dev/null
+++ b/src/main/resources/res/ui/healthcheck.css
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+.healthcheck .logDEBUG {
+ color:grey;
+}
+
+.healthcheck .logINFO {
+ color:blue;
+}
+
+.healthcheck .logWARN,
+.healthcheck .logCRITICAL,
+.healthcheck .logHEALTH_CHECK_ERROR
+{
+ color:red;
+}
+
+.healthcheck .logERROR {
+ color:red;
+ font-weight:bold;
+}
+
+.healthcheck .resultOktrue {
+ color:green;
+ font-weight:bold;
+}
+
+.healthcheck .resultOkfalse {
+ color:red;
+ font-weight:bold;
+}
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 37/44: SLING-4698 - Set
parent.relativePath to empty for all modules
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit 8a5fd03f758e0b9ca7d5a71fee289809291d7931
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu May 7 10:14:40 2015 +0000
SLING-4698 - Set parent.relativePath to empty for all modules
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1678154 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 0536f22..3df25db 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,7 +25,7 @@
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
<version>22</version>
- <relativePath>../../../../parent/pom.xml</relativePath>
+ <relativePath/>
</parent>
<groupId>org.apache.sling</groupId>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 28/44: Update to Sling
Parent POM 22 with baselining enabled
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit e743edf397181223d2086941846a5d6e6e940649
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Oct 1 06:57:44 2014 +0000
Update to Sling Parent POM 22 with baselining enabled
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1628622 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 6aeb2f6..f993aaf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>20</version>
+ <version>22</version>
<relativePath>../../../../parent/pom.xml</relativePath>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 34/44:
[maven-release-plugin] prepare for next development iteration
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit 4c3338e1f118c012376a7c1346934e6114aadc2a
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Feb 18 13:16:56 2015 +0000
[maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1660626 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index 472a972..edc66f4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,7 +13,7 @@
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.hc.webconsole</artifactId>
<packaging>bundle</packaging>
- <version>1.1.2</version>
+ <version>1.1.3-SNAPSHOT</version>
<name>Apache Sling Health Check Webconsole Plugin</name>
<inceptionYear>2013</inceptionYear>
@@ -27,9 +27,9 @@
</properties>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.hc.webconsole-1.1.2</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.hc.webconsole-1.1.2</developerConnection>
- <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.hc.webconsole-1.1.2</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/webconsole</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/webconsole</developerConnection>
+ <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/healthcheck/webconsole</url>
</scm>
<build>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 25/44: Update to parent pom
v19
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit 92c4fdc0cf6add82fb23a233243e8fdd56563f6c
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Mon Mar 31 14:39:20 2014 +0000
Update to parent pom v19
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1583337 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 21b78e0..6a1f5f0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>18</version>
+ <version>19</version>
<relativePath>../../../../parent/pom.xml</relativePath>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 11/44:
[maven-release-plugin] prepare for next development iteration
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit a2310598c9c09751b9f8eefa494028cb09c84756
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Thu Sep 26 15:01:28 2013 +0000
[maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1526543 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index f71f16e..07981e8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,7 +13,7 @@
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.hc.webconsole</artifactId>
<packaging>bundle</packaging>
- <version>1.0.4</version>
+ <version>1.0.5-SNAPSHOT</version>
<name>Apache Sling Health Check Webconsole Plugin</name>
<inceptionYear>2013</inceptionYear>
@@ -27,9 +27,9 @@
</properties>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.hc.webconsole-1.0.4</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.hc.webconsole-1.0.4</developerConnection>
- <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.hc.webconsole-1.0.4</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/webconsole</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/webconsole</developerConnection>
+ <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/healthcheck/webconsole</url>
</scm>
<build>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 20/44: SLING-3278 : Provide
a HealthCheckExecutor service. Change API to execute checks based on tags,
add service reference to HealthCheckMetadata
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit a063561998cb800780bad5811abcd6812f8c9883
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Fri Jan 10 14:44:31 2014 +0000
SLING-3278 : Provide a HealthCheckExecutor service. Change API to execute checks based on tags, add service reference to HealthCheckMetadata
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1557138 13f79535-47bb-0310-9956-ffa450edef68
---
.../impl/HealthCheckWebconsolePlugin.java | 55 +++++++---------------
1 file changed, 16 insertions(+), 39 deletions(-)
diff --git a/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java b/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java
index 48f48ee..e8dd07e 100644
--- a/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java
+++ b/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java
@@ -29,9 +29,7 @@ import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.apache.felix.scr.annotations.Activate;
import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Deactivate;
import org.apache.felix.scr.annotations.Properties;
import org.apache.felix.scr.annotations.Property;
import org.apache.felix.scr.annotations.Reference;
@@ -41,9 +39,6 @@ import org.apache.sling.hc.api.Result;
import org.apache.sling.hc.api.ResultLog;
import org.apache.sling.hc.api.execution.HealthCheckExecutionResult;
import org.apache.sling.hc.api.execution.HealthCheckExecutor;
-import org.apache.sling.hc.util.HealthCheckFilter;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
/** Webconsole plugin to execute health check services */
@Component
@@ -68,18 +63,6 @@ public class HealthCheckWebconsolePlugin extends HttpServlet {
@Reference
private HealthCheckExecutor healthCheckExecutor;
- private BundleContext bundleContext;
-
- @Activate
- protected void activate(final BundleContext bc) {
- this.bundleContext = bc;
- }
-
- @Deactivate
- protected void deactivate() {
- this.bundleContext = null;
- }
-
/** Serve static resource if applicable, and return true in that case */
private boolean getStaticResource(final HttpServletRequest req, final HttpServletResponse resp)
throws ServletException, IOException {
@@ -126,32 +109,26 @@ public class HealthCheckWebconsolePlugin extends HttpServlet {
// Execute health checks only if tags are specified (even if empty)
if (tags != null) {
- final HealthCheckFilter filter = new HealthCheckFilter(this.bundleContext);
- try {
- final ServiceReference[] refs = filter.getTaggedHealthCheckServiceReferences(tags.split(","));
- Collection<HealthCheckExecutionResult> results = healthCheckExecutor.execute(refs);
+ Collection<HealthCheckExecutionResult> results = healthCheckExecutor.execute(tags.split(","));
- pw.println("<table class='content healthcheck' cellpadding='0' cellspacing='0' width='100%'>");
- int total = 0;
- int failed = 0;
- for (final HealthCheckExecutionResult exR : results) {
-
- final Result r = exR.getHealthCheckResult();
- total++;
- if (!r.isOk()) {
- failed++;
- }
- if (!quiet || !r.isOk()) {
- renderResult(pw, exR, debug);
- }
+ pw.println("<table class='content healthcheck' cellpadding='0' cellspacing='0' width='100%'>");
+ int total = 0;
+ int failed = 0;
+ for (final HealthCheckExecutionResult exR : results) {
+ final Result r = exR.getHealthCheckResult();
+ total++;
+ if (!r.isOk()) {
+ failed++;
}
- final WebConsoleHelper c = new WebConsoleHelper(resp.getWriter());
- c.titleHtml("Summary", total + " HealthCheck executed, " + failed + " failures");
- pw.println("</table>");
- } finally {
- filter.dispose();
+ if (!quiet || !r.isOk()) {
+ renderResult(pw, exR, debug);
+ }
+
}
+ final WebConsoleHelper c = new WebConsoleHelper(resp.getWriter());
+ c.titleHtml("Summary", total + " HealthCheck executed, " + failed + " failures");
+ pw.println("</table>");
}
}
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 03/44: SLING-3127 - add scm
info
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit 7758b09462780bfd9b64e394fb26533b6f6ba253
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Thu Sep 26 13:31:20 2013 +0000
SLING-3127 - add scm info
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1526483 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/pom.xml b/pom.xml
index 1dd17c2..d8c2e85 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,6 +28,13 @@
<properties>
<sling.java.version>6</sling.java.version>
</properties>
+
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/webconsole</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/webconsole</developerConnection>
+ <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/healthcheck/webconsole</url>
+ </scm>
+
<build>
<plugins>
<plugin>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 22/44:
[maven-release-plugin] prepare release org.apache.sling.hc.webconsole-1.1.0
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit d16c4690ca23f2f83a12cb76d640e4c63cedc778
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Mon Jan 27 16:34:55 2014 +0000
[maven-release-plugin] prepare release org.apache.sling.hc.webconsole-1.1.0
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1561733 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index d81d86d..ccbc93a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,7 +13,7 @@
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.hc.webconsole</artifactId>
<packaging>bundle</packaging>
- <version>1.0.5-SNAPSHOT</version>
+ <version>1.1.0</version>
<name>Apache Sling Health Check Webconsole Plugin</name>
<inceptionYear>2013</inceptionYear>
@@ -27,9 +27,9 @@
</properties>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/webconsole</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/webconsole</developerConnection>
- <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/healthcheck/webconsole</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.hc.webconsole-1.1.0</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.hc.webconsole-1.1.0</developerConnection>
+ <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.hc.webconsole-1.1.0</url>
</scm>
<build>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 12/44: SLING-3127 - switch
to snapshots (we might switch back once hc.core is released)
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit 8d1615259e06285c50486a052751cbaee8981808
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Thu Sep 26 15:27:20 2013 +0000
SLING-3127 - switch to snapshots (we might switch back once hc.core is released)
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1526572 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 07981e8..6f5b3e8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -58,7 +58,7 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.hc.core</artifactId>
- <version>1.0.4</version>
+ <version>1.0.5-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 07/44:
[maven-release-plugin] prepare release org.apache.sling.hc.core-1.0.2
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit 8bca7d73017f04928aec6813cab015fd6618c3e7
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Thu Sep 26 14:41:41 2013 +0000
[maven-release-plugin] prepare release org.apache.sling.hc.core-1.0.2
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1526513 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/pom.xml b/pom.xml
index 60bf9f4..825f26a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,7 +13,7 @@
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.hc.webconsole</artifactId>
<packaging>bundle</packaging>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2</version>
<name>Apache Sling Health Check Webconsole Plugin</name>
<inceptionYear>2013</inceptionYear>
@@ -27,9 +27,9 @@
</properties>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/webconsole</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/webconsole</developerConnection>
- <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/healthcheck/webconsole</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.hc.core-1.0.2/bundles/extensions/healthcheck/webconsole</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.hc.core-1.0.2/bundles/extensions/healthcheck/webconsole</developerConnection>
+ <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.hc.core-1.0.2/bundles/extensions/healthcheck/webconsole</url>
</scm>
<build>
@@ -58,7 +58,7 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.hc.core</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2</version>
<scope>provided</scope>
</dependency>
<dependency>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 02/44: SLING-3127 - it's
Apache Sling ; -)
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit da38f728b29d4ed3f851746333df2b079534b6d3
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Thu Sep 26 13:22:04 2013 +0000
SLING-3127 - it's Apache Sling ;-)
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1526480 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 7c5f192..1dd17c2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -18,7 +18,7 @@
<packaging>bundle</packaging>
<version>0.0.2-SNAPSHOT</version>
- <name>Sling Health Check Webconsole Plugin</name>
+ <name>Apache Sling Health Check Webconsole Plugin</name>
<inceptionYear>2013</inceptionYear>
<description>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 35/44: Switch back to
snapshot
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit dad6c35e12eda8654422d8c6fcaa40a58209ba05
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Feb 18 13:25:40 2015 +0000
Switch back to snapshot
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1660630 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index edc66f4..252e10b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -58,7 +58,7 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.hc.core</artifactId>
- <version>1.2.0</version>
+ <version>1.2.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 09/44: SLING-3127 - prepare
for release
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit ebd361b2ee526810f519379c9b33a5f2508c68ae
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Thu Sep 26 15:00:26 2013 +0000
SLING-3127 - prepare for release
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1526540 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 3f4fa32..3942203 100644
--- a/pom.xml
+++ b/pom.xml
@@ -58,7 +58,7 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.hc.core</artifactId>
- <version>1.0.3-SNAPSHOT</version>
+ <version>1.0.4</version>
<scope>provided</scope>
</dependency>
<dependency>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 27/44: Back to snapshots,
until the released modules are available
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit 7c246a59d542b3e53b79f4fcb6c06e4de01d110d
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Mon Sep 1 16:25:57 2014 +0000
Back to snapshots, until the released modules are available
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1621837 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index caaf023..6aeb2f6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -58,7 +58,7 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.hc.core</artifactId>
- <version>1.1.1-SNAPSHOT</version>
+ <version>1.1.3-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 21/44: Prepare for release
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit 378abc34008089e0e8e614c8c41049d0b8d2b54c
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Mon Jan 27 16:32:23 2014 +0000
Prepare for release
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1561731 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 51007bd..d81d86d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -58,7 +58,7 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.hc.core</artifactId>
- <version>1.0.7-SNAPSHOT</version>
+ <version>1.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 42/44: Switch to parent pom
26
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit e1149c0e3cae8c1e964cdc682376edf0ec032607
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Sun Jan 3 14:07:46 2016 +0000
Switch to parent pom 26
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1722720 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index d6b3ba8..2fd38a0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>25</version>
+ <version>26</version>
<relativePath/>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 31/44: Correct typo in
description
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit 72ca35e83c2d48d0bde7330623f8c9dc384ed59c
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Feb 18 12:04:41 2015 +0000
Correct typo in description
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1660607 13f79535-47bb-0310-9956-ffa450edef68
---
.../apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java b/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java
index e2eb641..98f9231 100644
--- a/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java
+++ b/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java
@@ -49,7 +49,7 @@ import org.apache.sling.hc.api.execution.HealthCheckExecutor;
@Service(Servlet.class)
@SuppressWarnings("serial")
@Properties({
- @Property(name=org.osgi.framework.Constants.SERVICE_DESCRIPTION, value="Sling Health Check Web Console Plugin"),
+ @Property(name=org.osgi.framework.Constants.SERVICE_DESCRIPTION, value="Apache Sling Health Check Web Console Plugin"),
@Property(name="felix.webconsole.label", value=HealthCheckWebconsolePlugin.LABEL),
@Property(name="felix.webconsole.title", value=HealthCheckWebconsolePlugin.TITLE),
@Property(name="felix.webconsole.category", value=HealthCheckWebconsolePlugin.CATEGORY),
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 41/44: Update the main
reactor to parent 25
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit 2f910bc4a2f286fe2ea1b73576299a78a53828c4
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Mon Oct 5 10:03:45 2015 +0000
Update the main reactor to parent 25
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1706780 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 64519f2..d6b3ba8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>24</version>
+ <version>25</version>
<relativePath/>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 14/44: SLING-3278 : Provide
a HealthCheckExecutor service. Applied modified patch from Georg Henzler.
I've changed the methods names and signatures of the executor service and
did some implementation changes and code clean ups. This is not the final
version, the commit should rather help going forward
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit 3acbd014327c23ba4bd95e011fe258369ad475fe
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Mon Dec 23 16:01:55 2013 +0000
SLING-3278 : Provide a HealthCheckExecutor service. Applied modified patch from Georg Henzler. I've changed the methods names and signatures of the executor service and did some implementation changes and code clean ups. This is not the final version, the commit should rather help going forward
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1553133 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 6 +-
.../impl/HealthCheckWebconsolePlugin.java | 72 +++++++---------------
2 files changed, 26 insertions(+), 52 deletions(-)
diff --git a/pom.xml b/pom.xml
index 07981e8..51007bd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -58,7 +58,7 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.hc.core</artifactId>
- <version>1.0.4</version>
+ <version>1.0.7-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
@@ -71,5 +71,9 @@
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
</dependencies>
</project>
diff --git a/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java b/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java
index 0f0de37..bb12065 100644
--- a/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java
+++ b/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java
@@ -20,7 +20,7 @@ package org.apache.sling.hc.webconsole.impl;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
-import java.util.Arrays;
+import java.util.Collection;
import javax.servlet.Servlet;
import javax.servlet.ServletException;
@@ -28,27 +28,23 @@ import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.apache.felix.scr.annotations.Activate;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Properties;
import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.Service;
import org.apache.sling.api.request.ResponseUtil;
-import org.apache.sling.hc.api.HealthCheck;
+import org.apache.sling.hc.api.HealthCheckExecutor;
+import org.apache.sling.hc.api.HealthCheckResult;
import org.apache.sling.hc.api.Result;
import org.apache.sling.hc.api.ResultLog;
-import org.apache.sling.hc.util.HealthCheckFilter;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.component.ComponentContext;
/** Webconsole plugin to execute health check services */
-@Component(immediate=true)
+@Component
@Service(Servlet.class)
@SuppressWarnings("serial")
@Properties({
@Property(name=org.osgi.framework.Constants.SERVICE_DESCRIPTION, value="Sling Health Check Web Console Plugin"),
- @Property(name=org.osgi.framework.Constants.SERVICE_VENDOR, value="The Apache Software Foundation"),
@Property(name="felix.webconsole.label", value=HealthCheckWebconsolePlugin.LABEL),
@Property(name="felix.webconsole.title", value=HealthCheckWebconsolePlugin.TITLE),
@Property(name="felix.webconsole.category", value=HealthCheckWebconsolePlugin.CATEGORY),
@@ -63,12 +59,8 @@ public class HealthCheckWebconsolePlugin extends HttpServlet {
public static final String PARAM_DEBUG = "debug";
public static final String PARAM_QUIET = "quiet";
- private BundleContext bundleContext;
-
- @Activate
- protected void activate(ComponentContext ctx) {
- bundleContext = ctx.getBundleContext();
- }
+ @Reference
+ private HealthCheckExecutor healthCheckExecutor;
/** Serve static resource if applicable, and return true in that case */
private boolean getStaticResource(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
@@ -104,28 +96,22 @@ public class HealthCheckWebconsolePlugin extends HttpServlet {
// Execute health checks only if tags are specified (even if empty)
if(req.getParameter(PARAM_TAGS) != null) {
- final ServiceReference[] references = new HealthCheckFilter(bundleContext).getTaggedHealthCheckServiceReferences(tags.split(","));
+ Collection<HealthCheckResult> results = healthCheckExecutor.executeAllForTags(tags.split(","));
final PrintWriter pw = resp.getWriter();
pw.println("<table class='content healthcheck' cellpadding='0' cellspacing='0' width='100%'>");
int total = 0;
int failed = 0;
- for(final ServiceReference ref : references) {
- final HealthCheck hc = (HealthCheck) this.bundleContext.getService(ref);
- if ( hc != null ) {
- try {
- final Result r = hc.execute();
- total++;
- if (!r.isOk()) {
- failed++;
- }
- if (!quiet || !r.isOk()) {
- renderResult(resp, ref, hc, r, debug);
- }
- } finally {
- this.bundleContext.ungetService(ref);
- }
+ for (final HealthCheckResult r : results) {
+
+ total++;
+ if (!r.isOk()) {
+ failed++;
}
+ if (!quiet || !r.isOk()) {
+ renderResult(resp, r, debug);
+ }
+
}
final WebConsoleHelper c = new WebConsoleHelper(resp.getWriter());
c.titleHtml("Summary", total + " HealthCheck executed, " + failed + " failures");
@@ -133,21 +119,13 @@ public class HealthCheckWebconsolePlugin extends HttpServlet {
}
}
- private void renderResult(HttpServletResponse resp, final ServiceReference ref, HealthCheck hc, Result result, boolean debug) throws IOException {
+ private void renderResult(HttpServletResponse resp, HealthCheckResult result, boolean debug) throws IOException {
final WebConsoleHelper c = new WebConsoleHelper(resp.getWriter());
final StringBuilder status = new StringBuilder();
- final Object tags = ref.getProperty(HealthCheck.TAGS);
- final String tagString;
- if ( tags == null ) {
- tagString = "";
- } else if ( tags instanceof String[] ) {
- tagString = Arrays.toString((String[])tags);
- } else {
- tagString = tags.toString();
- }
- status.append("Tags: ").append(tagString);
- c.titleHtml(getName(ref, hc), null);
+
+ status.append("Tags: ").append(result.getHealthCheckTags());
+ c.titleHtml(result.getHealthCheckName(), null);
c.tr();
c.tdContent();
@@ -177,14 +155,6 @@ public class HealthCheckWebconsolePlugin extends HttpServlet {
c.closeTd();
}
- private String getName(final ServiceReference ref, HealthCheck hc) {
- Object result = ref.getProperty(HealthCheck.NAME);
- if (result == null) {
- result = hc;
- }
- return result.toString();
- }
-
private void doForm(HttpServletRequest req, HttpServletResponse resp, String tags, boolean debug, boolean quiet)
throws IOException {
final PrintWriter pw = resp.getWriter();
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 24/44: Switch to latest
snapshot until release is done
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit ba86fcf2882cc8c62eafb10a42c2fdba2118b808
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Mon Jan 27 16:36:48 2014 +0000
Switch to latest snapshot until release is done
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1561736 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 8bfd700..21b78e0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -58,7 +58,7 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.hc.core</artifactId>
- <version>1.1.0</version>
+ <version>1.1.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 08/44:
[maven-release-plugin] prepare for next development iteration
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit de462391ee5274d334c807072f4a9297adfd0926
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Thu Sep 26 14:42:46 2013 +0000
[maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1526515 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/pom.xml b/pom.xml
index 825f26a..3f4fa32 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,7 +13,7 @@
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.hc.webconsole</artifactId>
<packaging>bundle</packaging>
- <version>1.0.2</version>
+ <version>1.0.3-SNAPSHOT</version>
<name>Apache Sling Health Check Webconsole Plugin</name>
<inceptionYear>2013</inceptionYear>
@@ -27,9 +27,9 @@
</properties>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.hc.core-1.0.2/bundles/extensions/healthcheck/webconsole</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.hc.core-1.0.2/bundles/extensions/healthcheck/webconsole</developerConnection>
- <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.hc.core-1.0.2/bundles/extensions/healthcheck/webconsole</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/webconsole</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/webconsole</developerConnection>
+ <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/healthcheck/webconsole</url>
</scm>
<build>
@@ -58,7 +58,7 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.hc.core</artifactId>
- <version>1.0.2</version>
+ <version>1.0.3-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 32/44: Use released hc.core
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit 53719d95eb126b9c5ed15e239ef3c59732c13492
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Feb 18 13:14:16 2015 +0000
Use released hc.core
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1660623 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index f993aaf..820dfd4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -58,7 +58,7 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.hc.core</artifactId>
- <version>1.1.3-SNAPSHOT</version>
+ <version>1.2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 15/44: SLING-3278 : Provide
a HealthCheckExecutor service. Move executor into separate package,
reuse Result from HC
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit c85f2c9c00b3362d969700b18b2d69776d23e5bc
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Dec 31 10:35:13 2013 +0000
SLING-3278 : Provide a HealthCheckExecutor service. Move executor into separate package, reuse Result from HC
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1554396 13f79535-47bb-0310-9956-ffa450edef68
---
.../impl/HealthCheckWebconsolePlugin.java | 69 +++++++++++++++-------
1 file changed, 47 insertions(+), 22 deletions(-)
diff --git a/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java b/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java
index bb12065..c5f83bb 100644
--- a/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java
+++ b/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java
@@ -28,16 +28,21 @@ import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import org.apache.felix.scr.annotations.Activate;
import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Deactivate;
import org.apache.felix.scr.annotations.Properties;
import org.apache.felix.scr.annotations.Property;
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.Service;
import org.apache.sling.api.request.ResponseUtil;
-import org.apache.sling.hc.api.HealthCheckExecutor;
-import org.apache.sling.hc.api.HealthCheckResult;
import org.apache.sling.hc.api.Result;
import org.apache.sling.hc.api.ResultLog;
+import org.apache.sling.hc.api.execution.HealthCheckExecutionResult;
+import org.apache.sling.hc.api.execution.HealthCheckExecutor;
+import org.apache.sling.hc.util.HealthCheckFilter;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
/** Webconsole plugin to execute health check services */
@Component
@@ -62,6 +67,18 @@ public class HealthCheckWebconsolePlugin extends HttpServlet {
@Reference
private HealthCheckExecutor healthCheckExecutor;
+ private BundleContext bundleContext;
+
+ @Activate
+ protected void activate(final BundleContext bc) {
+ this.bundleContext = bc;
+ }
+
+ @Deactivate
+ protected void deactivate() {
+ this.bundleContext = null;
+ }
+
/** Serve static resource if applicable, and return true in that case */
private boolean getStaticResource(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
final String pathInfo = req.getPathInfo();
@@ -96,36 +113,44 @@ public class HealthCheckWebconsolePlugin extends HttpServlet {
// Execute health checks only if tags are specified (even if empty)
if(req.getParameter(PARAM_TAGS) != null) {
- Collection<HealthCheckResult> results = healthCheckExecutor.executeAllForTags(tags.split(","));
-
- final PrintWriter pw = resp.getWriter();
- pw.println("<table class='content healthcheck' cellpadding='0' cellspacing='0' width='100%'>");
- int total = 0;
- int failed = 0;
- for (final HealthCheckResult r : results) {
+ final HealthCheckFilter filter = new HealthCheckFilter(this.bundleContext);
+ try {
+ final ServiceReference[] refs = filter.getTaggedHealthCheckServiceReferences(tags.split(","));
+ Collection<HealthCheckExecutionResult> results = healthCheckExecutor.execute(refs);
+
+ final PrintWriter pw = resp.getWriter();
+ pw.println("<table class='content healthcheck' cellpadding='0' cellspacing='0' width='100%'>");
+ int total = 0;
+ int failed = 0;
+ for (final HealthCheckExecutionResult exR : results) {
+
+ final Result r = exR.getHealthCheckResult();
+ total++;
+ if (!r.isOk()) {
+ failed++;
+ }
+ if (!quiet || !r.isOk()) {
+ renderResult(resp, exR, debug);
+ }
- total++;
- if (!r.isOk()) {
- failed++;
}
- if (!quiet || !r.isOk()) {
- renderResult(resp, r, debug);
- }
-
+ final WebConsoleHelper c = new WebConsoleHelper(resp.getWriter());
+ c.titleHtml("Summary", total + " HealthCheck executed, " + failed + " failures");
+ pw.println("</table>");
+ } finally {
+ filter.dispose();
}
- final WebConsoleHelper c = new WebConsoleHelper(resp.getWriter());
- c.titleHtml("Summary", total + " HealthCheck executed, " + failed + " failures");
- pw.println("</table>");
}
}
- private void renderResult(HttpServletResponse resp, HealthCheckResult result, boolean debug) throws IOException {
+ private void renderResult(HttpServletResponse resp, HealthCheckExecutionResult exResult, boolean debug) throws IOException {
+ final Result result = exResult.getHealthCheckResult();
final WebConsoleHelper c = new WebConsoleHelper(resp.getWriter());
final StringBuilder status = new StringBuilder();
- status.append("Tags: ").append(result.getHealthCheckTags());
- c.titleHtml(result.getHealthCheckName(), null);
+ status.append("Tags: ").append(exResult.getHealthCheckTags());
+ c.titleHtml(exResult.getHealthCheckName(), null);
c.tr();
c.tdContent();
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 16/44: SLING-3278 : Provide
a HealthCheckExecutor service. Separate health check meta data into
separate class.
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit 6fcda76c838592f6a2ab5353aa691bedd0cc01fa
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Fri Jan 3 06:06:26 2014 +0000
SLING-3278 : Provide a HealthCheckExecutor service. Separate health check meta data into separate class.
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1555015 13f79535-47bb-0310-9956-ffa450edef68
---
.../apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java b/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java
index c5f83bb..19513ae 100644
--- a/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java
+++ b/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java
@@ -149,8 +149,8 @@ public class HealthCheckWebconsolePlugin extends HttpServlet {
final StringBuilder status = new StringBuilder();
- status.append("Tags: ").append(exResult.getHealthCheckTags());
- c.titleHtml(exResult.getHealthCheckName(), null);
+ status.append("Tags: ").append(exResult.getHealthCheckMetaData().getTags());
+ c.titleHtml(exResult.getHealthCheckMetaData().getTitle(), null);
c.tr();
c.tdContent();
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 36/44: Add missing licence
header
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit e9ba3c01742caa971b3a0fdffbcedbb507b66ffa
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Mon Apr 27 14:56:41 2015 +0000
Add missing licence header
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1676288 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/pom.xml b/pom.xml
index 252e10b..0536f22 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,4 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 33/44:
[maven-release-plugin] prepare release org.apache.sling.hc.webconsole-1.1.2
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit 68a8c72e0558314d9fe91c81a26c92b4abc0ab64
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Feb 18 13:14:36 2015 +0000
[maven-release-plugin] prepare release org.apache.sling.hc.webconsole-1.1.2
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1660624 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index 820dfd4..472a972 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,7 +13,7 @@
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.hc.webconsole</artifactId>
<packaging>bundle</packaging>
- <version>1.1.1-SNAPSHOT</version>
+ <version>1.1.2</version>
<name>Apache Sling Health Check Webconsole Plugin</name>
<inceptionYear>2013</inceptionYear>
@@ -27,9 +27,9 @@
</properties>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/webconsole</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/webconsole</developerConnection>
- <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/healthcheck/webconsole</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.hc.webconsole-1.1.2</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.hc.webconsole-1.1.2</developerConnection>
+ <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.hc.webconsole-1.1.2</url>
</scm>
<build>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 30/44: SLING-3501 - tweak
webconsole form label
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit eae61a2af1b5e1b057b8daeb6148460ccba83baf
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Mon Jan 5 16:29:16 2015 +0000
SLING-3501 - tweak webconsole form label
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1649576 13f79535-47bb-0310-9956-ffa450edef68
---
.../apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java b/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java
index b7885bd..e2eb641 100644
--- a/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java
+++ b/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java
@@ -228,7 +228,7 @@ public class HealthCheckWebconsolePlugin extends HttpServlet {
c.closeTr();
c.tr();
- c.tdLabel("Combine tags with logical 'or'");
+ c.tdLabel("Combine tags with logical 'OR' instead of the default 'AND'");
c.tdContent();
c.writer().print("<input type='checkbox' name='" + PARAM_COMBINE_TAGS_WITH_OR + "' class='input' value='true'");
if (combineTagsWithOr) {
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 44/44: SLING-7167 Adjust
READMEs
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit ad5b435dccab4b43a6cd9efc3ad6283cbfa36aa2
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Tue Oct 3 09:23:06 2017 +0000
SLING-7167 Adjust READMEs
add missing README
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1810699 13f79535-47bb-0310-9956-ffa450edef68
---
README.md | 3 +++
1 file changed, 3 insertions(+)
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..b3fe701
--- /dev/null
+++ b/README.md
@@ -0,0 +1,3 @@
+# Apache Sling Health Check Webconsole Plugin
+
+This module is part of the [Apache Sling](https://sling.apache.org) project.
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 18/44: SLING-3278 : Provide
a HealthCheckExecutor service. Clean up web console plugin code
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit b570a13170106d88698e1fdf1f1fdd1d7b125843
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Fri Jan 3 06:23:20 2014 +0000
SLING-3278 : Provide a HealthCheckExecutor service. Clean up web console plugin code
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1555017 13f79535-47bb-0310-9956-ffa450edef68
---
.../impl/HealthCheckWebconsolePlugin.java | 26 +++++++++++++++-------
1 file changed, 18 insertions(+), 8 deletions(-)
diff --git a/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java b/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java
index a541ab1..68be3b9 100644
--- a/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java
+++ b/src/main/java/org/apache/sling/hc/webconsole/impl/HealthCheckWebconsolePlugin.java
@@ -19,6 +19,7 @@ package org.apache.sling.hc.webconsole.impl;
import java.io.IOException;
import java.io.InputStream;
+import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Collection;
@@ -83,18 +84,27 @@ public class HealthCheckWebconsolePlugin extends HttpServlet {
private boolean getStaticResource(final HttpServletRequest req, final HttpServletResponse resp)
throws ServletException, IOException {
final String pathInfo = req.getPathInfo();
- if(pathInfo!= null && pathInfo.contains("res/ui")) {
+ if (pathInfo!= null && pathInfo.contains("res/ui")) {
final String prefix = "/" + LABEL;
final InputStream is = getClass().getResourceAsStream(pathInfo.substring(prefix.length()));
- if(is == null) {
+ if (is == null) {
resp.sendError(HttpServletResponse.SC_NOT_FOUND, pathInfo);
+ } else {
+ final OutputStream os = resp.getOutputStream();
+ try {
+ final byte [] buffer = new byte[16384];
+ int n=0;
+ while( (n = is.read(buffer, 0, buffer.length)) > 0) {
+ os.write(buffer, 0, n);
+ }
+ } finally {
+ try {
+ is.close();
+ } catch ( final IOException ignore ) {
+ // ignore
+ }
+ }
}
- final byte [] buffer = new byte[16384];
- int n=0;
- while( (n = is.read(buffer, 0, buffer.length)) > 0) {
- resp.getOutputStream().write(buffer, 0, n);
- }
- resp.getOutputStream().flush();
return true;
}
return false;
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-hc-webconsole] 13/44: SLING-3127 - switch
back to released hc.core bundle
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-webconsole.git
commit 02ce3dff8dd0c4ef6bba123b8f5299c45d9ce49b
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Tue Oct 1 08:33:59 2013 +0000
SLING-3127 - switch back to released hc.core bundle
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1527970 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 6f5b3e8..07981e8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -58,7 +58,7 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.hc.core</artifactId>
- <version>1.0.5-SNAPSHOT</version>
+ <version>1.0.4</version>
<scope>provided</scope>
</dependency>
<dependency>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.