From aff3f9e57f941fea8eb5e35031aaf704eb534a25 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Wed, 15 Apr 2015 13:41:34 +0200 Subject: [PATCH] [ADDED] Peer information in Admin -> Wallet --- include/pages/admin/wallet.inc.php | 2 ++ templates/bootstrap/admin/wallet/default.tpl | 35 ++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/include/pages/admin/wallet.inc.php b/include/pages/admin/wallet.inc.php index fc423bb6..11a41135 100644 --- a/include/pages/admin/wallet.inc.php +++ b/include/pages/admin/wallet.inc.php @@ -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 { diff --git a/templates/bootstrap/admin/wallet/default.tpl b/templates/bootstrap/admin/wallet/default.tpl index 99f0e90d..92f43530 100644 --- a/templates/bootstrap/admin/wallet/default.tpl +++ b/templates/bootstrap/admin/wallet/default.tpl @@ -59,6 +59,7 @@ Wallet Version Connections Errors + Blocks @@ -67,6 +68,7 @@ {$COININFO.walletversion|default:""} {$COININFO.connections|default:""} {$COININFO.errors|default:"OK"} + {$COININFO.blocks|default:"0"} @@ -75,6 +77,39 @@ +
+
+
+
+ Peer Information +
+
+ + + + + + + + + + + +{foreach key=KEY item=ARRAY from=$PEERINFO} + + + + + + + +{/foreach} + +
HostProtocol VersionIdentityConnectedTraffic
{$ARRAY['addr']}{$ARRAY['version']}{$ARRAY['subver']}{$ARRAY['conntime']|date_format:$GLOBAL.config.date}{(($ARRAY['bytessent'] + $ARRAY['bytesrecv']) / 1024 / 1024)|number_format:"3"} MB
+
+
+
+ {if $ADDRESSCOUNT > 1}