Fixed FELIX-3503 The obr page in the webconsole does not update on refresh
https://issues.apache.org/jira/browse/FELIX-3503
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1343664 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole-plugins/obr/src/main/resources/res/plugin.html b/webconsole-plugins/obr/src/main/resources/res/plugin.html
index 4037a24..65f6e9d 100644
--- a/webconsole-plugins/obr/src/main/resources/res/plugin.html
+++ b/webconsole-plugins/obr/src/main/resources/res/plugin.html
@@ -1,5 +1,6 @@
<script type="text/javascript" src="${pluginRoot}/res/plugin.js"></script>
<script type="text/javascript">
+// <![CDATA[
var i18n = {
status_ok : '${obr.status.ok}',
status_no : '${obr.status.no}',
@@ -7,6 +8,7 @@
error : '${obr.error}'
}
var obrData = ${__data__};
+// ]]>
</script>
<p class="statline">${obr.status.ok}</p>
@@ -74,7 +76,7 @@
<a href="${pluginRoot}?list=x">X</a>
<a href="${pluginRoot}?list=y">Y</a>
<a href="${pluginRoot}?list=z">Z</a>
- <a href="${pluginRoot}?list=-">?</a>
+ <a href="${pluginRoot}">?</a>
</span>
<input type="text" id="searchField" title="${obr.action.search.description}"/>
<button id="searchBtn">${obr.action.search}</button>
diff --git a/webconsole-plugins/obr/src/main/resources/res/plugin.js b/webconsole-plugins/obr/src/main/resources/res/plugin.js
index 159ccfa..cd2af1d 100644
--- a/webconsole-plugins/obr/src/main/resources/res/plugin.js
+++ b/webconsole-plugins/obr/src/main/resources/res/plugin.js
@@ -419,9 +419,10 @@
repoTable.append(_tr);
}
-function renderData() {
+function renderData(data) {
repoTable.empty();
resTable.empty();
+ $.extend ( obrData, data );
if ( obrData.status ) {
$('.statline').html(i18n.status_ok);
ifStatusOK.removeClass('ui-helper-hidden');