FELIX-2234 : Reduce status information from bundle plugin
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1440488 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 3ad3e4a..056880a 100644
--- a/webconsole/src/main/resources/OSGI-INF/l10n/bundle.properties
+++ b/webconsole/src/main/resources/OSGI-INF/l10n/bundle.properties
@@ -103,7 +103,13 @@
# 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
diff --git a/webconsole/src/main/resources/res/ui/bundles.js b/webconsole/src/main/resources/res/ui/bundles.js
index dac260a..229f28d 100644
--- a/webconsole/src/main/resources/res/ui/bundles.js
+++ b/webconsole/src/main/resources/res/ui/bundles.js
@@ -25,7 +25,24 @@
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) {
diff --git a/webconsole/src/main/resources/templates/bundles.html b/webconsole/src/main/resources/templates/bundles.html
index 45982bd..119473a 100644
--- a/webconsole/src/main/resources/templates/bundles.html
+++ b/webconsole/src/main/resources/templates/bundles.html
@@ -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 @@
'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