FELIX-4947 Webconsole plugin for OSGi Subsystems

Add status line.


git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1688814 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole-plugins/subsystems/src/main/resources/OSGI-INF/l10n/bundle.properties b/webconsole-plugins/subsystems/src/main/resources/OSGI-INF/l10n/bundle.properties
index 43a9f27..6145430 100644
--- a/webconsole-plugins/subsystems/src/main/resources/OSGI-INF/l10n/bundle.properties
+++ b/webconsole-plugins/subsystems/src/main/resources/OSGI-INF/l10n/bundle.properties
@@ -29,4 +29,5 @@
 

 # Components plugin

 subsystems.name=Subsystem Name

+subsystems.status=Number of subsystems: {0}

 

diff --git a/webconsole-plugins/subsystems/src/main/resources/res/plugin.html b/webconsole-plugins/subsystems/src/main/resources/res/plugin.html
index a901fdf..7506bf6 100644
--- a/webconsole-plugins/subsystems/src/main/resources/res/plugin.html
+++ b/webconsole-plugins/subsystems/src/main/resources/res/plugin.html
@@ -18,6 +18,9 @@
 <script type="text/javascript">

 // <![CDATA[

 var ssData = ${__data__};

+var i18n = {

+    status: "${subsystems.status}"

+};

 // ]]>

 </script>

 <p class="statline">&nbsp;</p>

diff --git a/webconsole-plugins/subsystems/src/main/resources/res/plugin.js b/webconsole-plugins/subsystems/src/main/resources/res/plugin.js
index e2c6c57..2dea8e8 100644
--- a/webconsole-plugins/subsystems/src/main/resources/res/plugin.js
+++ b/webconsole-plugins/subsystems/src/main/resources/res/plugin.js
@@ -17,10 +17,14 @@
 
 
 function renderData( subsystemData ) {
+	$('.statline').html(i18n.status.msgFormat(subsystemData.data.length));
+	
 	tableBody.empty();
 	for (var idx in subsystemData.data) {
 		entry( subsystemData.data[idx] );
 	}	
+
+	initStaticWidgets();
 }
 
 function entry( dataEntry ) {