FELIX-2261 Display using bundles along with links to the bundle page

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@931827 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/ServicesServlet.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/ServicesServlet.java
index 5e101c4..f8528da 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/ServicesServlet.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/ServicesServlet.java
@@ -422,7 +422,7 @@
         jw.key( "bundleVersion" );
         jw.value( Util.getHeaderValue( bundle, Constants.BUNDLE_VERSION ) );
         jw.key( "bundleSymbolicName" );
-        jw.value( Util.getHeaderValue( bundle, Constants.BUNDLE_SYMBOLICNAME ) );
+        jw.value( bundle.getSymbolicName() );
     }
 
 
diff --git a/webconsole/src/main/native2ascii/OSGI-INF/l10n/bundle_de.properties b/webconsole/src/main/native2ascii/OSGI-INF/l10n/bundle_de.properties
index 4a8d74a..23bb46e 100644
--- a/webconsole/src/main/native2ascii/OSGI-INF/l10n/bundle_de.properties
+++ b/webconsole/src/main/native2ascii/OSGI-INF/l10n/bundle_de.properties
@@ -73,6 +73,7 @@
 services.details.tip=Details
 services.statusline=Dienst Information: total {0} Dienst(e).
 services.caption=Dienste
+services.usingBundles=Nutzende Bundles
 
 # Log plugin
 log.pluginTitle=Log Service
diff --git a/webconsole/src/main/resources/OSGI-INF/l10n/bundle.properties b/webconsole/src/main/resources/OSGI-INF/l10n/bundle.properties
index 63a164f..fea335f 100644
--- a/webconsole/src/main/resources/OSGI-INF/l10n/bundle.properties
+++ b/webconsole/src/main/resources/OSGI-INF/l10n/bundle.properties
@@ -74,6 +74,7 @@
 services.details.tip=Details
 services.statusline=Services information: {0} service(s) in total.
 services.caption=Services
+services.usingBundles=Using Bundles
 
 # Log plugin
 log.pluginTitle=Log Service
diff --git a/webconsole/src/main/resources/res/ui/services.js b/webconsole/src/main/resources/res/ui/services.js
index db3058c..2dfbf07 100644
--- a/webconsole/src/main/resources/res/ui/services.js
+++ b/webconsole/src/main/resources/res/ui/services.js
@@ -108,8 +108,17 @@
 				unbind('click').click(function() {hideDetails(data.id)});
 		}
 	});
-	if (data.props) 
-		$('#pluginInlineDetails' + data.id).append( renderObjectAsTable(data.props) );
+	var details = "";
+	if (data.props) {
+		details += renderObjectAsTable(data.props);
+	}
+	if (data.usingBundles) {
+	   details += renderUsingBundlesAsTable(data.usingBundles);
+	}
+	if (details) {
+        details = '<table border="0"><tbody>' + details + '</tbody></table>';
+	    $('#pluginInlineDetails' + data.id).append( details );
+    }
 }
 
 function renderObjectAsTable(/* Object*/ details) {
@@ -141,10 +150,27 @@
 		txt = txt + '</td></tr>';
 	}
 
-	if ( txt ) {
-		txt = '<table border="0"><tbody>' + txt + '</tbody></table>';
+	return txt;
+}
+
+function renderUsingBundlesAsTable(/* Object[] */ bundles) {
+	var txt = '';
+
+	for (var idx in bundles) {
+		var bundle = bundles[idx];
+		txt += '<a href="' + bundlePath + '/' + bundle.bundleId + '">'
+		    + bundle.bundleSymbolicName + ' (' + bundle.bundleId + ')' 
+		    + '</a><br/>';
 	}
 
+    if (txt) {
+        txt = '<tr><td class="aligntop" noWrap="true" style="border:0px none">'
+            + i18n.usingBundles
+            + '</td><td class="aligntop" style="border:0px none">'
+            + txt
+            + '</td></tr>';
+    }
+
 	return txt;
 }
 
diff --git a/webconsole/src/main/resources/templates/services.html b/webconsole/src/main/resources/templates/services.html
index 0d5201f..bb84391 100644
--- a/webconsole/src/main/resources/templates/services.html
+++ b/webconsole/src/main/resources/templates/services.html
@@ -6,7 +6,8 @@
 	back : "${back}",
 	detailsHide : "${services.details.hide}",
 	detailsTip : "${services.details.tip}",
-	statline : "${services.statusline}"
+	statline : "${services.statusline}",
+	usingBundles : "${services.usingBundles}"
 }
 
 // data