diff --git a/webconsole-plugins/ds/LICENSE b/webconsole-plugins/ds/LICENSE
new file mode 100644
index 0000000..75b5248
--- /dev/null
+++ b/webconsole-plugins/ds/LICENSE
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed 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.
diff --git a/webconsole-plugins/ds/NOTICE b/webconsole-plugins/ds/NOTICE
new file mode 100644
index 0000000..3a3923a
--- /dev/null
+++ b/webconsole-plugins/ds/NOTICE
@@ -0,0 +1,21 @@
+Apache Felix OSGi Web Console Event Plugin
+Copyright 2007-2010 The Apache Software Foundation
+
+
+I. Included Software
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+Licensed under the Apache License 2.0.
+
+
+II. Used Software
+
+This product uses software developed at
+The OSGi Alliance (http://www.osgi.org/).
+Copyright (c) OSGi Alliance (2000, 2009).
+Licensed under the Apache License 2.0.
+
+
+III. License Summary
+- Apache License 2.0
diff --git a/webconsole-plugins/ds/pom.xml b/webconsole-plugins/ds/pom.xml
new file mode 100644
index 0000000..f407162
--- /dev/null
+++ b/webconsole-plugins/ds/pom.xml
@@ -0,0 +1,114 @@
+<!-- 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. -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>org.apache.felix</groupId>
+		<artifactId>felix-parent</artifactId>
+		<version>1.2.0</version>
+		<relativePath>../../../pom/pom.xml</relativePath>
+	</parent>
+
+	<artifactId>org.apache.felix.webconsole.plugins.ds</artifactId>
+	<packaging>bundle</packaging>
+	<version>1.0.0-SNAPSHOT</version>
+
+	<name>Apache Felix Web Console Service Component Runtime/Declarative Services Plugin</name>
+	<description>
+        This is a plugin for the Apache Felix OSGi web console for displaying Service Components/Declarative Services.
+    </description>
+
+	<scm>
+		<connection>scm:svn:http://svn.apache.org/repos/asf/felix/trunk/webconsole-plugins/ds</connection>
+		<developerConnection>scm:svn:https://svn.apache.org/repos/asf/felix/trunk/webconsole-plugins/ds</developerConnection>
+		<url>http://svn.apache.org/viewvc/felix/trunk/webconsole-plugins/ds</url>
+	</scm>
+
+	<build>
+		<plugins>
+			<!-- translate UTF-8 encoded properties files to ISO-8859-1 -->
+			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>native2ascii-maven-plugin</artifactId>
+				<version>1.0-alpha-1</version>
+				<executions>
+					<execution>
+						<goals>
+							<goal>native2ascii</goal>
+						</goals>
+						<configuration>
+							<encoding>UTF-8</encoding>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin</artifactId>
+				<version>2.0.1</version>
+				<extensions>true</extensions>
+				<configuration>
+					<instructions>
+						<Bundle-SymbolicName>
+							${artifactId}
+                        </Bundle-SymbolicName>
+						<Bundle-Activator>
+							org.apache.felix.webconsole.plugins.ds.internal.Activator
+                        </Bundle-Activator>
+					</instructions>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+
+	<dependencies>
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>servlet-api</artifactId>
+			<version>2.4</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.osgi</groupId>
+			<artifactId>org.osgi.core</artifactId>
+			<version>4.0.0</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.osgi</groupId>
+			<artifactId>org.osgi.compendium</artifactId>
+			<version>4.1.0</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.felix</groupId>
+			<artifactId>org.apache.felix.webconsole</artifactId>
+			<version>3.1.0</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.json</groupId>
+			<artifactId>json</artifactId>
+			<version>20070829</version>
+			<scope>compile</scope>
+			<optional>true</optional>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.felix</groupId>
+			<artifactId>org.apache.felix.scr</artifactId>
+			<version>1.6.0</version>
+			<scope>provided</scope>
+		</dependency>
+	</dependencies>
+</project>
diff --git a/webconsole-plugins/ds/src/main/java/org/apache/felix/webconsole/plugins/ds/internal/Activator.java b/webconsole-plugins/ds/src/main/java/org/apache/felix/webconsole/plugins/ds/internal/Activator.java
new file mode 100644
index 0000000..ae665c9
--- /dev/null
+++ b/webconsole-plugins/ds/src/main/java/org/apache/felix/webconsole/plugins/ds/internal/Activator.java
@@ -0,0 +1,110 @@
+/*
+ * 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.
+ */
+package org.apache.felix.webconsole.plugins.ds.internal;
+
+import org.apache.felix.webconsole.ConfigurationPrinter;
+import org.apache.felix.webconsole.SimpleWebConsolePlugin;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.framework.ServiceRegistration;
+import org.osgi.util.tracker.ServiceTracker;
+import org.osgi.util.tracker.ServiceTrackerCustomizer;
+
+/**
+ * Activator is the main starting class.
+ */
+public class Activator implements BundleActivator, ServiceTrackerCustomizer
+{
+
+    private ServiceTracker tracker;
+    private BundleContext context;
+
+    private SimpleWebConsolePlugin plugin;
+    private ServiceRegistration printerRegistration;
+
+    /**
+     * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+     */
+    public final void start(BundleContext context) throws Exception
+    {
+        this.context = context;
+        this.tracker = new ServiceTracker(context, WebConsolePlugin.SCR_SERVICE, this);
+        this.tracker.open();
+    }
+
+    /**
+     * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+     */
+    public final void stop(BundleContext context) throws Exception
+    {
+        if (tracker != null)
+        {
+            tracker.close();
+            tracker = null;
+        }
+    }
+
+    // - begin tracker
+    /**
+     * @see org.osgi.util.tracker.ServiceTrackerCustomizer#modifiedService(org.osgi.framework.ServiceReference,
+     *      java.lang.Object)
+     */
+    public final void modifiedService(ServiceReference reference, Object service)
+    {/* unused */
+    }
+
+    /**
+     * @see org.osgi.util.tracker.ServiceTrackerCustomizer#addingService(org.osgi.framework.ServiceReference)
+     */
+    public final Object addingService(ServiceReference reference)
+    {
+        SimpleWebConsolePlugin plugin = this.plugin;
+        if (plugin == null)
+        {
+            this.plugin = plugin = new WebConsolePlugin().register(context);
+            printerRegistration = context.registerService(ConfigurationPrinter.SERVICE,
+                new ComponentConfigurationPrinter(context.getService(reference)), null);
+        }
+
+        return context.getService(reference);
+    }
+
+    /**
+     * @see org.osgi.util.tracker.ServiceTrackerCustomizer#removedService(org.osgi.framework.ServiceReference,
+     *      java.lang.Object)
+     */
+    public final void removedService(ServiceReference reference, Object service)
+    {
+        SimpleWebConsolePlugin plugin = this.plugin;
+
+        if (tracker.getTrackingCount() == 0 && plugin != null)
+        {
+            // remove service
+            plugin.unregister();
+            this.plugin = null;
+            // unregister configuration printer too
+            ServiceRegistration reg = printerRegistration;
+            if (reg != null)
+            {
+                reg.unregister();
+                printerRegistration = null;
+            }
+        }
+
+    }
+}
diff --git a/webconsole-plugins/ds/src/main/java/org/apache/felix/webconsole/plugins/ds/internal/ComponentConfigurationPrinter.java b/webconsole-plugins/ds/src/main/java/org/apache/felix/webconsole/plugins/ds/internal/ComponentConfigurationPrinter.java
new file mode 100644
index 0000000..8c85813
--- /dev/null
+++ b/webconsole-plugins/ds/src/main/java/org/apache/felix/webconsole/plugins/ds/internal/ComponentConfigurationPrinter.java
@@ -0,0 +1,245 @@
+/*
+ * 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.
+ */
+package org.apache.felix.webconsole.plugins.ds.internal;
+
+import java.io.PrintWriter;
+import java.util.Arrays;
+import java.util.Dictionary;
+import java.util.Iterator;
+import java.util.TreeMap;
+import java.util.TreeSet;
+
+import org.apache.felix.scr.Component;
+import org.apache.felix.scr.Reference;
+import org.apache.felix.scr.ScrService;
+import org.apache.felix.webconsole.ConfigurationPrinter;
+import org.apache.felix.webconsole.WebConsoleUtil;
+import org.osgi.framework.Constants;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.component.ComponentConstants;
+
+/**
+ * ComponentConfigurationPrinter prints the available SCR services. 
+ */
+class ComponentConfigurationPrinter implements ConfigurationPrinter
+{
+
+    private final ScrService scrService;
+
+    ComponentConfigurationPrinter(Object scrService)
+    {
+        this.scrService = (ScrService)scrService;
+    }
+
+    /**
+     * @see org.apache.felix.webconsole.ConfigurationPrinter#getTitle()
+     */
+    public String getTitle()
+    {
+        return "Declarative Services Components";
+    }
+
+    /**
+     * @see org.apache.felix.webconsole.ConfigurationPrinter#printConfiguration(java.io.PrintWriter)
+     */
+    public void printConfiguration(PrintWriter pw)
+    {
+        printComponents(pw, scrService.getComponents());
+    }
+
+    private static final void printComponents(final PrintWriter pw,
+        final Component[] components)
+    {
+        if (components == null || components.length == 0)
+        {
+            pw.println("  No Components Registered");
+        }
+        else
+        {
+            // order components by id
+            TreeMap componentMap = new TreeMap();
+            for (int i = 0; i < components.length; i++)
+            {
+                Component component = components[i];
+                componentMap.put(new Long(component.getId()), component);
+            }
+
+            // render components
+            for (Iterator ci = componentMap.values().iterator(); ci.hasNext();)
+            {
+                Component component = (Component) ci.next();
+                component(pw, component);
+            }
+        }
+    }
+
+    private static final void component(PrintWriter pw, Component component)
+    {
+
+        pw.print(component.getId());
+        pw.print("=[");
+        pw.print(component.getName());
+        pw.println("]");
+
+        pw.println("  Bundle" + component.getBundle().getSymbolicName() + " ("
+            + component.getBundle().getBundleId() + ")");
+        pw.println("  State=" + toStateString(component.getState()));
+        pw.println("  DefaultState="
+            + (component.isDefaultEnabled() ? "enabled" : "disabled"));
+        pw.println("  Activation=" + (component.isImmediate() ? "immediate" : "delayed"));
+
+        listServices(pw, component);
+        listReferences(pw, component);
+        listProperties(pw, component);
+
+        pw.println();
+    }
+
+    private static void listServices(PrintWriter pw, Component component)
+    {
+        String[] services = component.getServices();
+        if (services == null)
+        {
+            return;
+        }
+
+        pw.println("  ServiceType="
+            + (component.isServiceFactory() ? "service factory" : "service"));
+
+        StringBuffer buf = new StringBuffer();
+        for (int i = 0; i < services.length; i++)
+        {
+            if (i > 0)
+            {
+                buf.append(", ");
+            }
+            buf.append(services[i]);
+        }
+
+        pw.println("  Services=" + buf);
+    }
+
+    private static final void listReferences(PrintWriter pw, Component component)
+    {
+        Reference[] refs = component.getReferences();
+        if (refs != null)
+        {
+            for (int i = 0; i < refs.length; i++)
+            {
+
+                pw.println("  Reference=" + refs[i].getName() + ", "
+                    + (refs[i].isSatisfied() ? "Satisfied" : "Unsatisfied"));
+
+                pw.println("    Service Name: " + refs[i].getServiceName());
+
+                if (refs[i].getTarget() != null)
+                {
+                    pw.println("  Target Filter: " + refs[i].getTarget());
+                }
+
+                pw.println("    Multiple: "
+                    + (refs[i].isMultiple() ? "multiple" : "single"));
+                pw.println("    Optional: "
+                    + (refs[i].isOptional() ? "optional" : "mandatory"));
+                pw.println("    Policy: " + (refs[i].isStatic() ? "static" : "dynamic"));
+
+                // list bound services
+                ServiceReference[] boundRefs = refs[i].getServiceReferences();
+                if (boundRefs != null && boundRefs.length > 0)
+                {
+                    for (int j = 0; j < boundRefs.length; j++)
+                    {
+                        pw.print("    Bound Service: ID ");
+                        pw.print(boundRefs[j].getProperty(Constants.SERVICE_ID));
+
+                        String name = (String) boundRefs[j].getProperty(ComponentConstants.COMPONENT_NAME);
+                        if (name == null)
+                        {
+                            name = (String) boundRefs[j].getProperty(Constants.SERVICE_PID);
+                            if (name == null)
+                            {
+                                name = (String) boundRefs[j].getProperty(Constants.SERVICE_DESCRIPTION);
+                            }
+                        }
+                        if (name != null)
+                        {
+                            pw.print(" (");
+                            pw.print(name);
+                            pw.print(")");
+                        }
+                        pw.println();
+                    }
+                }
+                else
+                {
+                    pw.println("    No Services bound");
+                }
+            }
+        }
+    }
+
+    private static final void listProperties(PrintWriter pw, Component component)
+    {
+        Dictionary props = component.getProperties();
+        if (props != null)
+        {
+
+            pw.println("  Properties=");
+            TreeSet keys = new TreeSet(Util.list(props.keys()));
+            for (Iterator ki = keys.iterator(); ki.hasNext();)
+            {
+                String key = (String) ki.next();
+                Object value = props.get(key);
+                value = WebConsoleUtil.toString(value);
+                if (value.getClass().isArray())
+                {
+                    value = Arrays.asList((Object[]) value);
+                }
+                pw.println("    " + key + "=" + value);
+            }
+        }
+    }
+
+    static final String toStateString(int state)
+    {
+        switch (state)
+        {
+            case Component.STATE_DISABLED:
+                return "disabled";
+            case Component.STATE_ENABLED:
+                return "enabled";
+            case Component.STATE_UNSATISFIED:
+                return "unsatisfied";
+            case Component.STATE_ACTIVATING:
+                return "activating";
+            case Component.STATE_ACTIVE:
+                return "active";
+            case Component.STATE_REGISTERED:
+                return "registered";
+            case Component.STATE_FACTORY:
+                return "factory";
+            case Component.STATE_DEACTIVATING:
+                return "deactivating";
+            case Component.STATE_DESTROYED:
+                return "destroyed";
+            default:
+                return String.valueOf(state);
+        }
+    }
+}
diff --git a/webconsole-plugins/ds/src/main/java/org/apache/felix/webconsole/plugins/ds/internal/Util.java b/webconsole-plugins/ds/src/main/java/org/apache/felix/webconsole/plugins/ds/internal/Util.java
new file mode 100644
index 0000000..8e96845
--- /dev/null
+++ b/webconsole-plugins/ds/src/main/java/org/apache/felix/webconsole/plugins/ds/internal/Util.java
@@ -0,0 +1,66 @@
+/*
+ * 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.
+ */
+package org.apache.felix.webconsole.plugins.ds.internal;
+
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.Enumeration;
+
+import org.apache.felix.scr.Component;
+
+class Util
+{
+
+    static final Comparator COMPONENT_COMPARATOR = new Comparator()
+    {
+        public int compare(Object o0, Object o1)
+        {
+            final Component c0 = (Component) o0;
+            final Component c1 = (Component) o1;
+            final int nameCmp = c0.getName().compareTo(c1.getName());
+            if (nameCmp != 0)
+            {
+                return nameCmp;
+            }
+            return (c0.getId() < c1.getId()) ? -1 : ((c0.getId() > c1.getId()) ? 1 : 0);
+        }
+    };
+
+    private Util()
+    {
+        // prevent instantiation
+    }
+
+    /**
+     * This method is the same as Collections#list(Enumeration). The reason to
+     * duplicate it here, is that it is missing in OSGi/Minimum execution
+     * environment.
+     *
+     * @param e the enumeration which to convert
+     * @return the list containing all enumeration entries.
+     */
+    public static final ArrayList list(Enumeration e)
+    {
+        ArrayList l = new ArrayList();
+        while (e.hasMoreElements())
+        {
+            l.add(e.nextElement());
+        }
+        return l;
+    }
+
+}
diff --git a/webconsole-plugins/ds/src/main/java/org/apache/felix/webconsole/plugins/ds/internal/WebConsolePlugin.java b/webconsole-plugins/ds/src/main/java/org/apache/felix/webconsole/plugins/ds/internal/WebConsolePlugin.java
new file mode 100644
index 0000000..4af5c48
--- /dev/null
+++ b/webconsole-plugins/ds/src/main/java/org/apache/felix/webconsole/plugins/ds/internal/WebConsolePlugin.java
@@ -0,0 +1,620 @@
+/*
+ * 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.
+ */
+package org.apache.felix.webconsole.plugins.ds.internal;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.Arrays;
+import java.util.Dictionary;
+import java.util.Iterator;
+import java.util.TreeSet;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.felix.scr.Component;
+import org.apache.felix.scr.Reference;
+import org.apache.felix.scr.ScrService;
+import org.apache.felix.webconsole.DefaultVariableResolver;
+import org.apache.felix.webconsole.SimpleWebConsolePlugin;
+import org.apache.felix.webconsole.WebConsoleUtil;
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONWriter;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.Constants;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.cm.Configuration;
+import org.osgi.service.cm.ConfigurationAdmin;
+import org.osgi.service.component.ComponentConstants;
+import org.osgi.service.metatype.MetaTypeInformation;
+import org.osgi.service.metatype.MetaTypeService;
+
+/**
+ * ComponentsServlet provides a plugin for managing Service Components Runtime.
+ */
+class WebConsolePlugin extends SimpleWebConsolePlugin
+{
+
+    private static final long serialVersionUID = 1L;
+
+    private static final String LABEL = "components"; //$NON-NLS-1$
+    private static final String TITLE = "%components.pluginTitle"; //$NON-NLS-1$
+    private static final String CSS[] = { "/res/ui/bundles.css" }; // yes, it's correct! //$NON-NLS-1$
+    private static final String RES = "/" + LABEL + "/res/"; //$NON-NLS-1$ //$NON-NLS-2$
+
+    // actions
+    private static final String OPERATION = "action"; //$NON-NLS-1$
+    private static final String OPERATION_ENABLE = "enable"; //$NON-NLS-1$
+    private static final String OPERATION_DISABLE = "disable"; //$NON-NLS-1$
+    //private static final String OPERATION_CONFIGURE = "configure";
+
+    // needed services
+    static final String SCR_SERVICE = "org.apache.felix.scr.ScrService"; //$NON-NLS-1$
+    private static final String META_TYPE_NAME = "org.osgi.service.metatype.MetaTypeService"; //$NON-NLS-1$
+    private static final String CONFIGURATION_ADMIN_NAME = "org.osgi.service.cm.ConfigurationAdmin"; //$NON-NLS-1$
+
+    // templates
+    private final String TEMPLATE;
+
+    /** Default constructor */
+    WebConsolePlugin()
+    {
+        super(LABEL, TITLE, CSS);
+
+        // load templates
+        TEMPLATE = readTemplateFile("/res/plugin.html"); //$NON-NLS-1$
+    }
+
+    /**
+     * @see javax.servlet.http.HttpServlet#doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+     */
+    protected void doPost(HttpServletRequest request, HttpServletResponse response)
+        throws IOException
+    {
+        final RequestInfo reqInfo = new RequestInfo(request);
+        if (reqInfo.component == null && reqInfo.componentRequested)
+        {
+            response.sendError(404);
+            return;
+        }
+        if (!reqInfo.componentRequested)
+        {
+            response.sendError(500);
+            return;
+        }
+        String op = request.getParameter(OPERATION);
+        if (OPERATION_ENABLE.equals(op))
+        {
+            reqInfo.component.enable();
+        }
+        else if (OPERATION_DISABLE.equals(op))
+        {
+            reqInfo.component.disable();
+        }
+
+        final PrintWriter pw = response.getWriter();
+        response.setContentType("application/json"); //$NON-NLS-1$
+        response.setCharacterEncoding("UTF-8"); //$NON-NLS-1$
+        renderResult(pw, null);
+    }
+
+    /**
+     * @see org.apache.felix.webconsole.AbstractWebConsolePlugin#doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+     */
+    protected void doGet(HttpServletRequest request, HttpServletResponse response)
+        throws ServletException, IOException
+    {
+        String path = request.getPathInfo();
+        // don't process if this is request to load a resource
+        if (!path.startsWith(RES))
+        {
+            final RequestInfo reqInfo = new RequestInfo(request);
+            if (reqInfo.component == null && reqInfo.componentRequested)
+            {
+                response.sendError(404);
+                return;
+            }
+            if (reqInfo.extension.equals("json")) //$NON-NLS-1$
+            {
+                response.setContentType("application/json"); //$NON-NLS-1$
+                response.setCharacterEncoding("UTF-8"); //$NON-NLS-1$
+
+                this.renderResult(response.getWriter(), reqInfo.component);
+
+                // nothing more to do
+                return;
+            }
+        }
+        super.doGet(request, response);
+    }
+
+    /**
+     * @see org.apache.felix.webconsole.AbstractWebConsolePlugin#renderContent(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+     */
+    protected void renderContent(HttpServletRequest request, HttpServletResponse response)
+        throws IOException
+    {
+        // get request info from request attribute
+        final RequestInfo reqInfo = getRequestInfo(request);
+
+        StringWriter w = new StringWriter();
+        PrintWriter w2 = new PrintWriter(w);
+        renderResult(w2, reqInfo.component);
+
+        // prepare variables
+        DefaultVariableResolver vars = ((DefaultVariableResolver) WebConsoleUtil.getVariableResolver(request));
+        vars.put("__drawDetails__", reqInfo.componentRequested ? Boolean.TRUE : Boolean.FALSE); //$NON-NLS-1$
+        vars.put("__data__", w.toString()); //$NON-NLS-1$
+
+        response.getWriter().print(TEMPLATE);
+
+    }
+
+    private void renderResult(final PrintWriter pw, final Component component)
+        throws IOException
+    {
+        final JSONWriter jw = new JSONWriter(pw);
+        try
+        {
+            jw.object();
+
+            final ScrService scrService = getScrService();
+            if (scrService == null)
+            {
+                jw.key("status"); //$NON-NLS-1$
+                jw.value(-1);
+            }
+            else
+            {
+                final Component[] components = scrService.getComponents();
+
+                if (components == null || components.length == 0)
+                {
+                    jw.key("status"); //$NON-NLS-1$
+                    jw.value(0);
+                }
+                else
+                {
+                    // order components by name
+                    sortComponents(components);
+
+                    final StringBuffer buffer = new StringBuffer();
+                    buffer.append(components.length);
+                    buffer.append(" component"); //$NON-NLS-1$
+                    if (components.length != 1)
+                    {
+                        buffer.append('s');
+                    }
+                    buffer.append(" installed."); //$NON-NLS-1$
+                    jw.key("status"); //$NON-NLS-1$
+                    jw.value(components.length);
+
+                    // render components
+                    jw.key("data"); //$NON-NLS-1$
+                    jw.array();
+                    if (component != null)
+                    {
+                        component(jw, component, true);
+                    }
+                    else
+                    {
+                        for (int i = 0; i < components.length; i++)
+                        {
+                            component(jw, components[i], false);
+                        }
+                    }
+                    jw.endArray();
+                }
+            }
+
+            jw.endObject();
+        }
+        catch (JSONException je)
+        {
+            throw new IOException(je.toString());
+        }
+    }
+
+    private void sortComponents(Component[] components)
+    {
+        Arrays.sort(components, Util.COMPONENT_COMPARATOR);
+    }
+
+    private void component(JSONWriter jw, Component component, boolean details)
+        throws JSONException
+    {
+        String id = String.valueOf(component.getId());
+        String name = component.getName();
+        int state = component.getState();
+
+        jw.object();
+
+        // component information
+        jw.key("id"); //$NON-NLS-1$
+        jw.value(id);
+        jw.key("name"); //$NON-NLS-1$
+        jw.value(name);
+        jw.key("state"); //$NON-NLS-1$
+        jw.value(ComponentConfigurationPrinter.toStateString(state));
+        jw.key("stateRaw"); //$NON-NLS-1$
+        jw.value(state);
+
+        final Dictionary props = component.getProperties();
+
+        final String pid = (String) (props != null ? props.get(Constants.SERVICE_PID)
+            : null);
+        if (pid != null)
+        {
+            jw.key("pid"); //$NON-NLS-1$
+            jw.value(pid);
+            if (isConfigurable(component.getBundle(), pid))
+            {
+                jw.key("configurable"); //$NON-NLS-1$
+                jw.value(pid);
+            }
+        }
+
+        // component details
+        if (details)
+        {
+            gatherComponentDetails(jw, component);
+        }
+
+        jw.endObject();
+    }
+
+    private void gatherComponentDetails(JSONWriter jw, Component component)
+        throws JSONException
+    {
+        jw.key("props"); //$NON-NLS-1$
+        jw.array();
+
+        keyVal(jw, "Bundle", component.getBundle().getSymbolicName() + " ("
+            + component.getBundle().getBundleId() + ")");
+        keyVal(jw, "Implementation Class", component.getClassName());
+        if (component.getFactory() != null)
+        {
+            keyVal(jw, "Component Factory Name", component.getFactory());
+        }
+        keyVal(jw, "Default State", component.isDefaultEnabled() ? "enabled" : "disabled");
+        keyVal(jw, "Activation", component.isImmediate() ? "immediate" : "delayed");
+
+        try
+        {
+            keyVal(jw, "Configuration Policy", component.getConfigurationPolicy());
+        }
+        catch (Throwable t)
+        {
+            // missing implementation of said method in the actually bound API
+            // ignore this and just don't display the information
+        }
+
+        listServices(jw, component);
+        listReferences(jw, component);
+        listProperties(jw, component);
+
+        jw.endArray();
+    }
+
+    private void listServices(JSONWriter jw, Component component)
+    {
+        String[] services = component.getServices();
+        if (services == null)
+        {
+            return;
+        }
+
+        keyVal(jw, "Service Type", component.isServiceFactory() ? "service factory"
+            : "service");
+
+        JSONArray buf = new JSONArray();
+        for (int i = 0; i < services.length; i++)
+        {
+            buf.put(services[i]);
+        }
+
+        keyVal(jw, "Services", buf);
+    }
+
+    private void listReferences(JSONWriter jw, Component component)
+    {
+        Reference[] refs = component.getReferences();
+        if (refs != null)
+        {
+            for (int i = 0; i < refs.length; i++)
+            {
+                JSONArray buf = new JSONArray();
+                buf.put(refs[i].isSatisfied() ? "Satisfied" : "Unsatisfied");
+                buf.put("Service Name: " + refs[i].getServiceName());
+                if (refs[i].getTarget() != null)
+                {
+                    buf.put("Target Filter: " + refs[i].getTarget());
+                }
+                buf.put("Multiple: " + (refs[i].isMultiple() ? "multiple" : "single"));
+                buf.put("Optional: " + (refs[i].isOptional() ? "optional" : "mandatory"));
+                buf.put("Policy: " + (refs[i].isStatic() ? "static" : "dynamic"));
+
+                // list bound services
+                ServiceReference[] boundRefs = refs[i].getServiceReferences();
+                if (boundRefs != null && boundRefs.length > 0)
+                {
+                    for (int j = 0; j < boundRefs.length; j++)
+                    {
+                        final StringBuffer b = new StringBuffer();
+                        b.append("Bound Service ID ");
+                        b.append(boundRefs[j].getProperty(Constants.SERVICE_ID));
+
+                        String name = (String) boundRefs[j].getProperty(ComponentConstants.COMPONENT_NAME);
+                        if (name == null)
+                        {
+                            name = (String) boundRefs[j].getProperty(Constants.SERVICE_PID);
+                            if (name == null)
+                            {
+                                name = (String) boundRefs[j].getProperty(Constants.SERVICE_DESCRIPTION);
+                            }
+                        }
+                        if (name != null)
+                        {
+                            b.append(" (");
+                            b.append(name);
+                            b.append(")");
+                        }
+                        buf.put(b.toString());
+                    }
+                }
+                else
+                {
+                    buf.put("No Services bound");
+                }
+
+                keyVal(jw, "Reference " + refs[i].getName(), buf.toString());
+            }
+        }
+    }
+
+    private void listProperties(JSONWriter jw, Component component)
+    {
+        Dictionary props = component.getProperties();
+        if (props != null)
+        {
+            JSONArray buf = new JSONArray();
+            TreeSet keys = new TreeSet(Util.list(props.keys()));
+            for (Iterator ki = keys.iterator(); ki.hasNext();)
+            {
+                final String key = (String) ki.next();
+                final StringBuffer b = new StringBuffer();
+                b.append(key).append(" = ");
+
+                Object prop = props.get(key);
+                prop = WebConsoleUtil.toString(prop);
+                b.append(prop);
+                buf.put(b.toString());
+            }
+
+            keyVal(jw, "Properties", buf);
+        }
+
+    }
+
+    private void keyVal(JSONWriter jw, String key, Object value)
+    {
+        try
+        {
+            WebConsoleUtil.keyVal(jw, key, value);
+        }
+        catch (JSONException je)
+        {
+            // don't care
+        }
+    }
+
+    /**
+     * Check if the component with the specified pid is
+     * configurable
+     * @param providingBundle The Bundle providing the component. This may be
+     *      theoretically be <code>null</code>.
+     * @param pid A non null pid
+     * @return <code>true</code> if the component is configurable.
+     */
+    private boolean isConfigurable(final Bundle providingBundle, final String pid)
+    {
+        // we first check if the config admin has something for this pid
+        final ConfigurationAdmin ca = this.getConfigurationAdmin();
+        if (ca != null)
+        {
+            try
+            {
+                // we use listConfigurations to not create configuration
+                // objects persistently without the user providing actual
+                // configuration
+                String filter = '(' + Constants.SERVICE_PID + '=' + pid + ')';
+                Configuration[] configs = ca.listConfigurations(filter);
+                if (configs != null && configs.length > 0)
+                {
+                    return true;
+                }
+            }
+            catch (InvalidSyntaxException ise)
+            {
+                // should print message
+            }
+            catch (IOException ioe)
+            {
+                // should print message
+            }
+        }
+        // second check is using the meta type service
+        if (providingBundle != null)
+        {
+            final MetaTypeService mts = this.getMetaTypeService();
+            if (mts != null)
+            {
+                final MetaTypeInformation mti = mts.getMetaTypeInformation(providingBundle);
+                if (mti != null)
+                {
+                    return mti.getObjectClassDefinition(pid, null) != null;
+                }
+            }
+        }
+        return false;
+    }
+
+    private final ConfigurationAdmin getConfigurationAdmin()
+    {
+        return (ConfigurationAdmin) getService(CONFIGURATION_ADMIN_NAME);
+    }
+
+    final ScrService getScrService()
+    {
+        return (ScrService) getService(SCR_SERVICE);
+    }
+
+    private final MetaTypeService getMetaTypeService()
+    {
+        return (MetaTypeService) getService(META_TYPE_NAME);
+    }
+
+    private final class RequestInfo
+    {
+        public final String extension;
+        public final Component component;
+        public final boolean componentRequested;
+
+        protected RequestInfo(final HttpServletRequest request)
+        {
+            String info = request.getPathInfo();
+            // remove label and starting slash
+            info = info.substring(getLabel().length() + 1);
+
+            // get extension
+            if (info.endsWith(".json")) //$NON-NLS-1$
+            {
+                extension = "json"; //$NON-NLS-1$
+                info = info.substring(0, info.length() - 5);
+            }
+            else
+            {
+                extension = "html"; //$NON-NLS-1$
+            }
+
+            if (info.length() > 1 && info.startsWith("/")) //$NON-NLS-1$
+            {
+                this.componentRequested = true;
+                info = info.substring(1);
+                Component component = getComponentId(info);
+                if (component == null)
+                {
+                    component = getComponentByName(info);
+                }
+                this.component = component;
+            }
+            else
+            {
+                this.componentRequested = false;
+                this.component = null;
+            }
+
+            request.setAttribute(WebConsolePlugin.this.getClass().getName(), this);
+        }
+
+        protected Component getComponentId(final String componentIdPar)
+        {
+            final ScrService scrService = getScrService();
+            if (scrService != null)
+            {
+                try
+                {
+                    final long componentId = Long.parseLong(componentIdPar);
+                    return scrService.getComponent(componentId);
+                }
+                catch (NumberFormatException nfe)
+                {
+                    // don't care
+                }
+            }
+
+            return null;
+        }
+
+        protected Component getComponentByName(final String names)
+        {
+            if (names.length() > 0)
+            {
+                final ScrService scrService = getScrService();
+                if (scrService != null)
+                {
+
+                    final int slash = names.lastIndexOf('/');
+                    final String componentName;
+                    final String pid;
+                    if (slash > 0)
+                    {
+                        componentName = names.substring(0, slash);
+                        pid = names.substring(slash + 1);
+                    }
+                    else
+                    {
+                        componentName = names;
+                        pid = null;
+                    }
+
+                    Component[] components;
+                    try
+                    {
+                        components = scrService.getComponents(componentName);
+                    }
+                    catch (Throwable t)
+                    {
+                        // not implemented in the used API version
+                        components = null;
+                    }
+
+                    if (components != null)
+                    {
+                        if (pid != null)
+                        {
+                            for (int i = 0; i < components.length; i++)
+                            {
+                                Component component = components[i];
+                                if (pid.equals(component.getProperties().get(
+                                    Constants.SERVICE_PID)))
+                                {
+                                    return component;
+                                }
+                            }
+                        }
+                        else if (components.length > 0)
+                        {
+                            return components[0];
+                        }
+                    }
+                }
+            }
+
+            return null;
+        }
+    }
+
+    static RequestInfo getRequestInfo(final HttpServletRequest request)
+    {
+        return (RequestInfo) request.getAttribute(WebConsolePlugin.class.getName());
+    }
+}
diff --git a/webconsole-plugins/ds/src/main/native2ascii/OSGI-INF/l10n/bundle_bg.properties b/webconsole-plugins/ds/src/main/native2ascii/OSGI-INF/l10n/bundle_bg.properties
new file mode 100644
index 0000000..33732de
--- /dev/null
+++ b/webconsole-plugins/ds/src/main/native2ascii/OSGI-INF/l10n/bundle_bg.properties
@@ -0,0 +1,49 @@
+﻿#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.
+
+#
+# Web Console strings for reference all strings here are commented.
+# This file may be used to produce a translation of the strings
+#
+# Note that properties files are ISO-8859-1 encoded. To provide translations
+# for languages requiring different character encodings, you may use the
+# native2ascii Maven Plugin from http://mojo.codehaus.org/native2ascii-maven-plugin/
+# to translate the natively encoded files to ISO-8859-1 during bundle build
+#
+# Translations requiring non-ISO-8859-1 encoding are placed in the
+# src/main/native2ascii/OSGI-INF/l10n folder and are converted using said
+# plugin while building the bundle
+# native2ascii -encoding utf-8 bundle_bg.raw_properties bundle_bg.properties
+
+# Components plugin
+components.pluginTitle=Компоненти
+scr.status.no_service=Declarative Service не е наличен!
+scr.status.no_components=Няма инсталирани компонент в момента!
+scr.status.ok=Брой инсталирани компоненти: {0}
+scr.action.enable=Enable
+scr.action.disable=Disable
+scr.action.configure=Конфигуриране
+scr.prop.bundle=Бъндъл
+scr.prop.defstate=Статус по подразбиране
+scr.prop.activation=Активация
+scr.prop.properties=Конфигурации
+scr.prop.class=Implementation Class
+scr.prop.componentfactory=Component Factory име
+scr.prop.configurationpolicy=Конфигурационна политика
+scr.serv.type=Тип на услугата
+scr.serv=Услуги
+scr.title.actions=Действия
+scr.title.status=Статус
+scr.title.name=Име
diff --git a/webconsole-plugins/ds/src/main/native2ascii/OSGI-INF/l10n/bundle_de.properties b/webconsole-plugins/ds/src/main/native2ascii/OSGI-INF/l10n/bundle_de.properties
new file mode 100644
index 0000000..4165c7a
--- /dev/null
+++ b/webconsole-plugins/ds/src/main/native2ascii/OSGI-INF/l10n/bundle_de.properties
@@ -0,0 +1,49 @@
+#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.
+
+#
+# Web Console strings for reference all strings here are commented.
+# This file may be used to produce a translation of the strings
+#
+# Note that properties files are ISO-8859-1 encoded. To provide translations
+# for languages requiring different character encodings, you may use the
+# native2ascii Maven Plugin from http://mojo.codehaus.org/native2ascii-maven-plugin/
+# to translate the natively encoded files to ISO-8859-1 during bundle build
+#
+# Translations requiring non-ISO-8859-1 encoding are placed in the
+# src/main/native2ascii/OSGI-INF/l10n folder and are converted using said
+# plugin while building the bundle
+#
+
+# Components plugin
+components.pluginTitle=Komponenten
+scr.status.no_service=Declarative Service ist Voraussetzung für diese Funktionalität!
+scr.status.no_components=Zur Zeit sind keine Komponenten installiert!
+scr.status.ok=Anzahl installierter Komponenten: {0}
+scr.action.enable=Aktivieren
+scr.action.disable=Deaktivieren
+scr.action.configure=Konfigurieren
+scr.prop.bundle=Bundle
+scr.prop.defstate=Default Status
+scr.prop.activation=Aktivierung
+scr.prop.properties=Eigenschaften
+scr.prop.class=Implementationsklasse
+scr.prop.componentfactory=Komponenten Factory Name
+scr.prop.configurationpolicy=Konfigurations Policy
+scr.serv.type=Dienst Typ
+scr.serv=Dienste
+scr.title.actions=Aktionen
+scr.title.status=Status
+scr.title.name=Name
diff --git a/webconsole-plugins/ds/src/main/native2ascii/OSGI-INF/l10n/bundle_ru.properties b/webconsole-plugins/ds/src/main/native2ascii/OSGI-INF/l10n/bundle_ru.properties
new file mode 100644
index 0000000..d10d52e
--- /dev/null
+++ b/webconsole-plugins/ds/src/main/native2ascii/OSGI-INF/l10n/bundle_ru.properties
@@ -0,0 +1,49 @@
+﻿#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.
+
+#
+# Web Console strings for reference all strings here are commented.
+# This file may be used to produce a translation of the strings
+#
+# Note that properties files are ISO-8859-1 encoded. To provide translations
+# for languages requiring different character encodings, you may use the
+# native2ascii Maven Plugin from http://mojo.codehaus.org/native2ascii-maven-plugin/
+# to translate the natively encoded files to ISO-8859-1 during bundle build
+#
+# Translations requiring non-ISO-8859-1 encoding are placed in the
+# src/main/native2ascii/OSGI-INF/l10n folder and are converted using said
+# plugin while building the bundle
+#
+
+# Components plugin
+components.pluginTitle=Компоненты
+scr.status.no_service=Сервис Declarative Service не найден!
+scr.status.no_components=Нет установленных компонентов!
+scr.status.ok=Количество установленных компонентов: {0}
+scr.action.enable=Включить
+scr.action.disable=Выключить
+scr.action.configure=Конфигурировать
+scr.prop.bundle=Модуль
+scr.prop.defstate=Состояние по умолчанию
+scr.prop.activation=Активация
+scr.prop.properties=Конфигурации
+scr.prop.class=Класс реализации
+scr.prop.componentfactory=Имя фабрики компонентов
+scr.prop.configurationpolicy=Политика конфигурирования
+scr.serv.type=Тип сервиса
+scr.serv=Сервисы
+scr.title.actions=Действия
+scr.title.status=Состояние
+scr.title.name=Имя
diff --git a/webconsole-plugins/ds/src/main/resources/OSGI-INF/l10n/bundle.properties b/webconsole-plugins/ds/src/main/resources/OSGI-INF/l10n/bundle.properties
new file mode 100644
index 0000000..d6518c6
--- /dev/null
+++ b/webconsole-plugins/ds/src/main/resources/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,49 @@
+#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.
+
+#
+# Web Console strings for reference all strings here are commented.
+# This file may be used to produce a translation of the strings
+#
+# Note that properties files are ISO-8859-1 encoded. To provide translations
+# for languages requiring different character encodings, you may use the
+# native2ascii Maven Plugin from http://mojo.codehaus.org/native2ascii-maven-plugin/
+# to translate the natively encoded files to ISO-8859-1 during bundle build
+#
+# Translations requiring non-ISO-8859-1 encoding are placed in the
+# src/main/native2ascii/OSGI-INF/l10n folder and are converted using said
+# plugin while building the bundle
+#
+
+# Components plugin
+components.pluginTitle=Components
+scr.status.no_service=Declarative Service required for this function!
+scr.status.no_components=No components installed currently!
+scr.status.ok=Number of installed components: {0}
+scr.action.enable=Enable
+scr.action.disable=Disable
+scr.action.configure=Configure
+scr.prop.bundle=Bundle
+scr.prop.defstate=Default State
+scr.prop.activation=Activation
+scr.prop.properties=Properties
+scr.prop.class=Implementation Class
+scr.prop.componentfactory=Component Factory Name
+scr.prop.configurationpolicy=Configuration Policy
+scr.serv.type=Service Type
+scr.serv=Services
+scr.title.actions=Actions
+scr.title.status=Status
+scr.title.name=Name
diff --git a/webconsole-plugins/ds/src/main/resources/res/plugin.html b/webconsole-plugins/ds/src/main/resources/res/plugin.html
new file mode 100644
index 0000000..fa0f8c1
--- /dev/null
+++ b/webconsole-plugins/ds/src/main/resources/res/plugin.html
@@ -0,0 +1,67 @@
+﻿<script type="text/javascript" src="${pluginRoot}/res/plugin.js"></script>
+<script type="text/javascript">
+// <![CDATA[
+var drawDetails = ${__drawDetails__};
+var scrData = ${__data__};
+// i18n
+var i18n = {
+	'Bundle'                 : '${scr.prop.bundle}',
+	'Default State'          : '${scr.prop.defstate}',
+	'Activation'             : '${scr.prop.activation}',
+	'Service Type'           : '${scr.serv.type}',
+	'Services'               : '${scr.serv}',
+	'Properties'             : '${scr.prop.properties}',
+	'Implementation Class'   : '${scr.prop.class}',
+	'Component Factory Name' : '${scr.prop.componentfactory}',
+	'Configuration Policy'   : '${scr.prop.configurationpolicy}',
+	stat_no_service          : "${scr.status.no_service}",
+	stat_no_components       : "${scr.status.no_components}",
+	stat_ok                  : "${scr.status.ok}"
+}
+// ]]>
+</script>
+<p class="statline">&nbsp;</p>
+
+
+<div id="scr"> <!-- data available -->
+	<!-- top header -->
+	<form method='post' enctype='multipart/form-data' action="${pluginRoot}">
+		<div class="ui-widget-header ui-corner-top buttonGroup">
+			<button class='reloadButton' type='button' name='reload'>${reload}</button>
+		</div>
+	</form>
+	
+	<table id="plugin_table" class="tablesorter nicetable noauto">
+	<thead>
+		<tr>
+			<th class="col_Id">${id}</th>
+			<th class="col_Name">${scr.title.name}</th>
+			<th class="col_Status">${scr.title.status}</th>
+			<th class="col_Actions">${scr.title.actions}</th>
+		</tr>
+	</thead>
+	<tbody>
+		<tr>
+			<td>&nbsp;</td> <!-- id -->
+			<td> <!-- name with arrow -->
+				<div class="bIcon ui-icon ui-icon-triangle-1-e" style="float:left" title="${scr.details.tip}">&nbsp;</div>
+			</td> 
+			<td>&nbsp;</td> <!-- status -->
+			<td>
+				<ul class="icons">
+					<li class="dynhover ui-helper-hidden" title="${scr.action.enable}"><span class="ui-icon ui-icon-play">&nbsp;</span></li>
+					<li class="dynhover ui-helper-hidden" title="${scr.action.disable}"><span class="ui-icon ui-icon-stop">&nbsp;</span></li>
+					<li class="dynhover ui-helper-hidden" title="${scr.action.configure}"><span class="ui-icon ui-icon-wrench">&nbsp;</span></li>
+				</ul>
+			</td>
+		</tr>
+	</tbody>
+	</table>
+</div> <!-- end data available -->
+
+<!-- bottom header -->
+<form method='post' enctype='multipart/form-data' action="${pluginRoot}">
+	<div class="ui-widget-header ui-corner-bottom buttonGroup">
+		<button class='reloadButton' type='button' name='reload'>${reload}</button>
+	</div>
+</form>
diff --git a/webconsole-plugins/ds/src/main/resources/res/plugin.js b/webconsole-plugins/ds/src/main/resources/res/plugin.js
new file mode 100644
index 0000000..d1fa357
--- /dev/null
+++ b/webconsole-plugins/ds/src/main/resources/res/plugin.js
@@ -0,0 +1,183 @@
+/*
+ * 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.
+ */
+function renderData( eventData )  {
+	switch(eventData.status) {
+		case -1: // no event admin
+			$('.statline').html(i18n.stat_no_service);
+			$('#scr').addClass('ui-helper-hidden');
+			break;
+		case  0: // no components
+			$('.statline').html(i18n.stat_no_components);
+			$('#scr').addClass('ui-helper-hidden');
+			break;
+		default:
+			$('.statline').html(i18n.stat_ok.msgFormat(eventData.status));
+			$('#scr').removeClass('ui-helper-hidden');
+
+			tableBody.empty();
+			for ( var idx in eventData.data ) {
+				entry( eventData.data[idx] );
+			}
+			if ( drawDetails ) renderDetails(eventData);
+			initStaticWidgets();
+	}
+}
+
+function getEntryId(/* Object */ dataEntry) {
+    var id = dataEntry.id;
+    if (id < 0) {
+        id = dataEntry.name;
+        if (dataEntry.pid) {
+            id += '/' + dataEntry.pid;
+        }
+    }
+    return id;
+}
+
+function entry( /* Object */ dataEntry ) {
+	var idPath = getEntryId(dataEntry);
+	var id = idPath.replace(/[./-]/g, '_');
+	var name = dataEntry.name;
+	var _ = tableEntryTemplate.clone().appendTo(tableBody).attr('id', 'entry' + id);
+
+	_.find('.bIcon').attr('id', 'img' + id).click(function() {
+		showDetails(idPath);
+	}).after(drawDetails ? name : ('<a href="' + pluginRoot + '/' + idPath + '">' + name + '</a>'));
+
+	_.find('td:eq(0)').text( dataEntry.id );
+	_.find('td:eq(2)').text( dataEntry.state );
+
+	// setup buttons
+	if ( dataEntry.stateRaw == 1 || dataEntry.stateRaw == 1024 ) { // disabled or disabling
+		_.find('li:eq(0)').removeClass('ui-helper-hidden').click(function() { changeDataEntryState(idPath, 'enable') });
+	} else {
+		_.find('li:eq(1)').removeClass('ui-helper-hidden').click(function() { changeDataEntryState(idPath, 'disable') });
+	}
+	if ( dataEntry.configurable ) _.find('li:eq(2)').removeClass('ui-helper-hidden').click(function() { // configure
+		changeDataEntryState(dataEntry.pid, 'configure');
+	});	
+}
+
+function changeDataEntryState(/* long */ id, /* String */ action) {
+	if ( action == 'configure') {
+		window.location = appRoot + '/configMgr/' + id;
+		return;
+	}
+	$.post(pluginRoot + '/' + id, {'action':action}, function(data) {
+		renderData(data);
+	}, 'json');	
+}
+
+function showDetails( id ) {
+	$.get(pluginRoot + '/' + id + '.json', null, function(data) {
+		renderDetails(data);
+	}, 'json');
+}
+
+function hideDetails( id ) {
+	var __test__ = $('#img' + id);
+	$('#img' + id).each(function() {
+		$('#pluginInlineDetails').remove();
+		$(this).
+			removeClass('ui-icon-triangle-1-w').//left
+			removeClass('ui-icon-triangle-1-s').//down
+			addClass('ui-icon-triangle-1-e').//right
+		    attr('title', 'Details').
+			unbind('click').click(function() {showDetails(id)});
+	});
+}
+
+function renderDetails( data ) {
+	data = data.data[0];
+	var id = getEntryId(data).replace(/[./-]/g, '_');
+	$('#pluginInlineDetails').remove();
+	var __test__ = $('#entry' + id);
+	$('#entry' + id + ' > td').eq(1).append('<div id="pluginInlineDetails"/>');
+	$('#img' + id).each(function() {
+		if ( drawDetails ) {
+			var ref = window.location.pathname;
+			ref = ref.substring(0, ref.lastIndexOf('/'));
+			$(this).
+				removeClass('ui-icon-triangle-1-e').//right
+				removeClass('ui-icon-triangle-1-s').//down
+				addClass('ui-icon-triangle-1-w').//left
+				attr('title', 'Back').
+				unbind('click').click(function() {window.location = ref});
+		} else {
+			$(this).
+				removeClass('ui-icon-triangle-1-w').//left
+				removeClass('ui-icon-triangle-1-e').//right
+				addClass('ui-icon-triangle-1-s').//down
+				attr('title', 'Hide Details').
+				unbind('click').click(function() {hideDetails(id)});
+		}
+	});
+	$('#pluginInlineDetails').append('<table border="0"><tbody></tbody></table>');
+	var details = data.props;
+	for (var idx in details) {
+		var prop = details[idx];
+		var key = i18n[prop.key] ? i18n[prop.key] : prop.key; // i18n
+
+		var txt = '<tr><td class="aligntop" noWrap="true" style="border:0px none">' + key + '</td><td class="aligntop" style="border:0px none">';
+		if (prop.value) {
+			if ( $.isArray(prop.value) ) {
+				var i = 0;
+				for(var pi in prop.value) {
+					var value = prop.value[pi];
+					if (i > 0) { txt = txt + '<br/>'; }
+					var span;
+					if (value.substring(0, 2) == '!!') {
+						txt = txt + '<span style="color: red;'> + value + '</span>';
+					} else {
+						txt = txt + value;
+					}
+					i++;
+				}
+			} else {
+				txt = txt + prop.value;
+			}
+		} else {
+			txt = txt + '\u00a0';
+		}
+		txt = txt + '</td></tr>';
+		$('#pluginInlineDetails > table > tbody').append(txt);
+	}
+}
+
+var tableBody = false;
+var tableEntryTemplate = false;
+var pluginTable = false;
+
+$(document).ready(function(){
+	pluginTable = $('#plugin_table');
+	tableBody = pluginTable.find('tbody');
+	tableEntryTemplate = tableBody.find('tr').clone();
+
+	renderData(scrData);
+
+	$('.reloadButton').click(document.location.reload);
+
+	pluginTable.tablesorter({
+		headers: {
+			0: { sorter:'digit'},
+			3: { sorter: false }
+		},
+		sortList: [[1,0]],
+		textExtraction:mixedLinksExtraction
+	});
+});
+
