mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-01-14 08:58:05 +00:00
display client version
This commit is contained in:
parent
a39157eb84
commit
45baf81c48
@ -80,17 +80,20 @@
|
|||||||
<li>
|
<li>
|
||||||
<span class="network-status highlight connection-status">Updating status...</span>
|
<span class="network-status highlight connection-status">Updating status...</span>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>Client Version: </label>
|
||||||
|
<span class="version">00.00.00.00</label>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h3> Detailed information </h3>
|
<h3> Detailed information </h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li class="connections">
|
<li class="connections">
|
||||||
<label>Connections: </label>
|
<label>Connections: </label>
|
||||||
<span class="connection-count">1</span>
|
<span class="connection-count">0</span>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label>Known peers: </label>
|
<label>Known peers: </label>
|
||||||
<span class="known-peers">6</span>
|
<span class="known-peers">0</span>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label>Active DHT nodes: </label>
|
<label>Active DHT nodes: </label>
|
||||||
|
@ -20,11 +20,17 @@ function requestNetInfo(cbFunc, cbArg) {
|
|||||||
twisterdAddrman = ret.addrman_total;
|
twisterdAddrman = ret.addrman_total;
|
||||||
twisterdBlocks = ret.blocks;
|
twisterdBlocks = ret.blocks;
|
||||||
twisterDhtNodes = ret.dht_nodes;
|
twisterDhtNodes = ret.dht_nodes;
|
||||||
|
twisterVersion = ("0000000" + ret.version).slice(-8);
|
||||||
|
twisterDisplayVersion = twisterVersion.slice(0,2) + '.' +
|
||||||
|
twisterVersion.slice(2,4) + '.' +
|
||||||
|
twisterVersion.slice(4,6) + '.' +
|
||||||
|
twisterVersion.slice(6,8);
|
||||||
|
|
||||||
$(".connection-count").text(twisterdConnections);
|
$(".connection-count").text(twisterdConnections);
|
||||||
$(".known-peers").text(twisterdAddrman);
|
$(".known-peers").text(twisterdAddrman);
|
||||||
$(".blocks").text(twisterdBlocks);
|
$(".blocks").text(twisterdBlocks);
|
||||||
$(".dht-nodes").text(twisterDhtNodes);
|
$(".dht-nodes").text(twisterDhtNodes);
|
||||||
|
$(".version").text(twisterDisplayVersion);
|
||||||
|
|
||||||
if( !twisterdConnections ) {
|
if( !twisterdConnections ) {
|
||||||
$.MAL.setNetworkStatusMsg("Connection lost.", false);
|
$.MAL.setNetworkStatusMsg("Connection lost.", false);
|
||||||
|
Loading…
Reference in New Issue
Block a user