Browse Source

Merge pull request #11756 from FranciscoPombal/fix_webui_stats_race

WebUI: fix populating statistics window
adaptive-webui-19844
Mike Tzou 5 years ago committed by GitHub
parent
commit
e906478a16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/webui/www/private/scripts/client.js
  2. 4
      src/webui/www/private/views/statistics.html

2
src/webui/www/private/scripts/client.js

@ -622,7 +622,7 @@ window.addEvent('load', function() { @@ -622,7 +622,7 @@ window.addEvent('load', function() {
$('DHTNodes').set('html', 'QBT_TR(DHT: %1 nodes)QBT_TR[CONTEXT=StatusBar]'.replace("%1", serverState.dht_nodes));
// Statistics dialog
if (document.getElementById("statisticspage")) {
if (document.getElementById("statisticsContent")) {
$('AlltimeDL').set('html', window.qBittorrent.Misc.friendlyUnit(serverState.alltime_dl, false));
$('AlltimeUL').set('html', window.qBittorrent.Misc.friendlyUnit(serverState.alltime_ul, false));
$('TotalWastedSession').set('html', window.qBittorrent.Misc.friendlyUnit(serverState.total_wasted_session, false));

4
src/webui/www/private/views/statistics.html

@ -1,3 +1,4 @@ @@ -1,3 +1,4 @@
<div id="statisticsContent">
<h3>QBT_TR(User statistics)QBT_TR[CONTEXT=StatsDialog]</h3>
<table style="width:100%">
<tr>
@ -21,7 +22,6 @@ @@ -21,7 +22,6 @@
<td id="TotalPeerConnections" class="statisticsValue"></td>
</tr>
</table>
<h3>QBT_TR(Cache statistics)QBT_TR[CONTEXT=StatsDialog]</h3>
<table style="width:100%">
<tr>
@ -33,7 +33,6 @@ @@ -33,7 +33,6 @@
<td id="TotalBuffersSize" class="statisticsValue"></td>
</tr>
</table>
<h3>QBT_TR(Performance statistics)QBT_TR[CONTEXT=StatsDialog]</h3>
<table style="width:100%">
<tr>
@ -57,3 +56,4 @@ @@ -57,3 +56,4 @@
<td id="TotalQueuedSize" class="statisticsValue"></td>
</tr>
</table>
</div>

Loading…
Cancel
Save