Copied: karaf/webconsole/trunk/osgi/framework/src/main/java/org/apache/karaf/webconsole/osgi/framework/internal/FrameworkPage.java (from r1225156, karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/configuration/ConfigurationsPage.java) URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/framework/src/main/java/org/apache/karaf/webconsole/osgi/framework/internal/FrameworkPage.java?p2=karaf/webconsole/trunk/osgi/framework/src/main/java/org/apache/karaf/webconsole/osgi/framework/internal/FrameworkPage.java&p1=karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/configuration/ConfigurationsPage.java&r1=1225156&r2=1225157&rev=1225157&view=diff ============================================================================== --- karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/configuration/ConfigurationsPage.java (original) +++ karaf/webconsole/trunk/osgi/framework/src/main/java/org/apache/karaf/webconsole/osgi/framework/internal/FrameworkPage.java Wed Dec 28 10:39:46 2011 @@ -14,26 +14,28 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.karaf.webconsole.osgi.internal.configuration; +package org.apache.karaf.webconsole.osgi.framework.internal; -import org.apache.karaf.webconsole.osgi.internal.OsgiPage; -import org.apache.karaf.webconsole.osgi.internal.configuration.view.ConfigurationsDataTable; -import org.apache.wicket.markup.html.CSSPackageResource; -import org.ops4j.pax.wicket.api.PaxWicketBean; +import org.apache.karaf.webconsole.osgi.framework.OsgiPage; +import org.apache.karaf.webconsole.osgi.framework.SystemBundleModel; +import org.apache.wicket.authorization.strategies.role.annotations.AuthorizeInstantiation; +import org.apache.wicket.markup.html.basic.Label; +import org.apache.wicket.model.CompoundPropertyModel; import org.ops4j.pax.wicket.api.PaxWicketMountPoint; -import org.osgi.service.cm.ConfigurationAdmin; +import org.osgi.framework.Bundle; -@PaxWicketMountPoint(mountPoint = "/osgi/configuration") -public class ConfigurationsPage extends OsgiPage { - - @PaxWicketBean(name = "configurationAdmin") - private ConfigurationAdmin configurationAdmin; - - public ConfigurationsPage() { - add(CSSPackageResource.getHeaderContribution(ConfigurationsPage.class, "configurations.css")); +/** + * Initial page for OSGi module. + */ +@PaxWicketMountPoint(mountPoint = "/osgi/framework") +@AuthorizeInstantiation({"admin", "osgi-user", "osgi-developer"}) +public class FrameworkPage extends OsgiPage { - add(new ConfigurationsDataTable("configurations", new ConfigurationProvider(configurationAdmin), 20)); + public FrameworkPage() { + setDefaultModel(new CompoundPropertyModel<Bundle>(new SystemBundleModel(context))); + add(new Label("symbolicName")); + add(new Label("version")); } }
Copied: karaf/webconsole/trunk/osgi/framework/src/main/java/org/apache/karaf/webconsole/osgi/framework/internal/OsgiWidgetPanel.java (from r1225156, karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/widget/OsgiWidgetPanel.java) URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/framework/src/main/java/org/apache/karaf/webconsole/osgi/framework/internal/OsgiWidgetPanel.java?p2=karaf/webconsole/trunk/osgi/framework/src/main/java/org/apache/karaf/webconsole/osgi/framework/internal/OsgiWidgetPanel.java&p1=karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/widget/OsgiWidgetPanel.java&r1=1225156&r2=1225157&rev=1225157&view=diff ============================================================================== --- karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/widget/OsgiWidgetPanel.java (original) +++ karaf/webconsole/trunk/osgi/framework/src/main/java/org/apache/karaf/webconsole/osgi/framework/internal/OsgiWidgetPanel.java Wed Dec 28 10:39:46 2011 @@ -14,26 +14,26 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.karaf.webconsole.osgi.internal.widget; +package org.apache.karaf.webconsole.osgi.framework.internal; -import org.apache.karaf.webconsole.osgi.internal.OsgiPage; -import org.apache.karaf.webconsole.osgi.internal.bundle.BundlesPage; +import org.apache.karaf.webconsole.osgi.framework.SystemBundleModel; import org.apache.wicket.markup.html.basic.Label; -import org.apache.wicket.markup.html.link.BookmarkablePageLink; import org.apache.wicket.markup.html.panel.Panel; +import org.apache.wicket.model.CompoundPropertyModel; +import org.osgi.framework.Bundle; import org.osgi.framework.BundleContext; +/** + * Very basic osgi widget to display framework and it's version on dashboard. + */ public class OsgiWidgetPanel extends Panel { public OsgiWidgetPanel(String id, BundleContext context) { - super(id); + super(id, new CompoundPropertyModel<Bundle>(new SystemBundleModel(context))); - add(new Label("framework", context.getBundle(0).getSymbolicName())); - add(new Label("version", context.getBundle(0).getVersion().toString())); + add(new Label("symbolicName")); + add(new Label("version")); add(new Label("bundleCount", "" + context.getBundles().length)); - - add(new BookmarkablePageLink<OsgiPage>("osgiLink", BundlesPage.class).add(new Label("osgiLinkLabel", "Manage"))); - } } Copied: karaf/webconsole/trunk/osgi/framework/src/main/java/org/apache/karaf/webconsole/osgi/framework/internal/OsgiWidgetProvider.java (from r1225156, karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/widget/OsgiWidgetProvider.java) URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/framework/src/main/java/org/apache/karaf/webconsole/osgi/framework/internal/OsgiWidgetProvider.java?p2=karaf/webconsole/trunk/osgi/framework/src/main/java/org/apache/karaf/webconsole/osgi/framework/internal/OsgiWidgetProvider.java&p1=karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/widget/OsgiWidgetProvider.java&r1=1225156&r2=1225157&rev=1225157&view=diff ============================================================================== --- karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/widget/OsgiWidgetProvider.java (original) +++ karaf/webconsole/trunk/osgi/framework/src/main/java/org/apache/karaf/webconsole/osgi/framework/internal/OsgiWidgetProvider.java Wed Dec 28 10:39:46 2011 @@ -14,12 +14,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.karaf.webconsole.osgi.internal.widget; +package org.apache.karaf.webconsole.osgi.framework.internal; import org.apache.karaf.webconsole.core.widget.WidgetProvider; import org.apache.wicket.markup.html.panel.Panel; import org.osgi.framework.BundleContext; +/** + * Provider which creates instances of osgi widget. + */ public class OsgiWidgetProvider implements WidgetProvider { private final BundleContext context; Copied: karaf/webconsole/trunk/osgi/framework/src/main/java/org/apache/karaf/webconsole/osgi/framework/navigation/OsgiConsoleTabProvider.java (from r1225156, karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/navigation/OsgiConsoleTabProvider.java) URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/framework/src/main/java/org/apache/karaf/webconsole/osgi/framework/navigation/OsgiConsoleTabProvider.java?p2=karaf/webconsole/trunk/osgi/framework/src/main/java/org/apache/karaf/webconsole/osgi/framework/navigation/OsgiConsoleTabProvider.java&p1=karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/navigation/OsgiConsoleTabProvider.java&r1=1225156&r2=1225157&rev=1225157&view=diff ============================================================================== --- karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/navigation/OsgiConsoleTabProvider.java (original) +++ karaf/webconsole/trunk/osgi/framework/src/main/java/org/apache/karaf/webconsole/osgi/framework/navigation/OsgiConsoleTabProvider.java Wed Dec 28 10:39:46 2011 @@ -14,13 +14,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.karaf.webconsole.osgi.internal.navigation; +package org.apache.karaf.webconsole.osgi.framework.navigation; import java.util.Collections; import java.util.List; import org.apache.karaf.webconsole.core.navigation.ConsoleTabProvider; -import org.apache.karaf.webconsole.osgi.internal.bundle.BundlesPage; +import org.apache.karaf.webconsole.osgi.framework.internal.FrameworkPage; import org.apache.wicket.Page; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.link.BookmarkablePageLink; @@ -29,8 +29,8 @@ import org.apache.wicket.markup.html.lin public class OsgiConsoleTabProvider implements ConsoleTabProvider { public Link<Page> getModuleLink(String componentId, String labelId) { - Link<Page> link = new BookmarkablePageLink<Page>(componentId, BundlesPage.class); - link.add(new Label(labelId, "Bundles")); + Link<Page> link = new BookmarkablePageLink<Page>(componentId, FrameworkPage.class); + link.add(new Label(labelId, "OSGi")); return link; } Added: karaf/webconsole/trunk/osgi/framework/src/main/resources/OSGI-INF/blueprint/framework.xml URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/framework/src/main/resources/OSGI-INF/blueprint/framework.xml?rev=1225157&view=auto ============================================================================== --- karaf/webconsole/trunk/osgi/framework/src/main/resources/OSGI-INF/blueprint/framework.xml (added) +++ karaf/webconsole/trunk/osgi/framework/src/main/resources/OSGI-INF/blueprint/framework.xml Wed Dec 28 10:39:46 2011 @@ -0,0 +1,36 @@ +<?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. +--> +<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"> + + <service interface="org.apache.karaf.webconsole.core.navigation.ConsoleTabProvider"> + <bean class="org.apache.karaf.webconsole.core.navigation.ExtendableConsoleTabProvider"> + <argument> + <bean class="org.apache.karaf.webconsole.osgi.framework.navigation.OsgiConsoleTabProvider" /> + </argument> + <property name="extensions"> + <reference-list interface="org.apache.karaf.webconsole.core.navigation.NavigationProvider" + availability="optional" filter="(extends=osgi)" /> + </property> + </bean> + </service> + + <bean id="widgetProvider" class="org.apache.karaf.webconsole.osgi.framework.internal.OsgiWidgetProvider"> + <argument ref="blueprintBundleContext" /> + </bean> + +</blueprint> Copied: karaf/webconsole/trunk/osgi/framework/src/main/resources/org/apache/karaf/webconsole/osgi/framework/internal/FrameworkPage.html (from r1225156, karaf/webconsole/trunk/osgi/src/main/resources/org/apache/karaf/webconsole/osgi/internal/bundle/BundlesPage.html) URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/framework/src/main/resources/org/apache/karaf/webconsole/osgi/framework/internal/FrameworkPage.html?p2=karaf/webconsole/trunk/osgi/framework/src/main/resources/org/apache/karaf/webconsole/osgi/framework/internal/FrameworkPage.html&p1=karaf/webconsole/trunk/osgi/src/main/resources/org/apache/karaf/webconsole/osgi/internal/bundle/BundlesPage.html&r1=1225156&r2=1225157&rev=1225157&view=diff ============================================================================== --- karaf/webconsole/trunk/osgi/src/main/resources/org/apache/karaf/webconsole/osgi/internal/bundle/BundlesPage.html (original) +++ karaf/webconsole/trunk/osgi/framework/src/main/resources/org/apache/karaf/webconsole/osgi/framework/internal/FrameworkPage.html Wed Dec 28 10:39:46 2011 @@ -22,10 +22,12 @@ <body> <wicket:extend> - <h1>Bundles</h1> - - <table wicket:id="bundles" class="dataview" /> + <h1>OSGi framework</h1> + <p> + You run on <span wicket:id="symbolicName">org.eclipse.equinox</span> + in version <span wicket:id="version">3.6.4.20110412</span> + </p> </wicket:extend> </body> -</html> +</html> \ No newline at end of file Copied: karaf/webconsole/trunk/osgi/framework/src/main/resources/org/apache/karaf/webconsole/osgi/framework/internal/OsgiWidgetPanel.html (from r1225156, karaf/webconsole/trunk/osgi/src/main/resources/org/apache/karaf/webconsole/osgi/internal/widget/OsgiWidgetPanel.html) URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/framework/src/main/resources/org/apache/karaf/webconsole/osgi/framework/internal/OsgiWidgetPanel.html?p2=karaf/webconsole/trunk/osgi/framework/src/main/resources/org/apache/karaf/webconsole/osgi/framework/internal/OsgiWidgetPanel.html&p1=karaf/webconsole/trunk/osgi/src/main/resources/org/apache/karaf/webconsole/osgi/internal/widget/OsgiWidgetPanel.html&r1=1225156&r2=1225157&rev=1225157&view=diff ============================================================================== --- karaf/webconsole/trunk/osgi/src/main/resources/org/apache/karaf/webconsole/osgi/internal/widget/OsgiWidgetPanel.html (original) +++ karaf/webconsole/trunk/osgi/framework/src/main/resources/org/apache/karaf/webconsole/osgi/framework/internal/OsgiWidgetPanel.html Wed Dec 28 10:39:46 2011 @@ -26,16 +26,12 @@ <div class="grid_3 widget"> <h3>OSGi</h3> <p> - Running framework <span wicket:id="framework">framework</span> in version + Running framework <span wicket:id="symbolicName">framework</span> in version <span wicket:id="version">1.0</span>. </p> <p> You have <span wicket:id="bundleCount">130</span> bundles installed. - - <a href="#" wicket:id="osgiLink"> - <span wicket:id="osgiLinkLabel">Go to OSGi management</span> - </a> </p> </div> </wicket:panel> Copied: karaf/webconsole/trunk/osgi/log/pom.xml (from r1225156, karaf/webconsole/trunk/blueprint/pom.xml) URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/log/pom.xml?p2=karaf/webconsole/trunk/osgi/log/pom.xml&p1=karaf/webconsole/trunk/blueprint/pom.xml&r1=1225156&r2=1225157&rev=1225157&view=diff ============================================================================== --- karaf/webconsole/trunk/blueprint/pom.xml (original) +++ karaf/webconsole/trunk/osgi/log/pom.xml Wed Dec 28 10:39:46 2011 @@ -20,27 +20,24 @@ <modelVersion>4.0.0</modelVersion> <parent> - <groupId>org.apache.karaf</groupId> - <artifactId>webconsole</artifactId> + <groupId>org.apache.karaf.webconsole</groupId> + <artifactId>osgi</artifactId> <version>0.3.0-SNAPSHOT</version> </parent> - <groupId>org.apache.karaf.webconsole</groupId> - <artifactId>org.apache.karaf.webconsole.blueprint</artifactId> - <name>Apache Karaf :: WebConsole :: OSGi Blueprint</name> + <groupId>org.apache.karaf.webconsole.osgi</groupId> + <artifactId>org.apache.karaf.webconsole.osgi.log</artifactId> + <name>Apache Karaf :: WebConsole :: OSGi :: Log</name> <packaging>bundle</packaging> <dependencies> <dependency> - <groupId>org.apache.karaf.webconsole</groupId> - <artifactId>org.apache.karaf.webconsole.osgi</artifactId> - <version>${project.version}</version> + <groupId>org.apache.karaf.webconsole.osgi</groupId> + <artifactId>org.apache.karaf.webconsole.osgi.framework</artifactId> </dependency> - <dependency> - <groupId>org.apache.aries.blueprint</groupId> - <artifactId>org.apache.aries.blueprint</artifactId> - <version>0.3.1</version> + <groupId>org.osgi</groupId> + <artifactId>org.osgi.compendium</artifactId> </dependency> </dependencies> @@ -49,14 +46,12 @@ <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> - <version>2.3.5</version> - <extensions>true</extensions> <configuration> <instructions> <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName> <Import-Package> - !org.apache.karaf.webconsole.blueprint.internal*, - *, + !org.apache.karaf.webconsole.osgi.log*, + *,<!-- let bnd import direct dependencies --> <!-- transient dependencies --> org.ops4j.pax.wicket.api, org.ops4j.pax.wicket.util, @@ -64,6 +59,7 @@ </Import-Package> </instructions> </configuration> + <extensions>true</extensions> </plugin> </plugins> </build> Copied: karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/LogEntriesDataProvider.java (from r1225156, karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/log/LogEntriesDataProvider.java) URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/LogEntriesDataProvider.java?p2=karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/LogEntriesDataProvider.java&p1=karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/log/LogEntriesDataProvider.java&r1=1225156&r2=1225157&rev=1225157&view=diff ============================================================================== --- karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/log/LogEntriesDataProvider.java (original) +++ karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/LogEntriesDataProvider.java Wed Dec 28 10:39:46 2011 @@ -1,11 +1,11 @@ -package org.apache.karaf.webconsole.osgi.internal.log; +package org.apache.karaf.webconsole.osgi.log; import java.util.Enumeration; import java.util.Iterator; import java.util.LinkedList; import java.util.List; -import org.apache.karaf.webconsole.osgi.internal.log.search.Matcher; +import org.apache.karaf.webconsole.osgi.log.search.Matcher; import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider; import org.apache.wicket.model.IModel; import org.osgi.service.log.LogEntry; Copied: karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/LogEntryModel.java (from r1225156, karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/log/LogEntryModel.java) URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/LogEntryModel.java?p2=karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/LogEntryModel.java&p1=karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/log/LogEntryModel.java&r1=1225156&r2=1225157&rev=1225157&view=diff ============================================================================== --- karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/log/LogEntryModel.java (original) +++ karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/LogEntryModel.java Wed Dec 28 10:39:46 2011 @@ -1,4 +1,4 @@ -package org.apache.karaf.webconsole.osgi.internal.log; +package org.apache.karaf.webconsole.osgi.log; import java.util.Collections; import java.util.Enumeration; Added: karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/LogNavigationProvider.java URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/LogNavigationProvider.java?rev=1225157&view=auto ============================================================================== --- karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/LogNavigationProvider.java (added) +++ karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/LogNavigationProvider.java Wed Dec 28 10:39:46 2011 @@ -0,0 +1,20 @@ +package org.apache.karaf.webconsole.osgi.log; + +import static org.apache.karaf.webconsole.core.util.LinkUtils.createPageLink; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.karaf.webconsole.core.navigation.NavigationProvider; +import org.apache.wicket.Page; +import org.apache.wicket.markup.html.link.Link; + +public class LogNavigationProvider implements NavigationProvider { + + public List<Link<Page>> getItems(String componentId, String labelId) { + List<Link<Page>> links = new ArrayList<Link<Page>>(); + links.add(createPageLink(componentId, labelId, "Logs", LogsPage.class)); + return links; + } + +} Copied: karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/LogsPage.java (from r1225156, karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/log/LogsPage.java) URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/LogsPage.java?p2=karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/LogsPage.java&p1=karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/log/LogsPage.java&r1=1225156&r2=1225157&rev=1225157&view=diff ============================================================================== --- karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/log/LogsPage.java (original) +++ karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/LogsPage.java Wed Dec 28 10:39:46 2011 @@ -1,4 +1,4 @@ -package org.apache.karaf.webconsole.osgi.internal.log; +package org.apache.karaf.webconsole.osgi.log; import java.text.DateFormat; import java.util.Arrays; @@ -6,13 +6,13 @@ import java.util.Date; import java.util.List; import org.apache.karaf.webconsole.core.table.PropertyColumnExt; -import org.apache.karaf.webconsole.osgi.internal.OsgiPage; -import org.apache.karaf.webconsole.osgi.internal.log.search.BundleMatcher; -import org.apache.karaf.webconsole.osgi.internal.log.search.DateFromMatcher; -import org.apache.karaf.webconsole.osgi.internal.log.search.DateToMatcher; -import org.apache.karaf.webconsole.osgi.internal.log.search.Matcher; -import org.apache.karaf.webconsole.osgi.internal.log.search.MessageMatcher; -import org.apache.karaf.webconsole.osgi.internal.log.search.PriorityMatcher; +import org.apache.karaf.webconsole.osgi.framework.OsgiPage; +import org.apache.karaf.webconsole.osgi.log.search.BundleMatcher; +import org.apache.karaf.webconsole.osgi.log.search.DateFromMatcher; +import org.apache.karaf.webconsole.osgi.log.search.DateToMatcher; +import org.apache.karaf.webconsole.osgi.log.search.Matcher; +import org.apache.karaf.webconsole.osgi.log.search.MessageMatcher; +import org.apache.karaf.webconsole.osgi.log.search.PriorityMatcher; import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator; import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn; import org.apache.wicket.extensions.markup.html.repeater.data.table.DefaultDataTable; @@ -24,9 +24,11 @@ import org.apache.wicket.model.IModel; import org.apache.wicket.model.Model; import org.apache.wicket.model.PropertyModel; import org.ops4j.pax.wicket.api.PaxWicketBean; +import org.ops4j.pax.wicket.api.PaxWicketMountPoint; import org.osgi.service.log.LogEntry; import org.osgi.service.log.LogReaderService; +@PaxWicketMountPoint(mountPoint = "/osgi/log") public class LogsPage extends OsgiPage { @PaxWicketBean(name = "logReader") Copied: karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/Options.java (from r1225156, karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/log/Options.java) URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/Options.java?p2=karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/Options.java&p1=karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/log/Options.java&r1=1225156&r2=1225157&rev=1225157&view=diff ============================================================================== --- karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/log/Options.java (original) +++ karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/Options.java Wed Dec 28 10:39:46 2011 @@ -1,4 +1,4 @@ -package org.apache.karaf.webconsole.osgi.internal.log; +package org.apache.karaf.webconsole.osgi.log; import java.io.Serializable; Copied: karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/OptionsForm.java (from r1225156, karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/log/OptionsForm.java) URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/OptionsForm.java?p2=karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/OptionsForm.java&p1=karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/log/OptionsForm.java&r1=1225156&r2=1225157&rev=1225157&view=diff ============================================================================== --- karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/log/OptionsForm.java (original) +++ karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/OptionsForm.java Wed Dec 28 10:39:46 2011 @@ -1,4 +1,4 @@ -package org.apache.karaf.webconsole.osgi.internal.log; +package org.apache.karaf.webconsole.osgi.log; import java.util.Arrays; Copied: karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/Priority.java (from r1225156, karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/log/Priority.java) URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/Priority.java?p2=karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/Priority.java&p1=karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/log/Priority.java&r1=1225156&r2=1225157&rev=1225157&view=diff ============================================================================== --- karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/log/Priority.java (original) +++ karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/Priority.java Wed Dec 28 10:39:46 2011 @@ -1,4 +1,4 @@ -package org.apache.karaf.webconsole.osgi.internal.log; +package org.apache.karaf.webconsole.osgi.log; import static org.osgi.service.log.LogService.LOG_DEBUG; import static org.osgi.service.log.LogService.LOG_ERROR; Copied: karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/search/BundleMatcher.java (from r1225156, karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/log/search/BundleMatcher.java) URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/search/BundleMatcher.java?p2=karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/search/BundleMatcher.java&p1=karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/log/search/BundleMatcher.java&r1=1225156&r2=1225157&rev=1225157&view=diff ============================================================================== --- karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/log/search/BundleMatcher.java (original) +++ karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/search/BundleMatcher.java Wed Dec 28 10:39:46 2011 @@ -1,6 +1,6 @@ -package org.apache.karaf.webconsole.osgi.internal.log.search; +package org.apache.karaf.webconsole.osgi.log.search; -import org.apache.karaf.webconsole.osgi.internal.log.Options; +import org.apache.karaf.webconsole.osgi.log.Options; import org.osgi.service.log.LogEntry; public class BundleMatcher implements Matcher { Copied: karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/search/DateFromMatcher.java (from r1225156, karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/log/search/DateFromMatcher.java) URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/search/DateFromMatcher.java?p2=karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/search/DateFromMatcher.java&p1=karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/log/search/DateFromMatcher.java&r1=1225156&r2=1225157&rev=1225157&view=diff ============================================================================== --- karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/log/search/DateFromMatcher.java (original) +++ karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/search/DateFromMatcher.java Wed Dec 28 10:39:46 2011 @@ -1,6 +1,6 @@ -package org.apache.karaf.webconsole.osgi.internal.log.search; +package org.apache.karaf.webconsole.osgi.log.search; -import org.apache.karaf.webconsole.osgi.internal.log.Options; +import org.apache.karaf.webconsole.osgi.log.Options; import org.osgi.service.log.LogEntry; public class DateFromMatcher implements Matcher { Copied: karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/search/DateToMatcher.java (from r1225156, karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/log/search/DateToMatcher.java) URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/search/DateToMatcher.java?p2=karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/search/DateToMatcher.java&p1=karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/log/search/DateToMatcher.java&r1=1225156&r2=1225157&rev=1225157&view=diff ============================================================================== --- karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/log/search/DateToMatcher.java (original) +++ karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/search/DateToMatcher.java Wed Dec 28 10:39:46 2011 @@ -1,6 +1,6 @@ -package org.apache.karaf.webconsole.osgi.internal.log.search; +package org.apache.karaf.webconsole.osgi.log.search; -import org.apache.karaf.webconsole.osgi.internal.log.Options; +import org.apache.karaf.webconsole.osgi.log.Options; import org.osgi.service.log.LogEntry; public class DateToMatcher implements Matcher { Copied: karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/search/Matcher.java (from r1225156, karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/log/search/Matcher.java) URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/search/Matcher.java?p2=karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/search/Matcher.java&p1=karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/log/search/Matcher.java&r1=1225156&r2=1225157&rev=1225157&view=diff ============================================================================== --- karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/log/search/Matcher.java (original) +++ karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/search/Matcher.java Wed Dec 28 10:39:46 2011 @@ -1,6 +1,6 @@ -package org.apache.karaf.webconsole.osgi.internal.log.search; +package org.apache.karaf.webconsole.osgi.log.search; -import org.apache.karaf.webconsole.osgi.internal.log.Options; +import org.apache.karaf.webconsole.osgi.log.Options; import org.osgi.service.log.LogEntry; public interface Matcher { Copied: karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/search/MessageMatcher.java (from r1225156, karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/log/search/MessageMatcher.java) URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/search/MessageMatcher.java?p2=karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/search/MessageMatcher.java&p1=karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/log/search/MessageMatcher.java&r1=1225156&r2=1225157&rev=1225157&view=diff ============================================================================== --- karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/log/search/MessageMatcher.java (original) +++ karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/search/MessageMatcher.java Wed Dec 28 10:39:46 2011 @@ -1,6 +1,6 @@ -package org.apache.karaf.webconsole.osgi.internal.log.search; +package org.apache.karaf.webconsole.osgi.log.search; -import org.apache.karaf.webconsole.osgi.internal.log.Options; +import org.apache.karaf.webconsole.osgi.log.Options; import org.osgi.service.log.LogEntry; public class MessageMatcher implements Matcher { Copied: karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/search/PriorityMatcher.java (from r1225156, karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/log/search/PriorityMatcher.java) URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/search/PriorityMatcher.java?p2=karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/search/PriorityMatcher.java&p1=karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/log/search/PriorityMatcher.java&r1=1225156&r2=1225157&rev=1225157&view=diff ============================================================================== --- karaf/webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/log/search/PriorityMatcher.java (original) +++ karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/search/PriorityMatcher.java Wed Dec 28 10:39:46 2011 @@ -1,6 +1,6 @@ -package org.apache.karaf.webconsole.osgi.internal.log.search; +package org.apache.karaf.webconsole.osgi.log.search; -import org.apache.karaf.webconsole.osgi.internal.log.Options; +import org.apache.karaf.webconsole.osgi.log.Options; import org.osgi.service.log.LogEntry; public class PriorityMatcher implements Matcher { Copied: karaf/webconsole/trunk/osgi/log/src/main/resources/OSGI-INF/blueprint/log.xml (from r1225156, karaf/webconsole/trunk/osgi/src/main/resources/org/apache/karaf/webconsole/osgi/internal/configuration/ConfigurationsPage.html) URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/log/src/main/resources/OSGI-INF/blueprint/log.xml?p2=karaf/webconsole/trunk/osgi/log/src/main/resources/OSGI-INF/blueprint/log.xml&p1=karaf/webconsole/trunk/osgi/src/main/resources/org/apache/karaf/webconsole/osgi/internal/configuration/ConfigurationsPage.html&r1=1225156&r2=1225157&rev=1225157&view=diff ============================================================================== --- karaf/webconsole/trunk/osgi/src/main/resources/org/apache/karaf/webconsole/osgi/internal/configuration/ConfigurationsPage.html (original) +++ karaf/webconsole/trunk/osgi/log/src/main/resources/OSGI-INF/blueprint/log.xml Wed Dec 28 10:39:46 2011 @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="UTF-8"?> +<?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 @@ -15,18 +15,16 @@ See the License for the specific language governing permissions and limitations under the License. --> -<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd" > - <wicket:head> - <title>Karaf WebConsole</title> - </wicket:head> +<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"> - <body> + <service ref="logNavigationProvider" interface="org.apache.karaf.webconsole.core.navigation.NavigationProvider"> + <service-properties> + <entry key="extends" value="osgi" /> + </service-properties> + </service> - <wicket:extend> - <h1>Configurations</h1> + <bean id="logNavigationProvider" class="org.apache.karaf.webconsole.osgi.log.LogNavigationProvider" /> - <table wicket:id="configurations" class="dataview" /> + <reference id="logReader" interface="org.osgi.service.log.LogReaderService" /> - </wicket:extend> - </body> -</html> +</blueprint> Copied: karaf/webconsole/trunk/osgi/log/src/main/resources/org/apache/karaf/webconsole/osgi/log/LogsPage.html (from r1225156, karaf/webconsole/trunk/osgi/src/main/resources/org/apache/karaf/webconsole/osgi/internal/log/LogsPage.html) URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/log/src/main/resources/org/apache/karaf/webconsole/osgi/log/LogsPage.html?p2=karaf/webconsole/trunk/osgi/log/src/main/resources/org/apache/karaf/webconsole/osgi/log/LogsPage.html&p1=karaf/webconsole/trunk/osgi/src/main/resources/org/apache/karaf/webconsole/osgi/internal/log/LogsPage.html&r1=1225156&r2=1225157&rev=1225157&view=diff ============================================================================== (empty) Modified: karaf/webconsole/trunk/osgi/pom.xml URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/pom.xml?rev=1225157&r1=1225156&r2=1225157&view=diff ============================================================================== --- karaf/webconsole/trunk/osgi/pom.xml (original) +++ karaf/webconsole/trunk/osgi/pom.xml Wed Dec 28 10:39:46 2011 @@ -26,48 +26,27 @@ </parent> <groupId>org.apache.karaf.webconsole</groupId> - <artifactId>org.apache.karaf.webconsole.osgi</artifactId> - <name>Apache Karaf :: WebConsole :: OSGi Bundle Presentation</name> - <packaging>bundle</packaging> + <artifactId>osgi</artifactId> + <name>Apache Karaf :: WebConsole :: OSGi</name> + <packaging>pom</packaging> - <dependencies> - <dependency> - <groupId>org.apache.karaf.webconsole</groupId> - <artifactId>org.apache.karaf.webconsole.core</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.osgi</groupId> - <artifactId>org.osgi.compendium</artifactId> - <version>4.2.0</version> - </dependency> - </dependencies> + <modules> + <module>bundle</module> + <module>log</module> + <module>event</module> + <module>config</module> + <module>framework</module> + <module>blueprint</module> + </modules> + + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.apache.karaf.webconsole.osgi</groupId> + <artifactId>org.apache.karaf.webconsole.osgi.framework</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> + </dependencyManagement> - <build> - <plugins> - <plugin> - <groupId>org.apache.felix</groupId> - <artifactId>maven-bundle-plugin</artifactId> - <version>2.3.5</version> - <extensions>true</extensions> - <configuration> - <instructions> - <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName> - <Import-Package> - !org.apache.karaf.webconsole.osgi*, - *,<!-- let bnd import direct dependencies --> - <!-- transient dependencies --> - org.ops4j.pax.wicket.api, - org.ops4j.pax.wicket.util, - org.ops4j.pax.wicket.util.proxy - </Import-Package> - <Export-Package> - org.apache.karaf.webconsole.osgi.bundle, - org.apache.karaf.webconsole.osgi.bundle.view - </Export-Package> - </instructions> - </configuration> - </plugin> - </plugins> - </build> </project>