FELIX-4202 : Allow to filter services using ldap filter in webconsole services tab . Apply patch from Alexander Klimetschek
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1517092 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole/src/main/resources/OSGI-INF/l10n/bundle.properties b/webconsole/src/main/resources/OSGI-INF/l10n/bundle.properties
index 786c373..f99802a 100644
--- a/webconsole/src/main/resources/OSGI-INF/l10n/bundle.properties
+++ b/webconsole/src/main/resources/OSGI-INF/l10n/bundle.properties
@@ -81,6 +81,8 @@
services.info.name=Used Services
services.info.descr=This is a OSGi service that is used by the current bundle. Click to see more details in 'Services' plugin.
services.info.key=Service #{0} of type(s) {1}
+services.filter.help=An LDAP filter string to match against service properties.
+services.filter.apply=Apply Filter
# Log plugin
logs.pluginTitle=Log Service
diff --git a/webconsole/src/main/resources/res/ui/bundles.css b/webconsole/src/main/resources/res/ui/bundles.css
index b5352f0..794c781 100644
--- a/webconsole/src/main/resources/res/ui/bundles.css
+++ b/webconsole/src/main/resources/res/ui/bundles.css
@@ -24,7 +24,6 @@
th.col_Version,
th.col_Status { width: 7em }
th.col_Actions { width: 121px }
-.filterBox { float: left; margin-left: 1em }
.symName { font-style: italic }
.symName:before { content: " (" }
.symName:after { content: ")" }
diff --git a/webconsole/src/main/resources/res/ui/webconsole.css b/webconsole/src/main/resources/res/ui/webconsole.css
index b8d24c8..0ddc954 100644
--- a/webconsole/src/main/resources/res/ui/webconsole.css
+++ b/webconsole/src/main/resources/res/ui/webconsole.css
@@ -191,3 +191,8 @@
/* language selection element */
#langSelect { position: absolute; top: 5px; right: 5px }
#langSelect img { display: block; padding: 2px 0 }
+
+.filterBox { float: left; margin-left: 1em }
+.servicesFilter { width: 400px; }
+.servicesFilterApply { width: 85px; }
+
diff --git a/webconsole/src/main/resources/templates/services.html b/webconsole/src/main/resources/templates/services.html
index bc717e8..0e70c58 100644
--- a/webconsole/src/main/resources/templates/services.html
+++ b/webconsole/src/main/resources/templates/services.html
@@ -19,7 +19,18 @@
<p class="statline"> </p>
-<div class="ui-widget-header ui-corner-top buttonGroup">${services.caption}</div>
+<form method="get" action="" class="filterForm">
+ <div class="ui-widget-header ui-corner-top buttonGroup">
+ <div class="filterBox">
+ <label>
+ Filter:
+ <input class="servicesFilter" name="filter" value="${filter}" title="${services.filter.help}"/>
+ </label>
+ <input type="submit" value="${services.filter.apply}" class="servicesFilterApply"/>
+ </div>
+ <span>${services.caption}</span>
+ </div>
+</form>
<table id="plugin_table" class="tablesorter nicetable noauto">
<thead>