Added stat updater per algorithm
This commit is contained in:
parent
71024f18dc
commit
4b49b70e13
@ -1,6 +1,5 @@
|
|||||||
$(function(){
|
$(function(){
|
||||||
|
|
||||||
|
|
||||||
var hotSwap = function(page, pushSate){
|
var hotSwap = function(page, pushSate){
|
||||||
if (pushSate) history.pushState(null, null, '/' + page);
|
if (pushSate) history.pushState(null, null, '/' + page);
|
||||||
$('.selected').removeClass('selected');
|
$('.selected').removeClass('selected');
|
||||||
@ -29,8 +28,10 @@ $(function(){
|
|||||||
var statsSource = new EventSource("/api/live_stats");
|
var statsSource = new EventSource("/api/live_stats");
|
||||||
statsSource.addEventListener('message', function(e){
|
statsSource.addEventListener('message', function(e){
|
||||||
var stats = JSON.parse(e.data);
|
var stats = JSON.parse(e.data);
|
||||||
$('#statsMiners').text(stats.global.workers);
|
for (algo in algos) {
|
||||||
$('#statsHashrate').text(stats.global.hashrate);
|
$('#statsMiners'+algo).text(stats.algos[algo].workers);
|
||||||
|
$('#statsHashrate'+algo).text(stats.algos[algo].hashrateString);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user