Knopflerfish HTTP/HTML OSGi graphical console

HTTP console on pocketPC 2003
Image 1: HTTP console on pocketPC 2003

The Knopflerfish HTTP/HTML OSGi console is a small servlet that can be run on any OSGi platform with an installed HTTP server.

When started, the servlet registers at /servlet/console and allows access to the standard framework functions as bundle installation (both from URLs and using browser file upload), start, stop, update and uninstall. Additionally, detail info on a bundle such as state, manifest and services can be displayed.

Optionally, the HTTP console can request a login/pwd before enabling access. See configuration for details.

The HTTP console has been tested on Knopflerfish, Eclipse 3.0 and Oscar. It also runs well on Pocket PC (tested using KF on the IBM J9 VM).

The main screen lists all installed bundles. One or more bundles can be selected by marking the checkbox on the left. After selecting bundles, the operations available as toolbar icons can be performed.

A pre-compiled bundle jar can be found at http://www.knopflerfish.org/repo/jars/httpconsole/httpconsole-1.0.0.jar, as well in the KF bundle repository

Source is available via KF subversion


Toolbar
Open a local file
Image 2: Result after starting a bundle

Image 3: Open a local file

The toolbar display a set of command icons. When an icon is selected, the command will be performed. Any command result or errors will be displayed to the right of the bundle list.

Reload view Reload page
Install bundle from file Ask for a local bundle file, upload the file and install the bundle
Install bundle from URL Ask for a bundle URL and install this bundle
Start selected bundles Start selected bundles
Stop selected bundles Stop selected bundles
Update selected bundles Update selected bundles
Uninstall selected bundles Uninstall selected bundles
Show info for selected bundles Info about selected bundles. If no bundle is selected, show framework info
Show help Show help page


Bundle icons

Each bundle is displayed using an icon, the bundle's name and the bundle description. If a bundle's icon is clicked, the bundle is selected, and the bundle info page is displayed.

Bundle with activator
Started bundle with activator
Bundle without activator
Started bundle without activator

Configuration
Login screen
Image 4: Login screen

The HTTP console can be configured using system properties:

org.knopflerfish.httpconsole.alias
Alias for servlet registration. If set to '/', the http root will used for the console
Default is /servlet/console.
org.knopflerfish.httpconsole.filter
Filter string for matching HttpServices.
This can be used to only set the console at some
registered HttpServices.
Default is (objectclass=org.osgi.service.http.HttpService),
which will match any http service.
org.knopflerfish.httpconsole.requirelogin
If true, require login, using name and password.
Default is false
org.knopflerfish.httpconsole.user
User name required for login.
Default is admin
org.knopflerfish.httpconsole.pwd
User password required for login.
Default is admin
org.knopflerfish.httpconsole.expirationtime
Expiration time for login sessions, in seconds. After this time, the user will be logged out.
Default is 600 (10 minutes)


© 2004 Knopflerfish. Icons used with permission from the Noia icon collection