You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by gg...@apache.org on 2022/03/30 10:56:26 UTC
[karaf] 02/03: [KARAF-7392] Fix some minor details in Webconsole plugin after Pax Web 8 upgrade
This is an automated email from the ASF dual-hosted git repository.
ggrzybek pushed a commit to branch KARAF-7392
in repository https://gitbox.apache.org/repos/asf/karaf.git
commit bd5a5838b8790605cbc9fe66e2d2fa2ec79fd8cf
Author: Grzegorz Grzybek <gr...@gmail.com>
AuthorDate: Fri Feb 11 12:31:29 2022 +0100
[KARAF-7392] Fix some minor details in Webconsole plugin after Pax Web 8 upgrade
---
.../java/org/apache/karaf/webconsole/http/HttpPlugin.java | 12 +++++++-----
webconsole/http/src/main/resources/res/ui/http-contexts.js | 6 +++---
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/webconsole/http/src/main/java/org/apache/karaf/webconsole/http/HttpPlugin.java b/webconsole/http/src/main/java/org/apache/karaf/webconsole/http/HttpPlugin.java
index 7373447..7156302 100644
--- a/webconsole/http/src/main/java/org/apache/karaf/webconsole/http/HttpPlugin.java
+++ b/webconsole/http/src/main/java/org/apache/karaf/webconsole/http/HttpPlugin.java
@@ -165,7 +165,7 @@ public class HttpPlugin extends AbstractWebConsolePlugin {
jw.value(servlet.getServlet());
jw.key("servletName");
jw.value(servlet.getServletName());
- jw.key("state");
+ jw.key("type");
jw.value(servlet.getType());
jw.key("urls");
jw.array();
@@ -189,7 +189,7 @@ public class HttpPlugin extends AbstractWebConsolePlugin {
jw.object();
jw.key("id");
jw.value(webDetail.getBundleId());
- jw.key("bundlestate");
+ jw.key("bundleState");
jw.value(webDetail.getState());
jw.key("contextpath");
jw.value(webDetail.getContextPath());
@@ -249,7 +249,9 @@ public class HttpPlugin extends AbstractWebConsolePlugin {
ReportWebContainerView view = webContainer.adapt(ReportWebContainerView.class);
for (WebApplicationInfo info : view.listWebApplications()) {
-
+ if (!info.isWab()) {
+ continue;
+ }
WebDetail webDetail = new WebDetail();
webDetail.setBundleId(info.getBundle().getBundleId());
webDetail.setContextPath(info.getContextPath().trim());
@@ -289,10 +291,10 @@ public class HttpPlugin extends AbstractWebConsolePlugin {
stateSummary.append(", ");
}
first = false;
- stateSummary.append(state.getValue()).append(" ").append(state.getKey());
+ stateSummary.append(state.getValue()).append(" from ").append(state.getKey());
}
- return "Http contexts: " + stateSummary;
+ return "Servlets: " + stateSummary;
}
public void setWebContainer(WebContainer webContainer) {
diff --git a/webconsole/http/src/main/resources/res/ui/http-contexts.js b/webconsole/http/src/main/resources/res/ui/http-contexts.js
index 47307f9..71d505c 100644
--- a/webconsole/http/src/main/resources/res/ui/http-contexts.js
+++ b/webconsole/http/src/main/resources/res/ui/http-contexts.js
@@ -112,13 +112,13 @@ function renderContextData( /* Element */ parent, /* Object */ context ) {
for ( var idx in context.urls ) {
urlBox.appendChild( link( trimUrl(context.urls[idx]), context.urls[idx] ) );
}
+ parent.appendChild( urlBox );
var contextBox = td( null, null );
for ( var idx in context.contexts ) {
- urlBox.appendChild( text( context.contexts[idx] ) );
+ contextBox.appendChild( text( context.contexts[idx] ) );
}
-
- parent.appendChild( urlBox );
+ parent.appendChild( contextBox );
}
function renderWebCtxtData( /* Element */ parent, /* Object */ webCtxt ) {