diff --git a/webinterface/pom.xml b/webinterface/pom.xml
index 9de00c6..56d89f7 100644
--- a/webinterface/pom.xml
+++ b/webinterface/pom.xml
@@ -19,7 +19,7 @@
asys
webinterface
- 0.7-SNAPSHOT
+ 0.8-SNAPSHOT
bundle
diff --git a/webinterface/src/main/java/asys/webinterface/AjaxHandler.java b/webinterface/src/main/java/asys/webinterface/AjaxHandler.java
index f81033b..f9b0a65 100644
--- a/webinterface/src/main/java/asys/webinterface/AjaxHandler.java
+++ b/webinterface/src/main/java/asys/webinterface/AjaxHandler.java
@@ -21,9 +21,11 @@ import java.util.Map;
public class AjaxHandler implements HttpHandler {
private static final Charset defaultCharset = Charset.forName("UTF-8");
private BundleContext context;
+ private int selfId;
public AjaxHandler(BundleContext context) {
this.context = context;
+ selfId = (int) context.getBundle().getBundleId();
}
@Override
@@ -72,6 +74,9 @@ public class AjaxHandler implements HttpHandler {
JsonArray jsonArray = new JsonArray();
for (Bundle bundle : context.getBundle(0).getBundleContext().getBundles()) {
+ if (bundle.getBundleId() == 0 || bundle.getBundleId() == selfId) {
+ continue;
+ }
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("id", bundle.getBundleId());
jsonObject.addProperty("state", bundle.getState());
@@ -88,7 +93,7 @@ public class AjaxHandler implements HttpHandler {
private JsonObject bundleInfo(Bundle bundle) {
JsonObject jsonObject = new JsonObject();
- if (bundle != null) {
+ if (bundle != null && bundle.getBundleId() != 0 && bundle.getBundleId() != selfId) {
jsonObject.addProperty("id", bundle.getBundleId());
jsonObject.addProperty("state", bundle.getState());
jsonObject.addProperty("name", bundle.getHeaders().get("Bundle-Name"));