[ADDED] Peer information in Admin -> Wallet

This commit is contained in:
Sebastian Grewe 2015-04-15 13:41:34 +02:00
parent 1a26c89bc6
commit aff3f9e57f
2 changed files with 37 additions and 0 deletions

View File

@ -22,6 +22,7 @@ if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
}
$aGetInfo = $bitcoin->getinfo();
$aGetPeerInfo = $bitcoin->getpeerinfo();
if (is_array($aGetInfo) && array_key_exists('newmint', $aGetInfo)) {
$dNewmint = $aGetInfo['newmint'];
} else {
@ -57,6 +58,7 @@ if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
$smarty->assign("LOCKED", $dLockedBalance);
$smarty->assign("NEWMINT", $dNewmint);
$smarty->assign("COININFO", $aGetInfo);
$smarty->assign("PEERINFO", $aGetPeerInfo);
// Tempalte specifics
} else {

View File

@ -59,6 +59,7 @@
<th>Wallet Version</th>
<th>Connections</th>
<th>Errors</th>
<th>Blocks</th>
</thead>
<tbody>
<tr>
@ -67,6 +68,7 @@
<td>{$COININFO.walletversion|default:""}</td>
<td>{$COININFO.connections|default:""}</td>
<td><font color="{if $COININFO.errors}red{else}green{/if}">{$COININFO.errors|default:"OK"}</font></td>
<td>{$COININFO.blocks|default:"0"}</td>
</tr>
</tbody>
</table>
@ -75,6 +77,39 @@
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="panel panel-info">
<div class="panel-heading">
<i class="fa fa-connectdevelop fa-fw"></i> Peer Information
</div>
<div class="panel-body no-padding">
<table class="table table-striped table-bordered table-hover">
<thead>
<tr>
<th>Host</th>
<th>Protocol Version</th>
<th>Identity</th>
<th>Connected</th>
<th>Traffic</th>
</tr>
</thead>
<tbody>
{foreach key=KEY item=ARRAY from=$PEERINFO}
<tr>
<td>{$ARRAY['addr']}</td>
<td>{$ARRAY['version']}</td>
<td>{$ARRAY['subver']}</td>
<td>{$ARRAY['conntime']|date_format:$GLOBAL.config.date}</td>
<td>{(($ARRAY['bytessent'] + $ARRAY['bytesrecv']) / 1024 / 1024)|number_format:"3"} MB</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
</div>
{if $ADDRESSCOUNT > 1}
<div class="row">