You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cz...@apache.org on 2013/01/30 16:56:10 UTC

svn commit: r1440488 - in /felix/trunk/webconsole/src/main/resources: OSGI-INF/l10n/bundle.properties res/ui/bundles.js templates/bundles.html

Author: cziegeler
Date: Wed Jan 30 15:56:09 2013
New Revision: 1440488

URL: http://svn.apache.org/viewvc?rev=1440488&view=rev
Log:
FELIX-2234 : Reduce status information from bundle plugin

Modified:
    felix/trunk/webconsole/src/main/resources/OSGI-INF/l10n/bundle.properties
    felix/trunk/webconsole/src/main/resources/res/ui/bundles.js
    felix/trunk/webconsole/src/main/resources/templates/bundles.html

Modified: felix/trunk/webconsole/src/main/resources/OSGI-INF/l10n/bundle.properties
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/resources/OSGI-INF/l10n/bundle.properties?rev=1440488&r1=1440487&r2=1440488&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/resources/OSGI-INF/l10n/bundle.properties (original)
+++ felix/trunk/webconsole/src/main/resources/OSGI-INF/l10n/bundle.properties Wed Jan 30 15:56:09 2013
@@ -103,7 +103,13 @@ log.traces.min=Message Only
 
 # Bundles plugin
 bundles.pluginTitle=Bundles
-bundles.statline=Bundle information: {0} bundles in total, {1} bundles active, {2} active fragments, {3} bundles resolved, {4} bundles installed.
+bundles.statline.prefix=Bundle information:
+bundles.statline.all=all {0} bundles active
+bundles.statline.partA={0} bundles in total
+bundles.statline.partB={0} bundles active
+bundles.statline.partC={0} active fragments
+bundles.statline.partD={0} bundles resolved
+bundles.statline.partE={0} bundles installed
 bundles.install_or_update=Install or Update
 bundles.install_update=Install/Update...
 bundles.refreshPkg=Refresh Packages

Modified: felix/trunk/webconsole/src/main/resources/res/ui/bundles.js
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/resources/res/ui/bundles.js?rev=1440488&r1=1440487&r2=1440488&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/resources/res/ui/bundles.js (original)
+++ felix/trunk/webconsole/src/main/resources/res/ui/bundles.js Wed Jan 30 15:56:09 2013
@@ -25,7 +25,24 @@ var bundleOpSuccess = false;
 function renderData( eventData, filter )  {
 	lastBundleData = eventData;
 	var s = eventData.s;
-    $('.statline').html(i18n.statline.msgFormat(s[0], s[1], s[2], s[3], s[4]));
+	var statline = i18n.statlinePrefix + ' ' + i18n.statlinePartA.msgFormat(s[0]);
+	if ( s[0] == s[1] || s[0] == s[1] + s[2]) {
+		statline += ' - ' + i18n.statlineAll.msgFormat(s[0]);
+	} else {
+		if ( s[1] > 0 ) {
+			statline += ', ' + i18n.statlinePartB.msgFormat(s[1]);
+		}
+		if ( s[2] > 0 ) {
+			statline += ', ' + i18n.statlinePartC.msgFormat(s[2]);
+		}
+		if ( s[3] > 0 ) {
+			statline += ', ' + i18n.statlinePartD.msgFormat(s[3]);
+		}
+		if ( s[4] > 0 ) {
+			statline += ', ' + i18n.statlinePartE.msgFormat(s[4]);
+		}
+	}
+    $('.statline').html(statline);
 	bundlesBody.empty();
     for ( var idx in eventData.data ) {
         if ( currentBundle == null || !drawDetails || currentBundle == eventData.data[idx].id) {

Modified: felix/trunk/webconsole/src/main/resources/templates/bundles.html
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/resources/templates/bundles.html?rev=1440488&r1=1440487&r2=1440488&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/resources/templates/bundles.html [UTF-8] (original)
+++ felix/trunk/webconsole/src/main/resources/templates/bundles.html [UTF-8] Wed Jan 30 15:56:09 2013
@@ -1,4 +1,4 @@
-<script type="text/javascript" src="${appRoot}/res/lib/jquery.multifile-1.4.6.js"></script>
+<script type="text/javascript" src="${appRoot}/res/lib/jquery.multifile-1.4.6.js"></script>
 <script type="text/javascript" src="${appRoot}/res/ui/bundles.js"></script>
 <script type="text/javascript">
 // <![CDATA[
@@ -31,7 +31,13 @@ var i18n = {
 	'Uninstall'           : '${bundles.uninstall}',
 	'Refresh Package Imports' : '${bundles.refreshImports}',
 	//
-	statline              : '${bundles.statline}',
+	statlinePrefix        : '${bundles.statline.prefix}',
+    statlineAll           : '${bundles.statline.all}',
+    statlinePartA         : '${bundles.statline.partA}',
+    statlinePartB         : '${bundles.statline.partB}',
+    statlinePartC         : '${bundles.statline.partC}',
+    statlinePartD         : '${bundles.statline.partD}',
+    statlinePartE         : '${bundles.statline.partE}',
 	install_update        : '${bundles.install_or_update}',
 	state                 : {
 		1  : '${bundles.state.1}', // uninstalled