Fixed FELIX-3431 UPnP plugin should provide a better status line
https://issues.apache.org/jira/browse/FELIX-3431
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1309343 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole-plugins/upnp/src/main/resources/OSGI-INF/l10n/bundle.properties b/webconsole-plugins/upnp/src/main/resources/OSGI-INF/l10n/bundle.properties
index 8a8747a..ca42a91 100644
--- a/webconsole-plugins/upnp/src/main/resources/OSGI-INF/l10n/bundle.properties
+++ b/webconsole-plugins/upnp/src/main/resources/OSGI-INF/l10n/bundle.properties
@@ -28,7 +28,9 @@
# native2ascii -encoding utf-8 bundle_bg.raw_properties bundle_bg.properties
pluginTitle=UPnP
-status.ok=UPnP Service Available.
+status.ok=Look below for a list of UPnP devices.
+status.devs=There are {0} main devices/services available.
+status.none=No UPnP Devices found!
btn.search=Search for UPnP Devices
btn.reloadVars=Reload State Variables
tree.searching=Searching for UPnP Devices ...
diff --git a/webconsole-plugins/upnp/src/main/resources/OSGI-INF/l10n/bundle_bg.properties b/webconsole-plugins/upnp/src/main/resources/OSGI-INF/l10n/bundle_bg.properties
index d6672cd..5b186fb 100644
--- a/webconsole-plugins/upnp/src/main/resources/OSGI-INF/l10n/bundle_bg.properties
+++ b/webconsole-plugins/upnp/src/main/resources/OSGI-INF/l10n/bundle_bg.properties
@@ -28,7 +28,9 @@
# native2ascii -encoding utf-8 bundle_bg.raw_properties bundle_bg.properties
pluginTitle=У-ва UPnP
-status.ok=UPnP работи. Вижте по-долу за наличните устройсва.
+status.ok=Вижте по-долу за наличните устройства.
+status.devs=Открити са {0} главни устройства/услуги.
+status.none=Няма открити UPnP устройства!
btn.search=Търсене на устройства
btn.reloadVars=Презареждане на променливите
tree.searching=Търсене на устройства...
diff --git a/webconsole-plugins/upnp/src/main/resources/res/upnp.html b/webconsole-plugins/upnp/src/main/resources/res/upnp.html
index 67e1d5f..9e66769 100644
--- a/webconsole-plugins/upnp/src/main/resources/res/upnp.html
+++ b/webconsole-plugins/upnp/src/main/resources/res/upnp.html
@@ -9,7 +9,9 @@
args_type : '${args.type}',
args_value : '${args.value}',
no_actions : '${no.actions}',
- no_params_out: '${no.params.out}'
+ no_params_out: '${no.params.out}',
+ status_devs : '${status.devs}',
+ status_none : '${status.none}'
}
// ]]>
</script>
diff --git a/webconsole-plugins/upnp/src/main/resources/res/upnp.js b/webconsole-plugins/upnp/src/main/resources/res/upnp.js
index 2c24d49..c77a3e2 100644
--- a/webconsole-plugins/upnp/src/main/resources/res/upnp.js
+++ b/webconsole-plugins/upnp/src/main/resources/res/upnp.js
@@ -273,8 +273,10 @@
var html = addDevice(this);
browser.treeview( { add: html.appendTo(browser) } );
});
+ $('.statline').text(i18n.status_devs.msgFormat(data.devices.length));
} else {
- browser.append('','No devices available', '');
+ $('.statline').text(i18n.status_none);
+ browser.append('', i18n.status_none, '');
}
// update selected items