mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 07:18:08 +00:00
Merge pull request #8484 from Piccirello/improve-webui-stats
Improve WebUI stats dialog (addendum to #8349)
This commit is contained in:
commit
7aa5bc4bc1
@ -122,7 +122,7 @@ namespace
|
||||
map[KEY_TRANSFER_TOTAL_PEER_CONNECTIONS] = sessionStatus.peersCount;
|
||||
|
||||
qreal readRatio = cacheStatus.readRatio;
|
||||
map[KEY_TRANSFER_READ_CACHE_HITS] = (readRatio >= 0) ? Utils::String::fromDouble(100 * readRatio, 2) : "-";
|
||||
map[KEY_TRANSFER_READ_CACHE_HITS] = (readRatio > 0) ? Utils::String::fromDouble(100 * readRatio, 2) : "0";
|
||||
map[KEY_TRANSFER_TOTAL_BUFFERS_SIZE] = cacheStatus.totalUsedBuffers * 16 * 1024;
|
||||
|
||||
// num_peers is not reliable (adds up peers, which didn't even overcome tcp handshake)
|
||||
|
@ -479,3 +479,8 @@ td.statusBarSeparator {
|
||||
background-position: center 1px;
|
||||
background-size: 2px 18px;
|
||||
}
|
||||
|
||||
/* Statistics window */
|
||||
.statisticsValue {
|
||||
text-align: right;
|
||||
}
|
||||
|
@ -401,7 +401,7 @@ window.addEvent('load', function () {
|
||||
$('TotalWastedSession').set('html', friendlyUnit(serverState.total_wasted_session, false));
|
||||
$('GlobalRatio').set('html', serverState.global_ratio);
|
||||
$('TotalPeerConnections').set('html', serverState.total_peer_connections);
|
||||
$('ReadCacheHits').set('html', serverState.read_cache_hits);
|
||||
$('ReadCacheHits').set('html', serverState.read_cache_hits + "%");
|
||||
$('TotalBuffersSize').set('html', friendlyUnit(serverState.total_buffers_size, false));
|
||||
$('WriteCacheOverload').set('html', serverState.write_cache_overload + "%");
|
||||
$('ReadCacheOverload').set('html', serverState.read_cache_overload + "%");
|
||||
|
@ -236,17 +236,19 @@ initializeWindows = function() {
|
||||
};
|
||||
|
||||
StatisticsLinkFN = function() {
|
||||
var id = 'statisticspage';
|
||||
new MochaUI.Window({
|
||||
id: 'statisticspage',
|
||||
id: id,
|
||||
title: 'QBT_TR(Statistics)QBT_TR[CONTEXT=StatsDialog]',
|
||||
loadMethod: 'xhr',
|
||||
contentURL: 'statistics.html',
|
||||
scrollbars: false,
|
||||
resizable: false,
|
||||
maximizable: false,
|
||||
width: 275,
|
||||
height: 370,
|
||||
padding: 10
|
||||
width: loadWindowWidth(id, 275),
|
||||
height: loadWindowHeight(id, 370),
|
||||
onResize: function() {
|
||||
saveWindowSize(id);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -1,23 +1,23 @@
|
||||
<h3>QBT_TR(User statistics)QBT_TR[CONTEXT=StatsDialog]</h3>
|
||||
<table style="width:100%">
|
||||
<tr>
|
||||
<td>QBT_TR(Alltime download:)QBT_TR[CONTEXT=StatsDialog]</td>
|
||||
<td id="AlltimeDL" class="statisticsValue"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>QBT_TR(Alltime upload:)QBT_TR[CONTEXT=StatsDialog]</td>
|
||||
<td>QBT_TR(All-time upload:)QBT_TR[CONTEXT=StatsDialog]</td>
|
||||
<td id="AlltimeUL" class="statisticsValue"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>QBT_TR(Total wasted (this session):)QBT_TR[CONTEXT=StatsDialog]</td>
|
||||
<td id="TotalWastedSession" class="statisticsValue"></td>
|
||||
<td>QBT_TR(All-time download:)QBT_TR[CONTEXT=StatsDialog]</td>
|
||||
<td id="AlltimeDL" class="statisticsValue"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>QBT_TR(Global ratio:)QBT_TR[CONTEXT=StatsDialog]</td>
|
||||
<td>QBT_TR(All-time share ratio:)QBT_TR[CONTEXT=StatsDialog]</td>
|
||||
<td id="GlobalRatio" class="statisticsValue"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>QBT_TR(Total peer connections:)QBT_TR[CONTEXT=StatsDialog]</td>
|
||||
<td>QBT_TR(Session waste:)QBT_TR[CONTEXT=StatsDialog]</td>
|
||||
<td id="TotalWastedSession" class="statisticsValue"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>QBT_TR(Connected peers:)QBT_TR[CONTEXT=StatsDialog]</td>
|
||||
<td id="TotalPeerConnections" class="statisticsValue"></td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -29,7 +29,7 @@
|
||||
<td id="ReadCacheHits" class="statisticsValue"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>QBT_TR(Total buffers size:)QBT_TR[CONTEXT=StatsDialog]</td>
|
||||
<td>QBT_TR(Total buffer size:)QBT_TR[CONTEXT=StatsDialog]</td>
|
||||
<td id="TotalBuffersSize" class="statisticsValue"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
Loading…
Reference in New Issue
Block a user