#1607 - Add css support.
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@818508 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole-plugins/event/src/main/java/org/apache/felix/webconsole/plugins/event/internal/Activator.java b/webconsole-plugins/event/src/main/java/org/apache/felix/webconsole/plugins/event/internal/Activator.java
index bd6a3e0..cf34ce2 100644
--- a/webconsole-plugins/event/src/main/java/org/apache/felix/webconsole/plugins/event/internal/Activator.java
+++ b/webconsole-plugins/event/src/main/java/org/apache/felix/webconsole/plugins/event/internal/Activator.java
@@ -60,6 +60,7 @@
props.put( Constants.SERVICE_VENDOR, "The Apache Software Foundation" );
props.put( "felix.webconsole.label", "events");
props.put( "felix.webconsole.title", "Events");
+ props.put( "felix.webconsole.css", "/events/res/ui/events.css");
this.pluginRegistration = context.registerService(Servlet.class.getName(),
plugin,
props);
diff --git a/webconsole-plugins/event/src/main/java/org/apache/felix/webconsole/plugins/event/internal/PluginServlet.java b/webconsole-plugins/event/src/main/java/org/apache/felix/webconsole/plugins/event/internal/PluginServlet.java
index 422afab..4779559 100644
--- a/webconsole-plugins/event/src/main/java/org/apache/felix/webconsole/plugins/event/internal/PluginServlet.java
+++ b/webconsole-plugins/event/src/main/java/org/apache/felix/webconsole/plugins/event/internal/PluginServlet.java
@@ -180,9 +180,9 @@
public URL getResource(String path)
{
- if ( "/events/res/ui/events.js".equals(path) )
+ if ( path.startsWith("/events/res/ui/") )
{
- return this.getClass().getResource("/res/ui/events.js");
+ return this.getClass().getResource(path.substring(7));
}
return null;
}
diff --git a/webconsole-plugins/event/src/main/resources/res/ui/events.css b/webconsole-plugins/event/src/main/resources/res/ui/events.css
new file mode 100644
index 0000000..ae0f3e8
--- /dev/null
+++ b/webconsole-plugins/event/src/main/resources/res/ui/events.css
@@ -0,0 +1,28 @@
+/*
+ * 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.
+ */
+.eventservice {
+ background-color: #ADFF2F;
+}
+.eventbundle {
+ background-color: #FFCACD;
+}
+.eventframework {
+ background-color: #DCDCDC;
+}
+.eventconfig {
+ background-color: #FFD700;
+}
\ No newline at end of file