Merge pull request #8484 from Piccirello/improve-webui-stats

Improve WebUI stats dialog (addendum to #8349)
This commit is contained in:
Mike Tzou
2018-03-06 00:49:49 +08:00
committed by GitHub
5 changed files with 24 additions and 17 deletions

View File

@@ -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 + "%");

View File

@@ -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);
}
});
};