[ADDED] Accont balance updates
This commit is contained in:
parent
73db2cf7c5
commit
5626c2b5bd
@ -4,52 +4,54 @@
|
|||||||
<h4 class="panel-title"><i class="fa fa-desktop fa-fw"></i> Account Information</h4>
|
<h4 class="panel-title"><i class="fa fa-desktop fa-fw"></i> Account Information</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body no-padding">
|
<div class="panel-body no-padding">
|
||||||
<table class="table table-bordered table-hover table-striped">
|
<table class="table table-bordered table-hover table-striped">
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
{if $GLOBAL.userdata.no_fees}
|
{if $GLOBAL.userdata.no_fees}
|
||||||
You are mining without any pool fees applied and
|
You are mining without any pool fees applied and
|
||||||
{else if $GLOBAL.fees > 0}
|
{else if $GLOBAL.fees > 0}
|
||||||
You are mining at <font color="orange">{if $GLOBAL.fees < 0.0001}{$GLOBAL.fees|escape|number_format:"8"}{else}{$GLOBAL.fees|escape}{/if}%</font> pool fee and
|
You are mining at <font color="orange">{if $GLOBAL.fees < 0.0001}{$GLOBAL.fees|escape|number_format:"8"}{else}{$GLOBAL.fees|escape}{/if}%</font> pool fee and
|
||||||
{else}
|
{else}
|
||||||
This pool does not apply fees and
|
This pool does not apply fees and
|
||||||
{/if}
|
{/if}
|
||||||
{if $GLOBAL.userdata.donate_percent > 0}
|
{if $GLOBAL.userdata.donate_percent > 0}
|
||||||
you donate <font color="green">{$GLOBAL.userdata.donate_percent|escape}%</font>.
|
you donate <font color="green">{$GLOBAL.userdata.donate_percent|escape}%</font>.
|
||||||
{else}
|
{else}
|
||||||
you are not <a href="{$smarty.server.SCRIPT_NAME}?page=account&action=edit">donating</a>.
|
you are not <a href="{$smarty.server.SCRIPT_NAME}?page=account&action=edit">donating</a>.
|
||||||
{/if}
|
{/if}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<table class="table table-bordered table-hover table-striped">
|
<table class="table table-bordered table-hover table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr><th colspan="2"><b>{$GLOBAL.config.currency} Account Balance</b></th></tr>
|
<tr><th colspan="2">{$GLOBAL.config.currency} Account Balance</th></tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tr>
|
<tbody>
|
||||||
<td style="font-weight: bold;">Confirmed</td>
|
<tr>
|
||||||
<td><span id="b-confirmed" class="label label-success" style="width: calc(140px); font-size: 12px;">{$GLOBAL.userdata.balance.confirmed|number_format:"6"}</span></td>
|
<th>Confirmed</th>
|
||||||
</tr>
|
<td class="text-right" id="b-confirmed">{$GLOBAL.userdata.balance.confirmed|number_format:"6"}</th>
|
||||||
<tr>
|
</tr>
|
||||||
<td style="font-weight: bold;">Unconfirmed</td>
|
<tr>
|
||||||
<td><span id="b-unconfirmed" class="label label-warning" style="width: calc(140px); font-size: 12px;">{$GLOBAL.userdata.balance.unconfirmed|number_format:"6"}</span></td>
|
<th>Unconfirmed</th>
|
||||||
</tr>
|
<td class="text-right" id="b-unconfirmed">{$GLOBAL.userdata.balance.unconfirmed|number_format:"6"}</th>
|
||||||
</table>
|
</tr>
|
||||||
{if !$DISABLED_DASHBOARD and !$DISABLED_DASHBOARD_API}
|
</tbody>
|
||||||
<table class="table table-bordered table-hover table-striped">
|
</table>
|
||||||
<thead>
|
{if !$DISABLED_DASHBOARD and !$DISABLED_DASHBOARD_API}
|
||||||
<tr>
|
<table class="table table-bordered table-hover table-striped">
|
||||||
<th>Worker</th>
|
<thead>
|
||||||
<th>Hashrate</th>
|
<tr>
|
||||||
<th>Difficulty</th>
|
<th>Worker</th>
|
||||||
</tr>
|
<th>Hashrate</th>
|
||||||
</thead>
|
<th>Difficulty</th>
|
||||||
<tbody id="b-workers">
|
</tr>
|
||||||
<td colspan="3" class="text-center">No worker information available</td>
|
</thead>
|
||||||
</tbody>
|
<tbody id="b-workers">
|
||||||
</tr>
|
<td colspan="3" class="text-center">No worker information available</td>
|
||||||
</table>
|
</tbody>
|
||||||
{/if}
|
</tr>
|
||||||
|
</table>
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -113,7 +113,14 @@ $(document).ready(function(){
|
|||||||
if (j == 0) { $('#b-workers').html('<tr><td colspan="3" class="text-center">No active workers</td></tr>'); }
|
if (j == 0) { $('#b-workers').html('<tr><td colspan="3" class="text-center">No active workers</td></tr>'); }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Our worker process to keep gauges and graph updated
|
// Refresh balance information
|
||||||
|
function refreshBalanceData(data) {
|
||||||
|
balance = data.getuserbalance.data
|
||||||
|
$('#b-confirmed').html(number_format(balance.confirmed, 6));
|
||||||
|
$('#b-unconfirmed').html(number_format(balance.unconfirmed, 6));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Worker progess for overview graphs
|
||||||
(function worker1() {
|
(function worker1() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: url_dashboard,
|
url: url_dashboard,
|
||||||
@ -131,6 +138,7 @@ $(document).ready(function(){
|
|||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
// Worker process to update active workers in the account details table
|
||||||
(function worker2() {
|
(function worker2() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: url_worker,
|
url: url_worker,
|
||||||
@ -146,6 +154,21 @@ $(document).ready(function(){
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
// Worker process to update user account balances
|
||||||
|
// Our worker process to keep worker information updated
|
||||||
|
(function worker3() {
|
||||||
|
$.ajax({
|
||||||
|
url: url_balance,
|
||||||
|
dataType: 'json',
|
||||||
|
success: function(data) {
|
||||||
|
refreshBalanceData(data);
|
||||||
|
},
|
||||||
|
complete: function() {
|
||||||
|
setTimeout(worker3, {/literal}{($GLOBAL.config.statistics_ajax_long_refresh_interval * 1000)|default:"10000"}{literal})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})();
|
||||||
});
|
});
|
||||||
{/literal}
|
{/literal}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user