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/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;
}