Optimize charts view & CUP link in footer

* Round hashrate in charts
* Fix charts minimal range value
* Change CUP link in footer
pull/20/merge
fancoder 2014-08-18 13:21:45 +04:00
parent 3cc7797d29
commit 3b5efc6e68
3 changed files with 5 additions and 12 deletions

View File

@ -83,7 +83,7 @@ var statValueHandler = {
avg: function(set, value) {
set[1] = (set[1] * set[2] + value) / (set[2] + 1);
},
round: function(set, value) {
avgRound: function(set, value) {
statValueHandler.avg(set, value);
set[1] = Math.round(set[1]);
},
@ -95,9 +95,9 @@ var statValueHandler = {
};
var preSaveFunctions = {
hashrate: statValueHandler.avg,
hashrate: statValueHandler.avgRound,
workers: statValueHandler.max,
difficulty: statValueHandler.round,
difficulty: statValueHandler.avgRound,
price: statValueHandler.avg,
profit: statValueHandler.avg
};
@ -127,7 +127,6 @@ function storeCollectedValue(chartName, value, settings) {
}
redisClient.set(getStatsRedisKey(chartName), JSON.stringify(sets));
log('info', logSystem, chartName + ' chart collected value ' + value + '. Total sets count ' + sets.length);
log('info', logSystem, chartName + ' data: ' + JSON.stringify(sets));
});
}

View File

@ -353,7 +353,7 @@
<footer>
<div class="text-muted">
Powered by <a target="_blank" href="//github.com/fancoder/cryptonote-universal-pool"><i class="fa fa-github"></i> cryptonote-universal-pool</a>
Powered by <a target="_blank" href="//cryptonotemining.org"><i class="fa fa-github"></i> cryptonote-universal-pool</a>
open sourced under the <a href="http://www.gnu.org/licenses/gpl-2.0.html">GPL</a>
</div>
</footer>

View File

@ -162,9 +162,7 @@
maxSpotColor: '#00bf00',
highlightLineColor: '#236d26',
spotRadius: 3,
// chartRangeMin: 0,
minSpotColor: null,
maxSpotColor: null,
chartRangeMin: 0,
drawNormalOnTop: false,
tooltipFormat: '<b>{{y}}</b>, {{offset:names}}',
tooltipValueLookups: {
@ -184,8 +182,6 @@
maxSpotColor: '#00bf00',
highlightLineColor: '#236d26',
spotRadius: 3,
minSpotColor: null,
maxSpotColor: null,
drawNormalOnTop: false,
chartRangeMin: 0,
tooltipFormat: '<b>{{y}}</b>, {{offset:names}}',
@ -204,8 +200,6 @@
maxSpotColor: '#00bf00',
highlightLineColor: '#236d26',
spotRadius: 3,
minSpotColor: null,
maxSpotColor: null,
drawNormalOnTop: false,
chartRangeMin: 0,
tooltipFormat: '<b>{{y}}</b>, {{offset:names}}',