mirror of https://github.com/ethereum/go-ethereum
commit
b22f0f2ef5
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,75 +1,83 @@ |
|||||||
<!doctype> |
<!doctype> |
||||||
<html> |
<html> |
||||||
<head> |
<head> |
||||||
<title>Ethereum</title> |
<title>Ethereum</title> |
||||||
<script type="text/javascript" src="../ext/bignumber.min.js"></script> |
<script type="text/javascript" src="../ext/bignumber.min.js"></script> |
||||||
<script type="text/javascript" src="../ext/ethereum.js/dist/ethereum.js"></script> |
<script type="text/javascript" src="../ext/ethereum.js/dist/ethereum.js"></script> |
||||||
<style type="text/css"> |
<style type="text/css"> |
||||||
body { |
body { |
||||||
font-family: Helvetica; |
font-family: Helvetica; |
||||||
} |
} |
||||||
div.logo { |
div.logo { |
||||||
width: 192px; |
width: 192px; |
||||||
margin: 40px auto; |
margin: 40px auto; |
||||||
} |
} |
||||||
</style> |
</style> |
||||||
</head> |
</head> |
||||||
<body> |
<body> |
||||||
<div class="logo"><img src="logo.png"></img></div> |
<div class="logo"><img src="logo.png"></img></div> |
||||||
<h1>Info</h1> |
<h1>Info</h1> |
||||||
|
|
||||||
<table width="100%"> |
<table width="100%"> |
||||||
<tr> |
<tr> |
||||||
<td>Block number</td> |
<td>Block number</td> |
||||||
<td id="number"></td> |
<td id="number"></td> |
||||||
</tr> |
</tr> |
||||||
|
|
||||||
<tr> |
<tr> |
||||||
<td>Peer count</td> |
<td>Peer count</td> |
||||||
<td id="peer_count"></td> |
<td id="peer_count"></td> |
||||||
</tr> |
</tr> |
||||||
|
|
||||||
<tr> |
<tr> |
||||||
<td>Accounts</td> |
<td>Accounts</td> |
||||||
<td id="accounts"></td> |
<td id="accounts"></td> |
||||||
</tr> |
</tr> |
||||||
|
|
||||||
<tr> |
<tr> |
||||||
<td>Gas price</td> |
<td>Gas price</td> |
||||||
<td id="gas_price"></td> |
<td id="gas_price"></td> |
||||||
</tr> |
</tr> |
||||||
|
|
||||||
<tr> |
<tr> |
||||||
<td>Mining</td> |
<td>Mining</td> |
||||||
<td id="mining"></td> |
<td id="mining"></td> |
||||||
</tr> |
</tr> |
||||||
|
|
||||||
<tr> |
<tr> |
||||||
<td>Listening</td> |
<td>Listening</td> |
||||||
<td id="listening"></td> |
<td id="listening"></td> |
||||||
</tr> |
</tr> |
||||||
|
|
||||||
<tr> |
<tr> |
||||||
<td>Coinbase</td> |
<td>Coinbase</td> |
||||||
<td id="coinbase"></td> |
<td id="coinbase"></td> |
||||||
</tr> |
</tr> |
||||||
</table> |
</table> |
||||||
</body> |
</body> |
||||||
|
|
||||||
<script type="text/javascript"> |
<script type="text/javascript"> |
||||||
var web3 = require('web3'); |
var web3 = require('web3'); |
||||||
var eth = web3.eth; |
var eth = web3.eth; |
||||||
|
|
||||||
web3.setProvider(new web3.providers.HttpSyncProvider('http://localhost:8080')); |
web3.setProvider(new web3.providers.HttpSyncProvider('http://localhost:8545')); |
||||||
|
|
||||||
|
document.querySelector("#number").innerHTML = eth.number; |
||||||
|
document.querySelector("#coinbase").innerHTML = eth.coinbase |
||||||
|
document.querySelector("#peer_count").innerHTML = eth.peerCount; |
||||||
|
document.querySelector("#accounts").innerHTML = eth.accounts; |
||||||
|
document.querySelector("#gas_price").innerHTML = eth.gasPrice; |
||||||
|
document.querySelector("#mining").innerHTML = eth.mining; |
||||||
|
document.querySelector("#listening").innerHTML = eth.listening; |
||||||
|
|
||||||
|
eth.watch('pending').changed(function() { |
||||||
|
console.log("pending changed"); |
||||||
|
}); |
||||||
|
eth.watch('chain').changed(function() { |
||||||
document.querySelector("#number").innerHTML = eth.number; |
document.querySelector("#number").innerHTML = eth.number; |
||||||
document.querySelector("#coinbase").innerHTML = eth.coinbase |
}); |
||||||
document.querySelector("#peer_count").innerHTML = eth.peerCount; |
|
||||||
document.querySelector("#accounts").innerHTML = eth.accounts; |
</script> |
||||||
document.querySelector("#gas_price").innerHTML = eth.gasPrice; |
|
||||||
document.querySelector("#mining").innerHTML = eth.mining; |
|
||||||
document.querySelector("#listening").innerHTML = eth.listening; |
|
||||||
</script> |
|
||||||
|
|
||||||
</html> |
</html> |
||||||
|
|
||||||
|
Loading…
Reference in new issue