Skip to content

Commit d0dedad

Browse files
authored
Merge pull request #247 from guusdk/245_admin-console-javacript-message-archive
fixes for Javascript on the admin console (#245 & #246)
2 parents 36e5daa + 5339637 commit d0dedad

File tree

5 files changed

+19
-15
lines changed

5 files changed

+19
-15
lines changed

changelog.html

+6
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ <h1>
4444
Monitoring Plugin Changelog
4545
</h1>
4646

47+
<p><b>2.4.1</b> -- December 6, 2022</p>
48+
<ul>
49+
<li>[<a href='https://github.com/igniterealtime/openfire-monitoring-plugin/issues/246'>Issue #246</a>] - Fixes: Clicking graph no longer opens bigger graph on admin console</li>
50+
<li>[<a href='https://github.com/igniterealtime/openfire-monitoring-plugin/issues/245'>Issue #245</a>] - Fixes: Message history display in admin console remains empty</li>
51+
</ul>
52+
4753
<p><b>2.4.0</b> -- November 22, 2022</p>
4854
<ul>
4955
<li>[<a href='https://github.com/igniterealtime/openfire-monitoring-plugin/issues/232'>Issue #232</a>] - Fix SQL issue when retrieving archived messages from MSSQL</li>

plugin.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<description>Monitors conversations and statistics of the server.</description>
77
<author>Ignite Realtime</author>
88
<version>${project.version}</version>
9-
<date>2022-11-22</date>
9+
<date>2022-12-06</date>
1010
<minServerVersion>4.7.0</minServerVersion>
1111
<minJavaVersion>1.8</minJavaVersion>
1212
<databaseKey>monitoring</databaseKey>

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</parent>
99
<groupId>org.igniterealtime.openfire.plugins</groupId>
1010
<artifactId>monitoring</artifactId>
11-
<version>2.4.1-SNAPSHOT</version>
11+
<version>2.4.2-SNAPSHOT</version>
1212
<name>Monitoring Plugin</name>
1313
<description>Monitors conversations and statistics of the server.</description>
1414

src/web/archive-search.jsp

+7-7
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@
377377
let xhr = new XMLHttpRequest();
378378
xhr.onload = function () {
379379
if (xhr.readyState === 4 && xhr.status === 200) {
380-
showConv(JSON.parse(xmlHttp.responseText));
380+
showConv(JSON.parse(xhr.responseText));
381381
}
382382
};
383383
xhr.open("GET", '/plugins/monitoring/api/conversations/' +conv);
@@ -407,13 +407,13 @@
407407
}
408408
409409
function showOccupants(conversationID, start) {
410-
var xmlHttp = new XMLHttpRequest();
411-
xmlHttp.onreadystatechange = function() {
412-
if (xmlHttp.readyState === 4 && xmlHttp.status === 200)
413-
showOcc(xmlHttp.responseText);
410+
var xhr = new XMLHttpRequest();
411+
xhr.onreadystatechange = function() {
412+
if (xhr.readyState === 4 && xhr.status === 200)
413+
showOcc(xhr.responseText);
414414
}
415-
xmlHttp.open("GET", 'archive-conversation-participants.jsp?conversationID=' + conversationID + '&start=' + start, true);
416-
xmlHttp.send(null);
415+
xhr.open("GET", 'archive-conversation-participants.jsp?conversationID=' + conversationID + '&start=' + start, true);
416+
xhr.send(null);
417417
}
418418
419419
function showOcc(result) {

src/web/stats-dashboard.jsp

+4-6
Original file line numberDiff line numberDiff line change
@@ -182,15 +182,13 @@ function updateTable(id, data) {
182182
}
183183
184184
function updateGraph(graphid, graphkey) {
185-
const d = new Date();
186-
const t = d.getTime();
187-
document.getElementById(graphid).src = 'graph?' + graphkey + '&t=' + t + "&timeperiod=" + currentTimePeriod + "&format=png";
185+
document.getElementById(graphid).src = 'graph?' + graphkey + "&timeperiod=" + currentTimePeriod + "&format=png";
188186
189187
statParam = graphkey.split('&');
190188
statName = statParam[0].split('=');
191189
if (isSnapshotDetailVisible && currentSnapshot === statName[1]) {
192190
viewElement = document.getElementById('snapshot-detail-image');
193-
viewElement.src = 'graph?stat=' + statName[1] + '&t=' + t + '&timeperiod=' + currentTimePeriod + '&width=700&height=250&format=png'
191+
viewElement.src = 'graph?stat=' + statName[1] + '&timeperiod=' + currentTimePeriod + '&width=700&height=250&format=png'
194192
}
195193
}
196194
@@ -278,7 +276,7 @@ let currentSnapshot = '';
278276
279277
function displaySnapshotDetail(snapshot) {
280278
if (!isSnapshotDetailVisible) {
281-
document.getElementById('snapshot-detail-image').src = 'graph?stat=' + snapshot + '&t=' + t + '&timeperiod=' + currentTimePeriod + '&width=700&height=250&format=png';
279+
document.getElementById('snapshot-detail-image').src = 'graph?stat=' + snapshot + '&timeperiod=' + currentTimePeriod + '&width=700&height=250&format=png';
282280
document.getElementById('snapshot-detail').style.display = 'block';
283281
isSnapshotDetailVisible = true;
284282
toggleSnapshotSelected(snapshot);
@@ -293,7 +291,7 @@ function displaySnapshotDetail(snapshot) {
293291
viewElement.src = i.src;
294292
document.getElementById('snapshot-detail-image').style.display = 'block';
295293
}
296-
i.src = 'graph?stat=' + snapshot + '&t=' + new Date().getTime() + '&timeperiod=' + currentTimePeriod + '&width=700&height=250&format=png';
294+
i.src = 'graph?stat=' + snapshot + '&timeperiod=' + currentTimePeriod + '&width=700&height=250&format=png';
297295
toggleSnapshotSelected(snapshot);
298296
currentSnapshot = snapshot;
299297
} else {

0 commit comments

Comments
 (0)